/* Wrapped Banner Card */
.wrapped-banner {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(244, 63, 94, 0.12) 100%);
    border: 1px solid rgba(234, 179, 8, 0.3) !important;
    position: relative;
    overflow: hidden;
}
.wrapped-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    pointer-events: none;
    animation: rotateBg 20s linear infinite;
}
@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.wrapped-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    width: 100%;
}
.wrapped-banner-text h3 {
    margin: 0 0 6px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
}
.wrapped-banner-text p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}
.wrapped-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wrapped-select-input {
    background: rgba(24, 24, 27, 0.8);
    border: 1px solid var(--border);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    font-family: var(--font);
}
.wrapped-select-input:focus {
    border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   WRAPPED — Cinémathèque Interactive Experience
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Base Modal ─── */
.wrapped-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
    color: white;
    font-family: var(--font);
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}
.wrapped-modal.open {
    display: flex;
    opacity: 1;
}

/* Film grain overlay */
.wrapped-modal::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 150px;
    animation: grainShift 0.5s steps(3) infinite;
}
@keyframes grainShift {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-5px, 3px); }
    66% { transform: translate(3px, -5px); }
}

/* Ambient blurred backdrop */
.wrapped-modal-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(80px) brightness(0.4) saturate(1.8);
    z-index: 1;
    transition: background-image 1.2s ease, filter 1s ease;
    transform: scale(1.2);
}

/* Content container */
.wrapped-modal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    height: 100%;
    max-height: 780px;
    background: linear-gradient(180deg, rgba(10, 10, 14, 0.92) 0%, rgba(4, 4, 6, 0.97) 100%);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 0; /* Bleed edge-to-edge */
    box-sizing: border-box;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: background 1s ease;
}
@media (max-width: 600px) {
    .wrapped-modal-content {
        max-width: 100%;
        max-height: 100%;
        padding: 0;
        border-radius: 0;
        border: none;
    }
}

/* Close button */
.wrapped-close-btn {
    position: absolute;
    top: 40px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background 0.2s, transform 0.2s;
}
.wrapped-close-btn:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    transform: scale(1.1);
}
@media (max-width: 600px) {
    .wrapped-close-btn { top: 54px; right: 12px; }
}

/* ─── Progress Bars ─── */
.wrapped-progress-container {
    position: absolute;
    top: 28px;
    left: 22px;
    right: 22px;
    display: flex;
    gap: 4px;
    z-index: 100;
    pointer-events: none;
}
.wrapped-progress-bar {
    height: 2px;
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
}
.wrapped-progress-fill {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.9);
    transition: width 50ms linear;
}
.wrapped-progress-fill.done { width: 100% !important; }
.wrapped-progress-fill.paused {
    animation: progressPulse 1.4s ease-in-out infinite;
}
@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ─── Slides ─── */
.wrapped-slides {
    position: absolute;
    inset: 0;
    display: flex;
    overflow: hidden;
    z-index: 1;
}
.wrapped-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    padding: 60px 22px 28px 22px;
}
.wrapped-slide.active {
    opacity: 1;
    pointer-events: auto;
}
/* Cinematic cut: briefly go through black */
.wrapped-slide.cutting-out {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}
.wrapped-slide.cutting-in {
    opacity: 0;
    transition: none;
}

