/* --- KINETIC BACKGROUND --- */
.aura-field {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: 
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(244, 63, 94, 0.08) 0%, transparent 50%);
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), 
                      linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
}

/* --- CIRCULAR SEQUENCER ANIMATION --- */
.orbit-container {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: spin linear infinite;
}

.ring-1 { width: 100%; height: 100%; animation-duration: 40s; }
.ring-2 { width: 80%; height: 80%; animation-duration: 30s; border-color: rgba(59, 130, 246, 0.1); }
.ring-3 { width: 60%; height: 60%; animation-duration: 20s; border-style: dashed; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- SOUND CORE (PLAY BUTTON) --- */
.sound-core {
    position: relative;
    width: 140px;
    height: 140px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 20;
    color: #000;
}

.sound-core:hover {
    transform: scale(1.15);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 60px rgba(244, 63, 94, 0.4);
}

.pulse-layer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: white;
    opacity: 0.2;
    animation: core-pulse 2s infinite;
}

@keyframes core-pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2); opacity: 0; }
}

/* --- TYPOGRAPHY EFFECTS --- */
.reveal-text {
    overflow: hidden;
    display: block;
}

.reveal-text span {
    display: block;
    animation: reveal 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    transform: translateY(100%);
}

@keyframes reveal {
    to { transform: translateY(0); }
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #020205; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.section-padding { padding: 120px 0; }

:root {
    --primary: #f43f5e; /* Rose 500 */
    --accent: #3b82f6;  /* Blue 500 */
    --bg: #020205;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: #ffffff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.h-sync { font-family: 'Syncopate', sans-serif; }
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes reverse-spin {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-20px) translateX(10px); }
}

