:root {
    --base: #1A0F14;
    --mantle: #22141A;
    --crust: #2B1A21;

    --surface0: #362129;
    --surface1: #402830;
    --surface2: #4B3038;

    --text: #F4EAEA;
    --subtext1: #D9C2C4;
    --subtext0: #BFA6A9;

    --rosewater: #F2D6D9;
    --flamingo: #E8A8AF;
    --pink: #D47C8A;
    --mauve: #A35C6F;
    --red: #8C2F39;
    --maroon: #6E1F2B;
    --peach: #C57A5C;
    --yellow: #C9A227;
    --green: #7A8F63;
    --teal: #5F7C74;
    --sky: #6F8A8F;
    --blue: #4F5C7A;
    --lavender: #8B6C86;

    --primary-gradient: linear-gradient(135deg, var(--mauve) 0%, var(--lavender) 100%);
    --secondary-gradient: linear-gradient(135deg, var(--pink) 0%, var(--mauve) 100%);
    --accent-gradient: linear-gradient(135deg, var(--peach) 0%, var(--pink) 100%);
}

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

body {
    font-family: 'Cormorant Garamond', serif;
    background: var(--base);
    color: var(--text);
    overflow-x: hidden;
    cursor: default;
    position: relative;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.08;
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)"/></svg>');
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(26, 15, 20, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--surface1);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--subtext1);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.lang-btn.active {
    color: var(--pink);
}

.lang-btn:hover {
    color: var(--text);
}

.lang-divider {
    color: var(--surface2);
    font-size: 0.8rem;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(26, 15, 20, 0.9);
    border-bottom: 1px solid var(--surface1);
}

.nav-logo-container a {
    display: block;
}

.nav-logo {
    height: 80px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--subtext1);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: lowercase;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a.active {
    color: var(--pink);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--pink);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
.downloads-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 140px;
    padding-bottom: 4rem;
    position: relative;
    background: radial-gradient(circle at 30% 50%, rgba(163, 92, 111, 0.15), transparent 70%);
}

.hero-content {
    text-align: center;
    max-width: 1200px;
    padding: 2rem;
}

.section-ornament {
    color: var(--pink);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text);
    text-transform: lowercase;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.page-subtitle {
    font-family: 'Crimson Text', serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--subtext0);
    font-style: italic;
    letter-spacing: 1px;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Downloads Content */
.downloads-content {
    padding: 4rem 2rem 8rem;
}

.downloads-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Info Box */
.info-box {
    background: var(--surface0);
    border: 1px solid var(--surface1);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.info-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.info-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.info-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--subtext0);
}

/* Table Wrapper */
.table-wrapper {
    background: var(--surface0);
    border: 1px solid var(--surface1);
    border-radius: 12px;
    padding: 2rem;
    overflow-x: auto;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Cormorant Garamond', serif;
}

thead {
    background: var(--surface1);
}

thead th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
    border-bottom: 2px solid var(--pink);
}

tbody tr.song-row {
    border-bottom: 1px solid var(--surface1);
    transition: all 0.3s ease;
    cursor: pointer;
}

tbody tr.song-row:hover {
    background: var(--surface1);
}

tbody tr.song-row td {
    padding: 1.2rem 1rem;
    color: var(--subtext1);
    font-size: 1.05rem;
}

tbody tr.details-row {
    background: var(--crust);
}

tbody tr.details-row td {
    padding: 1.5rem 1rem;
}

.expand-btn {
    background: var(--surface2);
    border: 1px solid var(--surface2);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: var(--pink);
    border-color: var(--pink);
}

/* Audio Player */
.custom-audio-player {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
}

.play-btn {
    background: var(--pink);
    border: none;
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-btn:hover {
    background: var(--mauve);
    transform: scale(1.1);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--surface1);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--secondary-gradient);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.time {
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    color: var(--subtext1);
    min-width: 45px;
    text-align: right;
}

/* Download Box */
.download-box {
    text-align: center;
}

.download-box a {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--surface1);
    color: var(--text);
    text-decoration: none;
    border-radius: 25px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: lowercase;
    transition: all 0.3s ease;
    border: 1px solid var(--surface2);
    position: relative;
    overflow: hidden;
}