/* ─── Entrance Animations ─── */
@keyframes animRise {
    from { opacity: 0; transform: translateY(35px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes animFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes animScale {
    from { opacity: 0; transform: scale(0.3); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes animExplode {
    0% { opacity: 0; transform: scale(0); }
    70% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}
.wrapped-slide.active [data-anim] {
    opacity: 0;
}
.wrapped-slide.active [data-anim].anim-visible {
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
.wrapped-slide.active [data-anim="rise"].anim-visible { animation-name: animRise; animation-duration: 0.7s; }
.wrapped-slide.active [data-anim="fade"].anim-visible { animation-name: animFade; animation-duration: 0.6s; }
.wrapped-slide.active [data-anim="scale"].anim-visible { animation-name: animScale; animation-duration: 0.6s; }
.wrapped-slide.active [data-anim="explode"].anim-visible { animation-name: animExplode; animation-duration: 0.8s; }

/* ─── Typography ─── */
.w-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 8px;
}
.w-title {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
}
.w-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    font-weight: 400;
}
.w-highlight {
    background: linear-gradient(120deg, #eab308 0%, #f97316 50%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}
.w-counter {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #ffffff 20%, rgba(255, 255, 255, 0.5) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.w-counter-unit {
    font-size: 1.4rem;
    font-weight: 700;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.4);
    margin-left: 4px;
}
.w-muted {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.88rem;
    font-weight: 500;
}

/* ─── Typewriter ─── */
.w-typewriter {
    display: inline;
    border-right: 2px solid rgba(234, 179, 8, 0.8);
    padding-right: 3px;
    animation: twBlink 0.8s step-end infinite;
}
.w-typewriter.done { border-right-color: transparent; animation: none; }
@keyframes twBlink {
    50% { border-color: transparent; }
}

/* ─── Projector Beam ─── */
.projector-beam {
    position: absolute;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.7) 0%, rgba(234, 179, 8, 0.1) 100%);
    border-radius: 2px;
    filter: blur(8px);
    transition: height 1.5s cubic-bezier(0.16, 1, 0.3, 1), 
                width 2.5s cubic-bezier(0.16, 1, 0.3, 1) 2.2s,
                opacity 2.5s ease 2.2s;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
}
.projector-beam.active {
    height: 100%;
    width: 300%;
    opacity: 0;
}
.projector-radial {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.12) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s;
    pointer-events: none;
    z-index: 4;
}

/* ─── Academy Leader Countdown ─── */
.w-countdown-layer {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    filter: sepia(0.3) contrast(1.4);
}
.w-countdown-layer.active {
    opacity: 1;
    pointer-events: auto;
    animation: filmJitter 0.12s infinite;
}
.w-countdown-layer.active.flicker {
    animation: filmJitter 0.12s infinite, bgFlicker 0.1s infinite;
}
.w-countdown-layer::after {
    content: '';
    position: absolute;
    inset: -50%;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.2'/%3E%3C/svg%3E");
    z-index: 10;
    animation: grainShift 0.3s steps(3) infinite;
}
.w-countdown-circle {
    position: relative;
    width: 280px;
    height: 280px;
    border: 4px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.w-countdown-inner-circle {
    position: absolute;
    width: 230px;
    height: 230px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}
.w-countdown-crosshair {
    position: absolute;
    inset: 0;
}
.w-countdown-crosshair::before {
    content: ''; position: absolute; top: 50%; left: -20px; right: -20px; height: 2px; background: rgba(255, 255, 255, 0.6); transform: translateY(-50%);
}
.w-countdown-crosshair::after {
    content: ''; position: absolute; left: 50%; top: -20px; bottom: -20px; width: 2px; background: rgba(255, 255, 255, 0.6); transform: translateX(-50%);
}
.w-countdown-sweep {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 80%, rgba(255, 255, 255, 0.8) 100%);
    animation: sweep 1s steps(24) infinite;
    transform-origin: center;
    clip-path: circle(50% at 50% 50%);
}
.w-countdown-number {
    font-size: 140px;
    font-weight: 700;
    font-family: monospace;
    color: #fff;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
/* Removed duplicate animation declaration */

/* Scratches */
.w-countdown-scratch {
    position: absolute;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.4);
    left: 30%;
    opacity: 0;
    animation: filmScratch 0.4s infinite;
}
.w-countdown-scratch.s2 {
    left: 70%;
    animation-duration: 0.7s;
    animation-delay: 0.2s;
    width: 1px;
    background: rgba(255,255,255,0.2);
}

/* Film Strip Perforations */
.w-film-strip {
    position: absolute;
    top: -50px; bottom: -50px;
    width: 20px;
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.7) 16px, transparent 16px);
    background-size: 100% 48px;
    animation: filmScroll 0.08s linear infinite;
    z-index: 1;
}
.w-film-strip.left { left: 14px; }
.w-film-strip.right { right: 14px; }


