:root {
    --primary-color: #0072c6;
    --secondary-color: #3490dc;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-color: #e2e8f0;
    --hover-color: #edf2f7;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.site-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filter Styles */
.filter-container {
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--card-bg);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters select:hover {
    border-color: var(--primary-color);
}

/* Card Gallery Styles */
.card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.card-image {
    width: 100%;
    height: auto;
    display: block;
}

.card-info {
    padding: 1rem;
}

.card-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    color: var(--primary-color);
}

.card-type {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-rarity {
    font-size: 0.8rem;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: var(--hover-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.modal-card-image {
    flex: 0 0 300px;
}

.modal-card-image img {
    width: 100%;
    height: auto;
    border-radius: 4.5%;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.modal-card-text {
    flex: 1 1 300px;
}

.modal-card-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.modal-card-type {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.modal-card-text-box {
    margin: 1rem 0;
    line-height: 1.7;
    font-size: 1rem;
}

.modal-card-stats {
    font-weight: 700;
    margin-top: 1rem;
}

/* Footer Styles */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    background-color: #f1f5f9;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .card-gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .site-header h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 1rem;
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-card-details {
        flex-direction: column;
    }
    
    .modal-card-image {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .card-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .site-header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}