.animate-spin-slow { animation: spin-slow 20s linear infinite; }
.animate-reverse-spin { animation: reverse-spin 15s linear infinite; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delayed { animation: float 8s ease-in-out infinite; animation-delay: 2s; }

  .bg-wrapper {
            position: fixed;
            inset: 0;
            z-index: -1;
            background: radial-gradient(circle at 20% 30%, rgba(244, 63, 94, 0.15) 0%, transparent 40%),
                        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
            animation: bg-drift 15s ease-in-out infinite alternate;
        }

        @keyframes bg-drift {
            0% { transform: scale(1); }
            100% { transform: scale(1.1) translate(10px, 10px); }
        }

        .particles {
            position: absolute;
            inset: 0;
            background-image: radial-gradient(circle, white 1px, transparent 1px);
            background-size: 100px 100px;
            opacity: 0.1;
            animation: particle-float 20s linear infinite;
        }

        @keyframes particle-float {
            from { background-position: 0 0; }
            to { background-position: 0 1000px; }
        }

        /* --- IMPROVED VINYL PLAYER --- */
        .vinyl-container
 {
    position: relative;
    width: 150px;
    height: 150px;
    perspective: 1000px;
    margin-top: 20px;
}
        @media (min-height: 750px) { .vinyl-container { width: 200px; height: 200px; } }

        .vinyl-disc {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: repeating-radial-gradient(circle, #000 0, #111 2px, #000 4px);
                border: 10px solid #080808;
    box-shadow: 0 5px 40px rgb(133 123 124), inset 0 0 20px rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .playing .vinyl-disc {
            animation: rotate 4s linear infinite;
            box-shadow: 0 20px 60px rgba(244, 63, 94, 0.2);
        }

        /* Shine effect on vinyl */
        .vinyl-disc::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, transparent 45%, rgba(255,255,255,0.1) 50%, transparent 55%);
            border-radius: 50%;
            pointer-events: none;
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .vinyl-label {
            width: 32%;
            height: 32%;
            background: linear-gradient(135deg, var(--primary), #9f1239);
            border-radius: 50%;
            border: 4px solid #000;
            box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
        }

        /* --- RESPONSIVE OPTIONS GRID --- */
        .options-grid {
            width: 100%;
            max-width: 800px;
            display: grid;
            gap: 12px;
            grid-template-columns: 1fr; /* Mobile default */
        }

        @media (min-width: 768px) {
            .options-grid {
                grid-template-columns: 1fr 1fr; /* 2x2 on Laptop/Desktop */
            }
        }

        .option-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(15px);
            padding: 1.5rem;
            border-radius: 20px;
            transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .option-card:hover {
            background: rgba(255, 255, 255, 0.06);
            border-color: var(--primary);
            transform: translateY(-2px);
        }

        .option-card.correct { background: #10b981 !important; border-color: #10b981 !important; color: #000; font-weight: bold; }
        .option-card.wrong { background: #ef4444 !important; border-color: #ef4444 !important; }

        /* --- TIMER PRESENTATION --- */
        .timer-ring {
            position: absolute;
            inset: -15px;
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 50%;
        }

        .progress-bar-container {
            width: 100%;
            height: 6px;
            background: rgba(255,255,255,0.05);
            border-radius: 10px;
            overflow: hidden;
            margin: 20px 0;
        }

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    box-shadow: 0 0 15px var(--primary);
}

/* --- MOBILE RESPONSIVE PASS ---
   Layout-only overrides. Quiz actions, routes, and data behavior are unchanged. */
@media (max-width: 767px) {
    html,
    body {
        overflow-x: hidden;
    }

    nav > div {
        min-height: 56px;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    nav > div > a:first-child {
        min-width: 0;
        flex-shrink: 1;
    }

    nav > div > a:first-child img {
        width: auto !important;
        max-width: 132px !important;
        max-height: 38px;
    }

    nav > div > div {
        min-width: 0;
        gap: 0.5rem !important;
    }

    nav .dropdown > button {
        max-width: 146px;
        padding: 0.55rem 0.75rem !important;
        font-size: 9px !important;
        letter-spacing: 0.1em !important;
    }

    nav .dropdown > button span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    nav > div > div > a[href*="login"] {
        padding: 0.55rem 0.85rem !important;
        font-size: 9px !important;
        letter-spacing: 0.12em !important;
    }

    footer {
        margin-top: 3rem !important;
        padding: 2rem 0 !important;
    }

    footer > div {
        gap: 1.25rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    footer > div > div:last-child {
        text-align: center;
        line-height: 1.5;
    }

    #toast-message {
        width: calc(100% - 2rem);
        max-width: 360px;
        padding-left: 1rem;
        padding-right: 1rem;
        text-align: center;
    }

    .section-padding {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .auth-container,
    .dashboard-container,
    .playlists-container,
    .playlist-show-container,
    .profile-container,
    .stats-shell,
    .leaderboard-container {
        padding: 76px 12px 32px !important;
    }

    .auth-card {
        padding: 24px 16px !important;
        border-radius: 28px !important;
    }

    .auth-card h1,
    .profile-container h1,
    .playlists-container h1,
    .stats-shell h1,
    .dashboard-container h1 {
        font-size: clamp(1.65rem, 8vw, 2.25rem) !important;
        line-height: 1.15;
    }

    .profile-card {
        padding: 24px 16px !important;
        border-radius: 28px !important;
    }

    .stat-card,
    .stats-card {
        padding: 16px !important;
        border-radius: 22px !important;
    }

    .stats-card .text-3xl,
    .stat-card .text-3xl {
        font-size: 1.55rem !important;
    }

    .leaderboard-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .leaderboard-container > div {
        padding: 18px 12px !important;
        border-radius: 22px !important;
    }

    .leaderboard-container table {
        min-width: 520px;
    }

    .leaderboard-container > div:has(table) {
        overflow-x: auto;
    }

    /* Daily event page */
    .event-page header {
        padding-top: 5rem !important;
        padding-bottom: 2rem !important;
    }

    .event-page header > div,
    .event-page > main {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .event-page header > div {
        gap: 2rem !important;
    }

    .event-page header .text-left {
        text-align: center;
    }

    .event-page header .text-left > .flex {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem !important;
    }

    .event-page header .text-left > .flex > div:last-child {
        min-width: 0;
        max-width: calc(100% - 88px);
        text-align: left;
    }

    .event-page header > div > div:last-child {
        width: 100%;
    }

    .event-page .timer-digit {
        font-size: 22px;
    }

    .event-page main {
        margin-top: 1.5rem !important;
    }

    .event-page main > div:first-child {
        margin-bottom: 1.25rem !important;
    }

    .event-page .tab-btn {
        padding: 0.8rem 0.75rem;
        font-size: 9px;
        letter-spacing: 0.12em;
        white-space: nowrap;
    }

    .quiz-card {
        border-radius: 20px;
    }

    .quiz-card:hover {
        transform: none;
    }

    /* Party packs */
    .pack-page {
        padding: 78px 1rem 2.5rem !important;
    }

    .pack-page > div:first-child {
        margin-bottom: 1.25rem !important;
    }

    .pack-page > div:first-child > div:first-child,
    .pack-page > div:first-child > div:last-child {
        width: 100%;
    }

    .pack-page > div:first-child form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 0.5rem;
    }

    .pack-page > div:first-child form label {
        min-width: 0 !important;
        width: 100%;
        grid-column: 1 / -1;
    }

    .pack-page > div:first-child form select {
        width: 100%;
    }

    .pack-page > div:first-child > div:last-child {
        justify-content: stretch;
    }

    .pack-page > div:first-child > div:last-child a {
        flex: 1 1 0;
        justify-content: center;
        white-space: nowrap;
    }

    .pack-panel > div:first-child {
        overflow-x: auto;
        white-space: nowrap;
    }

    .pack-tab {
        padding: 0.75rem 0.7rem;
        font-size: 0.63rem;
        letter-spacing: 0.1em;
        white-space: nowrap;
    }

    .pack-panel [id^="tab-"] {
        padding: 0.9rem !important;
    }

    .pack-card {
        min-height: 0;
    }

    .pack-body {
        gap: 0.75rem;
    }

    /* Bollywood collection list and play screen */
    .min-h-screen.pt-28.pb-16.px-4 {
        padding-top: 5.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .min-h-screen.pt-28.pb-16.px-4 .h-sync.text-4xl {
        font-size: 1.75rem !important;
        line-height: 1.15;
    }

    .min-h-screen.pt-28.pb-16.px-4 .max-w-6xl > div:first-child {
        gap: 0.75rem !important;
        margin-bottom: 1.25rem !important;
    }

    .min-h-screen.pt-28.pb-16.px-4 .max-w-6xl > div:first-child > div:last-child {
        width: 100%;
        justify-content: stretch;
    }

    .min-h-screen.pt-28.pb-16.px-4 .max-w-6xl > div:first-child > div:last-child a {
        flex: 1 1 0;
        justify-content: center;
        white-space: nowrap;
    }

    .min-h-screen.pt-24.pb-10.px-4 {
        padding-top: 5.25rem !important;
        padding-bottom: 2rem !important;
    }

    .min-h-screen.pt-24.pb-10.px-4 > div > div:first-child {
        margin-bottom: 1.25rem !important;
    }

    .min-h-screen.pt-24.pb-10.px-4 h1 {
        font-size: 1.45rem !important;
        line-height: 1.2;
    }

    .min-h-screen.pt-24.pb-10.px-4 .aspect-video {
        max-height: 200px;
    }

    .min-h-screen.pt-24.pb-10.px-4 [class*="rounded-[32px]"] {
        padding: 1rem !important;
        border-radius: 22px !important;
    }

    .min-h-screen.pt-24.pb-10.px-4 form {
        margin-top: 1rem !important;
    }

    .min-h-screen.pt-24.pb-10.px-4 .bollywood-option {
        padding: 0.85rem !important;
    }

    /* Result cards, tables, and action buttons */
    .min-h-screen.pt-32.pb-20.px-4 {
        padding-top: 5.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .min-h-screen.pt-32.pb-20.px-4 > div {
        border-radius: 24px !important;
    }

    .min-h-screen.pt-32.pb-20.px-4 > div > div:first-child {
        padding: 1.25rem !important;
    }

    .min-h-screen.pt-32.pb-20.px-4 h1 {
        font-size: 1.45rem !important;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .min-h-screen.pt-32.pb-20.px-4 > div > div:last-child {
        flex-direction: column;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .min-h-screen.pt-32.pb-20.px-4 > div > div:last-child > a {
        width: 100%;
    }

    .min-h-screen.pt-32.pb-20.px-4 table {
        min-width: 600px;
        font-size: 0.72rem;
    }

    .min-h-screen.pt-32.pb-20.px-4 div:has(> table) {
        overflow-x: auto !important;
        overflow-y: hidden;
    }

    /* Arena/player: keep the playable controls compact on phones. */
    main.flex-grow.mt-20 {
        margin-top: 4.5rem !important;
        padding: 0.5rem 1rem 1.5rem !important;
        gap: 1rem;
    }

    main.flex-grow.mt-20 .text-6xl {
        font-size: 3.35rem !important;
        line-height: 1;
    }

    main.flex-grow.mt-20 .text-6xl .text-rose-600 {
        font-size: 1.75rem !important;
    }

    main.flex-grow.mt-20 .vinyl-container {
        width: 140px;
        height: 140px;
        margin-top: 0;
    }

    main.flex-grow.mt-20 .options-grid {
        margin-top: 1rem !important;
        gap: 0.5rem;
    }

    main.flex-grow.mt-20 .option-card {
        padding: 0.85rem;
        border-radius: 16px;
    }

    main.flex-grow.mt-20 .option-card .option-text {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    /* Home wall, reviews, and other long-form sections */
    header .wall-gallery {
        width: min(100%, 330px) !important;
        height: 400px !important;
    }

    header .wall-frame--party {
        height: 112px !important;
    }

    header .wall-frame--play {
        height: 155px !important;
    }

    header .wall-frame--bollywood {
        height: 118px !important;
    }

    header .wall-frame--play .play-now-core {
        width: 6.5rem !important;
        height: 6.5rem !important;
    }

    #reviews > div,
    #about > div {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #reviews h2 {
        font-size: 2rem !important;
        line-height: 1.15;
    }

    #reviews .flex.flex-col.gap-6 {
        gap: 1rem !important;
    }

    #reviews form {
        padding: 1rem !important;
        margin-bottom: 2rem !important;
    }

    #reviews form > div:last-child {
        width: 100%;
    }

    #reviews form button {
        width: 100%;
    }

    #reviews .swiper-slide > div {
        padding: 1.25rem !important;
        border-radius: 22px !important;
    }

    /* Utility screens */
    .failure-wrapper {
        min-height: calc(100vh - 56px);
        align-items: flex-start;
        padding: 76px 12px 32px;
    }

    .failure-card {
        width: 100%;
        padding: 2rem 1rem !important;
        border-radius: 28px !important;
    }

    .failure-card h1 {
        font-size: 1.8rem !important;
    }

    .mini-player {
        right: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
    }

    .cover-header {
        padding: 1.5rem !important;
        border-radius: 28px !important;
        margin-bottom: 1.5rem !important;
    }

    .playlist-show-container h1 {
        font-size: 1.8rem !important;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .playlist-show-container .song-item > .flex {
        align-items: flex-start;
    }

    .playlist-show-container .song-item .action-btn {
        padding: 0.35rem 0.55rem;
        font-size: 10px;
    }
}

@media (max-width: 390px) {
    nav > div > a:first-child img {
        max-width: 116px !important;
    }

    nav .dropdown > button {
        max-width: 122px;
    }

    main.flex-grow.mt-20 .vinyl-container {
        width: 120px;
        height: 120px;
    }

    main.flex-grow.mt-20 .text-6xl {
        font-size: 3rem !important;
    }

    .event-page .tab-btn {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
        letter-spacing: 0.08em;
    }
}