@keyframes sweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes filmJitter {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(1px, -1px) scale(1.01); }
    50% { transform: translate(-1px, 2px) scale(0.99); }
    75% { transform: translate(2px, 1px) scale(1); }
}
@keyframes bgFlicker {
    0%, 100% { background: #080808; }
    50% { background: #1a1a1a; }
}
@keyframes filmScratch {
    0%, 90% { opacity: 0; transform: translateX(0); }
    95% { opacity: 1; transform: translateX(-10px); }
    100% { opacity: 0; transform: translateX(10px); }
}
@keyframes filmScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(48px); }
}
.projector-radial.active {
    transform: translate(-50%, -50%) scale(1);
}

/* ─── Tap Prompt ─── */
.w-tap-prompt {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
    animation: tapPulse 2s ease-in-out infinite;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
@keyframes tapPulse {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.03); }
}

/* ─── Stats Credits ─── */
.w-credits {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
}
.w-credits-line {
    display: flex;
    gap: 24px;
    align-items: baseline;
}
.w-credits-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.w-credits-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    font-variant-numeric: tabular-nums;
}
.w-credits-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
}
.w-equivalence {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    margin-top: 8px;
}

/* ─── Poster Hero ─── */
.w-poster-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-top: 20px;
    max-height: 300px;
    width: auto;
    max-width: 200px;
    align-self: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.w-poster-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: kenBurns 10s ease-in-out infinite alternate;
}
@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}
.w-poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 14px 14px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.w-poster-title {
    font-size: 1rem;
    font-weight: 800;
    color: white;
}
.w-poster-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ─── Genre Pills (Guess Game) ─── */
.w-genre-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}
.w-genre-pill {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-user-select: none;
}
.w-genre-pill:active { transform: scale(0.95); }
.w-genre-pill.correct {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
}
.w-genre-pill.wrong {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 0.4);
    transform: scale(0.95);
}
.w-genre-pill.reveal {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-color: rgba(234, 179, 8, 0.4);
    color: #eab308;
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(234, 179, 8, 0.15);
}
.w-genre-pill.disabled {
    pointer-events: none;
    opacity: 0.4;
}

/* Genre Bars */
.w-genre-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
    width: 100%;
}
.w-genre-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.w-genre-bar-name {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    width: 80px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.w-genre-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.w-genre-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, #eab308, #f97316);
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.w-genre-bar-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    width: 24px;
    flex-shrink: 0;
}

/* ─── Hold to Reveal ─── */
.w-blur-target {
    filter: blur(20px);
    transition: filter 0.05s linear;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.w-blur-target.revealed {
    filter: blur(0);
    transition: filter 0.3s ease;
}
.w-hold-instruction {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
    margin-top: 12px;
    animation: tapPulse 2s ease-in-out infinite;
}

/* ─── Director Poster Row ─── */
.w-poster-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.w-poster-row img {
    width: 64px;
    height: 96px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, opacity 0.5s;
    opacity: 0;
}
.w-poster-row img.visible {
    opacity: 1;
}

/* ─── Timeline Scrub ─── */
.w-timeline {
    position: relative;
    width: 100%;
    margin: 24px 0;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.w-timeline-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    position: relative;
}
.w-timeline-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}
.w-timeline-day-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}
.w-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
    cursor: pointer;
}
.w-timeline-dot.has-film {
    background: rgba(234, 179, 8, 0.3);
    border: 2px solid rgba(234, 179, 8, 0.5);
}
.w-timeline-dot.active {
    background: #eab308;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.5);
    transform: scale(1.4);
}
.w-timeline-line {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 1;
    transform: translateY(4px);
}
.w-timeline-popup {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 10;
}
.w-timeline-popup.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.w-timeline-popup img {
    width: 60px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.w-timeline-popup-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    text-align: center;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Tap Stack (Rewatch) ─── */
.w-tap-stack {
    position: relative;
    width: 140px;
    height: 210px;
    align-self: center;
    margin-top: 20px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.w-tap-stack-poster {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}
.w-tap-stack-counter {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #eab308;
    color: #000;
    font-size: 0.85rem;
    font-weight: 900;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.4);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.w-tap-stack-counter.bump {
    animation: counterBump 0.3s ease;
}
@keyframes counterBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ─── VHS / Glitch ─── */
.w-vhs-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 10px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.05) 2px,
        rgba(0, 0, 0, 0.05) 4px
    );
    z-index: 5;
    animation: vhsFlicker 3s linear infinite;
    mix-blend-mode: multiply;
}
@keyframes vhsFlicker {
    0% { opacity: 0.6; }
    20% { opacity: 0.8; }
    40% { opacity: 0.5; }
    60% { opacity: 0.7; }
    100% { opacity: 0.6; }
}
.w-glitch-flash {
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0;
    pointer-events: none;
    border-radius: 10px;
    z-index: 6;
}