.download-box a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--secondary-gradient);
    transition: left 0.4s ease;
    z-index: 0;
}

.download-box a:hover::before {
    left: 0;
}

.download-box a:hover {
    border-color: var(--pink);
    transform: translateY(-2px);
}

/* Footer */
footer {
    padding: 6rem 4rem 3rem;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(163, 92, 111, 0.05));
}

.section-border-top {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--surface2), transparent);
    margin: 0 auto 4rem;
    max-width: 80%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    margin-bottom: 3rem;
}

.footer-logo-container {
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--subtext1);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: var(--text);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    border: 1px solid var(--surface1);
}

.social-link:hover {
    background: var(--pink);
    border-color: var(--pink);
    transform: translateY(-5px);
}

.social-logo-footer {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.footer-ornament {
    color: var(--pink);
    font-size: 1.5rem;
    margin: 2rem 0;
    letter-spacing: 1rem;
}

.copyright {
    color: var(--subtext0);
    font-size: 0.95rem;
    letter-spacing: 1px;
    line-height: 1.8;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 1.5rem 2rem;
    }

    .nav-logo {
        height: 50px;
    }

    .nav-links {
        display: none;
    }

    .language-toggle {
        top: 1rem;
        right: 1rem;
    }

    .downloads-hero {
        padding-top: 120px;
    }

    .info-box {
        flex-direction: column;
        padding: 2rem;
    }

    .table-wrapper {
        padding: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    thead th,
    tbody tr.song-row td {
        padding: 0.8rem 0.5rem;
    }

    .custom-audio-player {
        flex-direction: column;
        gap: 0.8rem;
    }

    .play-btn {
        width: 50px;
        height: 50px;
    }

    .progress-bar {
        width: 100%;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-logo {
        height: 45px;
    }

    .language-toggle {
        top: 0.8rem;
        right: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .lang-btn {
        font-size: 0.8rem;
    }

    .downloads-hero {
        padding-top: 110px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .info-box {
        padding: 1.5rem;
    }

    .table-wrapper {
        padding: 0.5rem;
    }

    table {
        font-size: 0.85rem;
    }

    /* Hide Label, Catalog, and Format columns on mobile */
    thead th:nth-child(2),
    thead th:nth-child(3),
    thead th:nth-child(4),
    tbody tr.song-row td:nth-child(2),
    tbody tr.song-row td:nth-child(3),
    tbody tr.song-row td:nth-child(4) {
        display: none;
    }

    /* Adjust remaining columns */
    thead th:nth-child(1),
    tbody tr.song-row td:nth-child(1) {
        width: 70%;
    }

    thead th:nth-child(5),
    tbody tr.song-row td:nth-child(5) {
        width: 30%;
        text-align: center;
    }

    thead th,
    tbody tr.song-row td {
        padding: 0.8rem 0.5rem;
    }

    .expand-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    /* Fix details row layout on mobile */
    tbody tr.details-row {
        display: table-row;
    }

    tbody tr.details-row td {
        display: block !important;
        width: 100% !important;
        border: none;
    }

    tbody tr.details-row td:first-child {
        padding: 1rem;
    }

    tbody tr.details-row td:last-child {
        padding: 0 1rem 1rem 1rem;
    }

    /* Override tablet styles - make horizontal for mobile */
    .custom-audio-player {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.8rem !important;
        width: 100%;
        padding: 0.8rem;
        background: var(--surface1);
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .play-btn {
        width: 40px !important;
        height: 40px !important;
        flex-shrink: 0;
        font-size: 0.9rem;
    }

    .progress-bar {
        flex: 1 !important;
        height: 5px !important;
        width: auto !important;
    }

    .time {
        font-size: 0.85rem;
        min-width: 38px;
        flex-shrink: 0;
    }

    .download-box {
        width: 100%;
        text-align: center;
    }

    .download-box a {
        display: block;
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border-radius: 8px;
    }

    .footer-logo-img {
        height: 60px;
        max-width: 80%;
    }
}