/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: #b8860b;
    font-weight: 300;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.divider {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #b8860b, transparent);
    margin: 0 auto;
}

/* Main content */
.intro {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.description {
    font-size: 1.1rem;
    color: #c0c0c0;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.preview-note {
    font-size: 0.95rem;
    color: #888;
    font-style: italic;
}

/* Gallery styles */
.gallery {
    margin-bottom: 4rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.card {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(184, 134, 11, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.7),
        0 0 0 2px rgba(184, 134, 11, 0.3),
        0 0 20px rgba(184, 134, 11, 0.1);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.1) 0%, 
        rgba(0, 0, 0, 0.3) 50%, 
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.card-number {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #b8860b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

.card-name-en {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #e0e0e0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
}

.card-name-zh {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: #b8860b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

/* Footer info */
.footer-info {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid rgba(184, 134, 11, 0.2);
}

.deck-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #f5f5f5;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.deck-info p {
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:nth-child(9) { animation-delay: 0.45s; }
.card:nth-child(10) { animation-delay: 0.5s; }
.card:nth-child(11) { animation-delay: 0.55s; }
.card:nth-child(12) { animation-delay: 0.6s; }
.card:nth-child(13) { animation-delay: 0.65s; }
.card:nth-child(14) { animation-delay: 0.7s; }
.card:nth-child(15) { animation-delay: 0.75s; }
.card:nth-child(16) { animation-delay: 0.8s; }
.card:nth-child(17) { animation-delay: 0.85s; }
.card:nth-child(18) { animation-delay: 0.9s; }
.card:nth-child(19) { animation-delay: 0.95s; }
.card:nth-child(20) { animation-delay: 1.0s; }
.card:nth-child(21) { animation-delay: 1.05s; }
.card:nth-child(22) { animation-delay: 1.1s; }
.card:nth-child(23) { animation-delay: 1.15s; }
.card:nth-child(24) { animation-delay: 1.2s; }
.card:nth-child(25) { animation-delay: 1.25s; }
.card:nth-child(26) { animation-delay: 1.3s; }
.card:nth-child(27) { animation-delay: 1.35s; }
.card:nth-child(28) { animation-delay: 1.4s; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(184, 134, 11, 0.3);
    transform: scale(0.8) translateX(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.modal.show .modal-content {
    transform: scale(1) translateX(0);
}

.modal-header {
    position: relative;
    padding: 1rem;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.close-btn {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #b8860b;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: #fff;
    background: rgba(184, 134, 11, 0.2);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    padding: 2rem;
    min-height: 400px;
    align-items: start;
}

.card-detail-image {
    position: relative;
}

.card-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-title {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.modal-number {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #b8860b;
    display: block;
    margin-bottom: 0.5rem;
}

.modal-name-en {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #f5f5f5;
    margin: 0 0 0.5rem 0;
    letter-spacing: 1px;
}

.modal-name-zh {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.2rem;
    font-weight: 500;
    color: #b8860b;
    margin: 0;
    line-height: 1.2;
}

.description-section {
    margin-bottom: 1.5rem;
}

.description-section h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #b8860b;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.description-section p {
    color: #c0c0c0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.chinese-meaning {
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #d4af37;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-name-en {
        font-size: 1.5rem;
    }

    .modal-name-zh {
        font-size: 1.8rem;
    }
}