/* ─── Bookend (oldest vs newest) ─── */
.w-bookend {
    display: flex;
    gap: 14px;
    margin-top: 22px;
    align-items: stretch;
}
.w-bookend-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 10px;
    border-radius: 14px;
    text-align: center;
}
.w-bookend-item.old {
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.08) 0%, transparent 100%);
    border: 1px solid rgba(234, 179, 8, 0.12);
}
.w-bookend-item.new {
    background: linear-gradient(180deg, rgba(56, 139, 253, 0.08) 0%, transparent 100%);
    border: 1px solid rgba(56, 139, 253, 0.12);
}
.w-bookend-item img {
    width: 70px;
    height: 105px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.w-bookend-year {
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
}
.w-bookend-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}
.w-bookend-gap {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    text-align: center;
    margin-top: 14px;
}

/* ─── Flip Cards (Seasons) ─── */
.w-flip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}
.w-flip-card {
    perspective: 800px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.w-flip-card-inner {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}
.w-flip-card.flipped .w-flip-card-inner {
    transform: rotateY(180deg);
}
.w-flip-front, .w-flip-back {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.w-flip-front {
    background: rgba(255, 255, 255, 0.04);
}
.w-flip-back {
    transform: rotateY(180deg);
    padding: 12px;
}
.w-flip-back.spring { background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.03) 100%); border-color: rgba(34, 197, 94, 0.15); }
.w-flip-back.summer { background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(234, 179, 8, 0.03) 100%); border-color: rgba(234, 179, 8, 0.15); }
.w-flip-back.autumn { background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(249, 115, 22, 0.03) 100%); border-color: rgba(249, 115, 22, 0.15); }
.w-flip-back.winter { background: linear-gradient(135deg, rgba(56, 139, 253, 0.12) 0%, rgba(56, 139, 253, 0.03) 100%); border-color: rgba(56, 139, 253, 0.15); }
.w-flip-emoji { font-size: 1.8rem; }
.w-flip-season {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
}
.w-flip-genre {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
}

/* ─── Quiz Cards ─── */
.w-guess-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}
.w-guess-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    aspect-ratio: 2 / 3;
    -webkit-tap-highlight-color: transparent;
}
.w-guess-card .pixelated {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: url('#svg-pixelate') brightness(0.7);
    transition: opacity 0.4s ease;
}
.w-guess-card .high-res {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    position: absolute;
    inset: 0;
    transition: opacity 0.4s ease;
}
.w-guess-card.revealed .pixelated {
    opacity: 0;
}
.w-guess-card.revealed .high-res {
    opacity: 1;
}
.w-guess-card.winner {
    box-shadow: 0 0 0 3px #22c55e, 0 0 25px rgba(34, 197, 94, 0.3);
    transform: scale(1.05);
}
.w-guess-card.loser .high-res {
    filter: brightness(0.3);
}
.w-guess-card.loser { opacity: 0.3; transform: scale(0.9); }

/* ─── Golden Reveal Button ─── */
.w-golden-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.12) 0%, transparent 70%);
    border: 2px solid rgba(234, 179, 8, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: goldenPulse 2.5s ease-in-out infinite;
    color: rgba(234, 179, 8, 0.7);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    align-self: center;
    margin: 24px 0;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}
.w-golden-btn:active { transform: scale(0.95); }
@keyframes goldenPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.15), 0 0 20px rgba(234, 179, 8, 0.05); }
    50% { box-shadow: 0 0 0 10px rgba(234, 179, 8, 0), 0 0 40px rgba(234, 179, 8, 0.1); }
}

/* ─── Badge Display ─── */
.w-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    opacity: 0;
    transform: scale(0);
}
.w-badge.revealed {
    opacity: 1;
    transform: scale(1);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.w-badge-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.2) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(234, 179, 8, 0.35);
    color: #eab308;
    animation: goldenPulse 3s ease-in-out infinite;
}
.w-badge-icon svg, .w-badge-icon i { width: 42px; height: 42px; }
.w-badge-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    line-height: 1.2;
}
.w-badge-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    max-width: 300px;
}

/* ─── White Flash ─── */
.w-flash {
    position: absolute;
    inset: 0;
    background: white;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    border-radius: 24px;
}

/* ─── Confetti ─── */
.confetti-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 20;
}
@keyframes confettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(800px) rotate(720deg); opacity: 0; }
}
.confetti-particle {
    position: absolute;
    top: -10px;
    opacity: 0.85;
    animation: confettiFall linear forwards;
}
.confetti-particle.shape {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}
.confetti-particle.emoji {
    font-size: 18px;
    line-height: 1;
}

/* ─── Scratch Canvas ─── */
.w-scratch-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 20px;
}
.w-scratch-content {
    padding: 24px 18px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.05) 0%, rgba(249, 115, 22, 0.03) 100%);
    border: 1px solid rgba(234, 179, 8, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.w-scratch-canvas {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 16px;
    z-index: 5;
    touch-action: none;
}
.w-scratch-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    pointer-events: none;
    font-size: 0.88rem;
    color: rgba(180, 150, 80, 0.6);
    font-weight: 700;
    letter-spacing: 0.05em;
}
.w-scratch-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.w-scratch-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.w-scratch-stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: white;
}

/* ─── Share Button ─── */
.w-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(56, 139, 253, 0.2) 0%, rgba(56, 139, 253, 0.05) 100%);
    border: 1.5px solid rgba(56, 139, 253, 0.3);
    color: rgba(56, 139, 253, 0.9);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 14px;
    align-self: center;
    -webkit-tap-highlight-color: transparent;
}
.w-share-btn:hover {
    background: linear-gradient(135deg, rgba(56, 139, 253, 0.3) 0%, rgba(56, 139, 253, 0.1) 100%);
    box-shadow: 0 0 25px rgba(56, 139, 253, 0.15);
}
.w-share-btn:active { transform: scale(0.96); }

/* ─── Navigation Overlay ─── */
.wrapped-nav-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 10;
}
.wrapped-nav-overlay.hidden { display: none; }
.wrapped-nav-left, .wrapped-nav-right {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.wrapped-nav-left { flex: 0 0 30%; }
.wrapped-nav-right { flex: 0 0 70%; }

/* ─── Ambient Dust ─── */
@keyframes floatDust {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    50% { transform: translateY(-200px) translateX(30px); }
}
.ambient-dust {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
}

/* ─── Closing text ─── */
.w-closing {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
    margin-top: 20px;
    font-style: italic;
}

/* ─── Ticket Export (offscreen) ─── */
.ticket-export-container {
    position: fixed;
    left: -9999px;
    top: 0;
    z-index: -1;
    pointer-events: none;
}
.ticket-export-card {
    width: 1080px;
    height: 1920px;
    background: linear-gradient(180deg, #0a0a0e 0%, #141418 50%, #0a0a0e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 60px;
    box-sizing: border-box;
    font-family: var(--font);
    color: white;
    position: relative;
    overflow: hidden;
}
.ticket-export-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(234, 179, 8, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.ticket-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 60px;
}
.ticket-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
}
.ticket-year {
    font-size: 80px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #fff 20%, rgba(255,255,255,0.5) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ticket-badge-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 60px;
}
.ticket-badge-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234,179,8,0.15) 0%, transparent 70%);
    border: 3px solid rgba(234,179,8,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eab308;
}
.ticket-badge-title {
    font-size: 52px;
    font-weight: 900;
    text-align: center;
    line-height: 1.2;
}
.ticket-badge-desc {
    font-size: 26px;
    color: rgba(255,255,255,0.4);
    text-align: center;
    max-width: 800px;
    line-height: 1.5;
}
.ticket-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
    max-width: 800px;
}
.ticket-stat-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ticket-stat-label {
    font-size: 18px;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ticket-stat-value {
    font-size: 42px;
    font-weight: 900;
}
.ticket-footer {
    margin-top: 60px;
    font-size: 20px;
    color: rgba(255,255,255,0.15);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.ticket-barcode {
    height: 60px;
    width: 100%;
    max-width: 600px;
    background: repeating-linear-gradient(90deg, #fff 0, #fff 3px, transparent 3px, transparent 7px, #fff 7px, #fff 11px, transparent 11px, transparent 15px);
    opacity: 0.12;
    margin-top: 40px;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    .wrapped-slide.active [data-anim].anim-visible { animation: none !important; opacity: 1 !important; transform: none !important; }
    .wrapped-modal::after { animation: none; }
    .w-poster-hero img { animation: none; }
    .w-vhs-overlay { animation: none; }
    .confetti-particle { animation: none; display: none; }
    .w-golden-btn { animation: none; }
    .w-badge-icon { animation: none; }
    .w-typewriter { animation: none; border-right: none; }
    .w-tap-prompt { animation: none; opacity: 0.5; }
}

/* ─── Cinémathèque Wrapped Enhancements ─── */
.w-poster-mosaic {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    filter: blur(12px);
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.w-poster-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wrapped-slide.active .w-poster-mosaic {
    opacity: 0.25;
}

@keyframes gentleShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.w-genre-pill.wrong.shake {
    animation: gentleShake 0.4s ease-in-out;
    transform: scale(0.95);
}

.w-genre-pill.scale-up {
    transform: scale(1.15) !important;
}

.w-genre-pill.fade-out {
    opacity: 0.15;
    pointer-events: none;
}

@keyframes goldPulse {
    0%, 100% { border-color: rgba(234, 179, 8, 0.4); box-shadow: 0 0 10px rgba(234, 179, 8, 0.1); }
    50% { border-color: rgba(234, 179, 8, 1); box-shadow: 0 0 30px rgba(234, 179, 8, 0.4); }
}

.w-genre-pill.gold-pulse {
    border-color: #eab308 !important;
    animation: goldPulse 1.5s infinite;
}

.w-tap-stack.fanned img {
    /* alternating rotations/translations */
}
.w-tap-stack.fanned img:nth-child(2n) {
    transform: rotate(-8deg) translate(-20px, -5px) !important;
}
.w-tap-stack.fanned img:nth-child(2n+1) {
    transform: rotate(8deg) translate(20px, -5px) !important;
}
.w-tap-stack.fanned img:nth-child(3n) {
    transform: rotate(-15deg) translate(-35px, -10px) !important;
}
.w-tap-stack.fanned img:nth-child(3n+1) {
    transform: rotate(15deg) translate(35px, -10px) !important;
}

.w-bookend-item.old img {
    filter: sepia(0.8);
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.wrapped-slide.active [data-anim="slide-left"].anim-visible {
    animation-name: slideInLeft;
    animation-duration: 0.8s;
}

.wrapped-slide.active [data-anim="slide-right"].anim-visible {
    animation-name: slideInRight;
    animation-duration: 0.8s;
}

.w-guess-card.correct-gold {
    box-shadow: 0 0 0 3px #eab308, 0 0 25px rgba(234, 179, 8, 0.4) !important;
    transform: scale(1.05);
}
.w-guess-card.correct-gold img {
    filter: blur(0) brightness(1) !important;
}
.w-guess-card.shake {
    animation: gentleShake 0.4s ease-in-out;
}
.w-red-flash {
    position: absolute;
    inset: 0;
    background: rgba(239, 68, 68, 0.4);
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    border-radius: 24px;
    transition: opacity 0.15s ease-out;
}

.wrapped-modal-content:has(.climax-revealed) {
    background: radial-gradient(circle, rgba(234, 179, 8, 0.25) 0%, rgba(0, 0, 0, 0.98) 80%) !important;
    transition: background 1.5s ease-in-out;
}
