/* ============================================================
   LOTTERY.DAY  --  McBling lottery spectacle
   Translucent-frost  +  chrome lottery balls  +  sci-fi-HUD
   Palette:
     #f0e8f4  champagne frost
     #f4e8c0  golden frost
     #1a0a2a  deep purple (nightclub dark)
     #1a1020  midnight (draw-room dark)
     #e0e0f0  chrome highlight
     #a0a0b8  chrome mid (steel)
     #505068  chrome dark (shadowed)
     #c084fc  aurora violet
     #818cf8  aurora indigo
     #22d3ee  aurora cyan
     #a78bfa  aurora lavender
     #f0d060  sparkle gold
   Fonts: Orbitron (display), Quicksand (body)
   ============================================================ */

:root {
    --frost-champagne: #f0e8f4;
    --frost-golden:    #f4e8c0;
    --deep-purple:     #1a0a2a;
    --midnight:        #1a1020;
    --chrome-hi:       #e0e0f0;
    --chrome-mid:      #a0a0b8;
    --chrome-dark:     #505068;
    --aurora-violet:   #c084fc;
    --aurora-indigo:   #818cf8;
    --aurora-cyan:     #22d3ee;
    --aurora-lavender: #a78bfa;
    --sparkle-gold:    #f0d060;
    --specular:        rgba(255,255,255,0.9);

    --font-display: 'Orbitron', 'Arial Black', sans-serif;
    --font-body:    'Quicksand', system-ui, sans-serif;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    overflow-x: hidden;
    background: var(--midnight);
    color: var(--chrome-hi);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    position: relative;
    min-height: 100vh;
    scroll-behavior: smooth;
}

img, svg { display: block; max-width: 100%; }

/* ============================================================
   AURORA UNDERLAYER  (animated full-page)
   ============================================================ */
.aurora-underlayer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(192,132,252,0.25), transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(34,211,238,0.20), transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(129,140,248,0.18), transparent 60%),
        linear-gradient(135deg, #1a0a2a 0%, #2a1340 40%, #3a1a55 70%, #1a1020 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%, 100% 100%;
    animation: aurora-shift 24s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
    0%   { background-position: 0% 0%, 100% 100%, 50% 50%, 0 0; }
    50%  { background-position: 60% 40%, 30% 70%, 80% 20%, 0 0; }
    100% { background-position: 100% 100%, 0% 0%, 20% 80%, 0 0; }
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    mix-blend-mode: screen;
    will-change: transform;
}
.aurora-blob-1 {
    width: 60vw; height: 60vw;
    top: -20vh; left: -10vw;
    background: radial-gradient(circle, var(--aurora-violet) 0%, transparent 70%);
    animation: blob-drift-a 28s ease-in-out infinite alternate;
}
.aurora-blob-2 {
    width: 55vw; height: 55vw;
    top: 30vh; right: -15vw;
    background: radial-gradient(circle, var(--aurora-cyan) 0%, transparent 70%);
    animation: blob-drift-b 32s ease-in-out infinite alternate;
}
.aurora-blob-3 {
    width: 50vw; height: 50vw;
    bottom: -10vh; left: 20vw;
    background: radial-gradient(circle, var(--aurora-indigo) 0%, transparent 70%);
    animation: blob-drift-c 36s ease-in-out infinite alternate;
}
.aurora-blob-4 {
    width: 40vw; height: 40vw;
    top: 60vh; left: 50vw;
    background: radial-gradient(circle, var(--aurora-lavender) 0%, transparent 70%);
    animation: blob-drift-d 30s ease-in-out infinite alternate;
}

@keyframes blob-drift-a {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(15vw, 10vh) scale(1.15); }
}
@keyframes blob-drift-b {
    0%   { transform: translate(0,0) scale(1.05); }
    100% { transform: translate(-12vw, -8vh) scale(0.9); }
}
@keyframes blob-drift-c {
    0%   { transform: translate(0,0) scale(0.95); }
    100% { transform: translate(10vw, -12vh) scale(1.1); }
}
@keyframes blob-drift-d {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(-15vw, 15vh) scale(1.2); }
}

/* ============================================================
   SPARKLE FIELD  (atmospheric particles)
   ============================================================ */
.sparkle-field {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: var(--s, 6px);
    height: var(--s, 6px);
    border-radius: 50%;
    background: radial-gradient(circle, var(--specular) 0%, var(--sparkle-gold) 40%, transparent 70%);
    opacity: var(--o, 0.45);
    animation: sparkle-drift var(--d, 14s) linear infinite;
    animation-delay: var(--delay, 0s);
    will-change: transform, opacity;
    box-shadow: 0 0 6px rgba(240,208,96,0.6);
}

@keyframes sparkle-drift {
    0%   { transform: translate(0,0) scale(0.7); opacity: 0; }
    10%  { opacity: var(--o, 0.45); }
    50%  { transform: translate(var(--x, 30px), var(--y, -40vh)) scale(1.1); }
    90%  { opacity: var(--o, 0.45); }
    100% { transform: translate(calc(var(--x, 30px) * 1.3), calc(var(--y, -40vh) * 1.6)) scale(0.6); opacity: 0; }
}

/* ============================================================
   STAGE / SECTIONS
   ============================================================ */
.lottery-stage {
    position: relative;
    z-index: 2;
}

.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(48px, 8vh, 100px) clamp(16px, 4vw, 80px);
    overflow: hidden;
}

/* Frost overlay (translucent-frost backdrop-filter) */
.frost-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-top:    1px solid rgba(255,255,255,0.18);
    border-bottom: 1px solid rgba(255,255,255,0.18);
    pointer-events: none;
}
.frost-overlay-champagne {
    background: rgba(240,232,244,0.55);
}
.frost-overlay-golden {
    background: rgba(244,232,192,0.5);
}

/* ============================================================
   CHROME TYPOGRAPHY  (used across all sections)
   ============================================================ */
.brand,
.section-title,
.brand-chrome,
.jackpot-counter,
.countdown-value,
.ball-number {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-chrome {
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #e0e0f0 18%,
        #a0a0b8 38%,
        #ffffff 50%,
        #c0c0d8 62%,
        #707090 82%,
        #d0d0e8 100%
    );
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: chrome-shimmer 6s ease-in-out infinite;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

@keyframes chrome-shimmer {
    0%, 100% { background-position: 0% 0%; }
    50%      { background-position: 0% 100%; }
}

/* ============================================================
   SECTION 1  --  HERO
   ============================================================ */
.section-hero {
    color: var(--deep-purple);
}

.hero-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 4vh, 48px);
    z-index: 2;
}

/* HUD ring around hero ball */
.hud-ring {
    position: absolute;
    width: clamp(440px, 70vmin, 720px);
    height: clamp(440px, 70vmin, 720px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    animation: hud-fade-in 1.4s ease-out 0.4s forwards,
               hud-rotate 80s linear infinite;
}
.hud-ring svg { width: 100%; height: 100%; overflow: visible; }

@keyframes hud-fade-in {
    from { opacity: 0; transform: translate(-50%,-50%) scale(0.85); }
    to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
@keyframes hud-rotate {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to   { transform: translate(-50%,-50%) rotate(360deg); }
}

.hud-circle-outer {
    stroke-dasharray: 1700;
    stroke-dashoffset: 1700;
    animation: hud-draw 1.5s ease-out 0.4s forwards;
}
@keyframes hud-draw {
    to { stroke-dashoffset: 0; }
}

/* ----- Lottery ball (chrome sphere) ----- */
.lottery-ball {
    position: relative;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.4) 8%, transparent 22%),
        radial-gradient(circle at 70% 80%, rgba(80,80,104,0.7) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%,
            #f6f6ff 0%,
            #d8d8ee 28%,
            #a0a0b8 55%,
            #707088 78%,
            #404058 100%);
    box-shadow:
        inset -12px -18px 36px rgba(0,0,0,0.35),
        inset  12px  14px 28px rgba(255,255,255,0.55),
        0 24px 60px rgba(60,20,90,0.45),
        0 0 80px rgba(192,132,252,0.35);
    overflow: hidden;
    isolation: isolate;
}

.lottery-ball-hero {
    width: clamp(180px, 28vmin, 280px);
    height: clamp(180px, 28vmin, 280px);
    transform: translateY(-280px);
    opacity: 0;
    animation: ball-drop-in 0.95s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

@keyframes ball-drop-in {
    0%   { transform: translateY(-280px) scale(0.92); opacity: 0; }
    65%  { transform: translateY(20px)  scale(1.04); opacity: 1; }
    82%  { transform: translateY(-8px)  scale(0.99); }
    100% { transform: translateY(0)     scale(1);    opacity: 1; }
}

.ball-rotor {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    perspective: 600px;
    animation: ball-spin-3d 8s linear infinite;
}

@keyframes ball-spin-3d {
    0%   { transform: rotateX(0deg)   rotateY(0deg); }
    50%  { transform: rotateX(180deg) rotateY(20deg); }
    100% { transform: rotateX(360deg) rotateY(0deg); }
}

.ball-number {
    font-size: clamp(54px, 9vw, 110px);
    font-weight: 900;
    background: linear-gradient(180deg,
        #ffffff 0%, #d0d0e0 35%, #707088 55%, #ffffff 70%, #a0a0b8 100%);
    background-size: 100% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.02em;
    animation: chrome-shimmer 5s ease-in-out infinite;
}

.ball-specular {
    position: absolute;
    top: 12%;
    left: 18%;
    width: 32%;
    height: 24%;
    background: radial-gradient(ellipse at center,
        rgba(255,255,255,0.95) 0%,
        rgba(255,255,255,0.5)  35%,
        transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(4px);
}

.ball-chrome-band {
    position: absolute;
    top: 48%;
    left: -4%;
    width: 108%;
    height: 10%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(192,132,252,0.0) 15%,
        rgba(255,255,255,0.55) 35%,
        rgba(34,211,238,0.4) 50%,
        rgba(255,255,255,0.55) 65%,
        rgba(192,132,252,0.0) 85%,
        transparent 100%);
    pointer-events: none;
    transform: rotate(-2deg);
    filter: blur(1px);
    opacity: 0.85;
}

/* Brand title */
.brand {
    font-size: clamp(28px, 5.5vw, 64px);
    letter-spacing: 0.18em;
    display: inline-flex;
    align-items: baseline;
    gap: 0.04em;
    opacity: 0;
    animation: brand-fade 0.8s ease-out 0.9s forwards;
}
.brand-dot {
    background: linear-gradient(180deg, var(--sparkle-gold), #c8a040);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: dot-pulse 2.4s ease-in-out infinite;
    padding: 0 0.05em;
}
@keyframes brand-fade {
    from { opacity: 0; transform: translateY(12px); letter-spacing: 0.4em; }
    to   { opacity: 1; transform: translateY(0);    letter-spacing: 0.18em; }
}
@keyframes dot-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(13px, 1.4vw, 17px);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--chrome-dark);
    opacity: 0;
    animation: brand-fade 0.8s ease-out 1.3s forwards;
    text-align: center;
}

.scroll-indicator {
    position: absolute;
    bottom: clamp(24px, 4vh, 48px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--chrome-dark);
    opacity: 0;
    animation: brand-fade 0.8s ease-out 1.6s forwards,
               scroll-bob 2.4s ease-in-out 1.6s infinite;
}
.scroll-arrow {
    width: 1px;
    height: 36px;
    background: linear-gradient(180deg, var(--chrome-dark), transparent);
}
@keyframes scroll-bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 6px); }
}

/* ============================================================
   SECTION 2  --  THE DRAW
   ============================================================ */
.section-draw {
    background: linear-gradient(180deg, #1a1020 0%, #261438 50%, #1a1020 100%);
    color: var(--chrome-hi);
    overflow: hidden;
}

.draw-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: hud-fade-in 1.5s ease-out 0.2s forwards;
}
.draw-hud svg {
    width: 92%;
    max-width: 1400px;
    height: auto;
    overflow: visible;
}
.draw-hud-shape {
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    animation: hud-draw 1.6s ease-out 0.3s forwards;
}
.draw-scan-arc {
    animation: scan-sweep 4s linear infinite;
}
@keyframes scan-sweep {
    0%   { stroke-dashoffset: 0;   opacity: 0.65; }
    50%  {                          opacity: 1;    }
    100% { stroke-dashoffset: -200; opacity: 0.65; }
}

.section-title {
    font-size: clamp(36px, 6vw, 80px);
    letter-spacing: 0.2em;
    text-align: center;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}
.section-title-draw {
    background: linear-gradient(180deg, #f0d060 0%, #ffffff 30%, #c0c0d8 55%, #f0d060 80%, #a0a0b8 100%);
    background-size: 100% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: chrome-shimmer 6s ease-in-out infinite;
    filter: drop-shadow(0 2px 14px rgba(192,132,252,0.4));
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: clamp(13px, 1.3vw, 16px);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--chrome-mid);
    text-align: center;
    margin-bottom: clamp(40px, 7vh, 80px);
    position: relative;
    z-index: 2;
}
.subtitle-light { color: rgba(224,224,240,0.55); }

.ball-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 3.2vw, 56px);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    padding: clamp(20px, 3vh, 40px) 0;
}

.lottery-ball-draw {
    width: clamp(110px, 14vmin, 180px);
    height: clamp(110px, 14vmin, 180px);
    transform: translateY(-260px) scale(0.85);
    opacity: 0;
}
.lottery-ball-draw .ball-number {
    font-size: clamp(32px, 5vw, 60px);
}
.lottery-ball-center {
    transform: translateY(-260px) scale(0.85);
}

/* Sparkle burst pseudo on each ball */
.ball-burst {
    position: absolute;
    inset: -25%;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle,
        rgba(240,208,96,0.85) 0%,
        rgba(255,255,255,0.5) 25%,
        rgba(192,132,252,0.3) 45%,
        transparent 65%);
    transform: scale(0.4);
}

.ball-row .lottery-ball-draw.dropped { animation: ball-drop-row 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.ball-row .lottery-ball-draw.dropped .ball-burst { animation: ball-burst-fx 0.6s ease-out 0.5s forwards; }

@keyframes ball-drop-row {
    0%   { transform: translateY(-260px) scale(0.85); opacity: 0; }
    65%  { transform: translateY(18px)   scale(1.04); opacity: 1; }
    82%  { transform: translateY(-6px)   scale(0.98); }
    100% { transform: translateY(0)      scale(1);    opacity: 1; }
}
@keyframes ball-burst-fx {
    0%   { opacity: 0;   transform: scale(0.5); }
    35%  { opacity: 0.95; transform: scale(1.4); }
    100% { opacity: 0;   transform: scale(2.2); }
}

.draw-readout {
    margin-top: clamp(30px, 5vh, 60px);
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.5vw, 32px);
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 2;
}
.readout-label {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.32em;
    color: var(--chrome-mid);
}
.readout-value {
    font-family: var(--font-display);
    font-size: clamp(16px, 1.8vw, 22px);
    letter-spacing: 0.16em;
    color: var(--sparkle-gold);
    text-shadow: 0 0 14px rgba(240,208,96,0.55);
}
.redraw-btn {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--chrome-hi);
    background: linear-gradient(135deg,
        rgba(192,132,252,0.25) 0%,
        rgba(34,211,238,0.18) 50%,
        rgba(129,140,248,0.25) 100%);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    padding: 12px 28px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.redraw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(192,132,252,0.4);
    background: linear-gradient(135deg,
        rgba(192,132,252,0.4) 0%,
        rgba(34,211,238,0.3) 50%,
        rgba(129,140,248,0.4) 100%);
}
.redraw-btn:active { transform: translateY(0); }

/* ============================================================
   SECTION 3  --  JACKPOT
   ============================================================ */
.section-jackpot {
    color: var(--deep-purple);
}

.jackpot-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(12px, 2vh, 24px);
}

.jackpot-eyebrow {
    font-family: var(--font-display);
    font-size: clamp(11px, 1.1vw, 14px);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(80,40,20,0.6);
}

.section-title-jackpot {
    background: linear-gradient(180deg,
        #f0d060 0%,
        #fff8d8 25%,
        #c89030 50%,
        #fff0a0 70%,
        #806020 100%);
    background-size: 100% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: chrome-shimmer 5s ease-in-out infinite;
    filter: drop-shadow(0 4px 18px rgba(240,208,96,0.55));
    margin-bottom: 8px;
}

.jackpot-counter-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: clamp(6px, 1vw, 14px);
    margin: clamp(8px, 1.5vh, 20px) 0 clamp(20px, 3vh, 36px);
}
.jackpot-currency {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(48px, 7vw, 96px);
    background: linear-gradient(180deg, #c89030, #f0d060 50%, #806020);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.jackpot-counter {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(60px, 11vw, 160px);
    letter-spacing: 0.04em;
    background: linear-gradient(180deg,
        #fff8d8 0%,
        #f0d060 18%,
        #c89030 38%,
        #ffffff 52%,
        #f0d060 68%,
        #806020 90%,
        #fff8d8 100%);
    background-size: 100% 350%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    animation: counter-chrome-spin 2.5s linear;
    text-shadow: 0 6px 24px rgba(240,208,96,0.4);
}
.jackpot-counter.settled {
    animation: chrome-shimmer 4s ease-in-out infinite;
}

@keyframes counter-chrome-spin {
    0%   { background-position: 0% 0%; }
    100% { background-position: 0% 600%; }
}

.jackpot-meta {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.5vw, 32px);
    flex-wrap: wrap;
    justify-content: center;
    padding: clamp(14px, 2vh, 22px) clamp(18px, 3vw, 36px);
    border: 1px solid rgba(80,40,20,0.18);
    border-radius: 999px;
    background: rgba(255,250,232,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.meta-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.meta-label {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 0.34em;
    color: rgba(80,40,20,0.55);
    text-transform: uppercase;
}
.meta-value {
    font-family: var(--font-display);
    font-size: clamp(13px, 1.4vw, 17px);
    letter-spacing: 0.1em;
    color: var(--deep-purple);
}
.meta-divider {
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, transparent, rgba(80,40,20,0.35), transparent);
}

/* ============================================================
   SECTION 4  --  DRAW HISTORY
   ============================================================ */
.section-history {
    background: radial-gradient(ellipse at 50% 0%, #2a1340 0%, #1a0a2a 50%, #100620 100%);
    color: var(--chrome-hi);
    padding-top: clamp(60px, 9vh, 120px);
    padding-bottom: clamp(60px, 9vh, 120px);
}
.section-title-history {
    background: linear-gradient(180deg, #ffffff 0%, #c084fc 30%, #818cf8 55%, #ffffff 75%, #a0a0b8 100%);
    background-size: 100% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: chrome-shimmer 6s ease-in-out infinite;
}

.timeline {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(32px, 5vh, 60px) 0;
}

.timeline-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(192,132,252,0.4) 8%,
        rgba(34,211,238,0.5)  50%,
        rgba(129,140,248,0.4) 92%,
        transparent 100%);
    box-shadow: 0 0 14px rgba(192,132,252,0.35);
}

.timeline-card {
    position: relative;
    width: 46%;
    margin-bottom: clamp(32px, 5vh, 56px);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.timeline-card[data-side="left"]  { margin-right: auto; padding-right: clamp(20px, 3vw, 36px); text-align: right; }
.timeline-card[data-side="right"] { margin-left: auto;  padding-left:  clamp(20px, 3vw, 36px); text-align: left; }
.timeline-card.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.timeline-dot {
    position: absolute;
    top: 28px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, var(--sparkle-gold) 35%, var(--aurora-violet) 80%);
    box-shadow:
        0 0 0 3px rgba(192,132,252,0.25),
        0 0 16px rgba(240,208,96,0.7);
}
.timeline-card[data-side="left"]  .timeline-dot { right: -7px; }
.timeline-card[data-side="right"] .timeline-dot { left: -7px; }

.timeline-card-inner {
    background: linear-gradient(135deg,
        rgba(255,255,255,0.10) 0%,
        rgba(192,132,252,0.08) 50%,
        rgba(34,211,238,0.10) 100%);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: clamp(18px, 2.5vw, 26px) clamp(20px, 3vw, 32px);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow:
        0 12px 40px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.timeline-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.timeline-date {
    font-family: var(--font-display);
    font-size: clamp(12px, 1.2vw, 14px);
    letter-spacing: 0.24em;
    color: var(--aurora-cyan);
}
.timeline-pot {
    font-family: var(--font-display);
    font-size: clamp(14px, 1.5vw, 18px);
    letter-spacing: 0.06em;
    background: linear-gradient(180deg, #f0d060, #fff8d8 50%, #c89030);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.timeline-numbers {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: inherit;
    margin-bottom: 14px;
}
.timeline-card[data-side="left"]  .timeline-numbers { justify-content: flex-end; }
.timeline-card[data-side="right"] .timeline-numbers { justify-content: flex-start; }

.timeline-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95) 0%, transparent 35%),
        radial-gradient(circle at 50% 60%, #d8d8ee 0%, #707088 70%, #404058 100%);
    color: var(--midnight);
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
    box-shadow:
        inset 0 -2px 4px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.4),
        0 4px 10px rgba(0,0,0,0.3);
    animation: number-osc 3.2s ease-in-out infinite;
    animation-delay: var(--osc-delay, 0s);
}
.timeline-numbers span:nth-child(2) { --osc-delay: 0.2s; }
.timeline-numbers span:nth-child(3) { --osc-delay: 0.4s; }
.timeline-numbers span:nth-child(4) { --osc-delay: 0.6s; }
.timeline-numbers span:nth-child(5) { --osc-delay: 0.8s; }
.timeline-numbers span.bonus {
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95) 0%, transparent 35%),
        radial-gradient(circle at 50% 60%, #fff8d8 0%, #c89030 65%, #806020 100%);
    color: #4a2810;
    --osc-delay: 1.0s;
}
@keyframes number-osc {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(2px); }
}

.timeline-note {
    font-size: clamp(13px, 1.2vw, 15px);
    color: rgba(224,224,240,0.7);
    line-height: 1.5;
}

/* ============================================================
   SECTION 5  --  TONIGHT
   ============================================================ */
.section-tonight {
    color: var(--deep-purple);
}

.tonight-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 3vh, 36px);
    text-align: center;
}

.tonight-eyebrow {
    font-family: var(--font-display);
    font-size: clamp(11px, 1.1vw, 14px);
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(40,20,60,0.55);
}

.countdown {
    display: inline-flex;
    align-items: center;
    gap: clamp(10px, 1.6vw, 22px);
    padding: clamp(20px, 3vh, 32px) clamp(28px, 4vw, 56px);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 24px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow:
        0 16px 48px rgba(60,20,90,0.25),
        inset 0 1px 0 rgba(255,255,255,0.5);
}

.countdown-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: clamp(64px, 9vw, 110px);
}

.countdown-value {
    font-size: clamp(46px, 7vw, 96px);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg,
        #ffffff 0%,
        #e0d0f0 22%,
        #707088 50%,
        #ffffff 65%,
        #c0a0e0 88%,
        #404058 100%);
    background-size: 100% 250%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: chrome-shimmer 4s ease-in-out infinite;
    text-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.18s ease;
}
.countdown-value.tick {
    animation: tick-pulse 0.45s ease-out, chrome-shimmer 4s ease-in-out infinite;
}
@keyframes tick-pulse {
    0%   { transform: scale(1.0); }
    30%  { transform: scale(1.08); }
    100% { transform: scale(1.0); }
}

.countdown-label {
    font-family: var(--font-display);
    font-size: clamp(10px, 1vw, 12px);
    letter-spacing: 0.32em;
    color: rgba(40,20,60,0.55);
    text-transform: uppercase;
}

.countdown-sep {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 700;
    color: var(--aurora-violet);
    text-shadow: 0 0 16px rgba(192,132,252,0.6);
    animation: sep-blink 1s steps(2, end) infinite;
}
@keyframes sep-blink {
    0%, 50%   { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.tonight-tagline {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(13px, 1.4vw, 17px);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(40,20,60,0.7);
}

.signoff {
    margin-top: clamp(20px, 3vh, 36px);
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-display);
    font-size: clamp(11px, 1.1vw, 13px);
    letter-spacing: 0.34em;
    color: rgba(40,20,60,0.55);
    text-transform: uppercase;
}
.signoff-mark {
    color: var(--sparkle-gold);
    font-size: 14px;
    text-shadow: 0 0 10px rgba(240,208,96,0.65);
    animation: dot-pulse 2.4s ease-in-out infinite;
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 760px) {
    .ball-row { gap: 14px; }
    .lottery-ball-draw { width: 22vw; height: 22vw; }
    .lottery-ball-draw .ball-number { font-size: 7vw; }

    .timeline-spine { left: 16px; }
    .timeline-card,
    .timeline-card[data-side="left"],
    .timeline-card[data-side="right"] {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 36px;
        padding-right: 12px;
        text-align: left;
    }
    .timeline-card[data-side="left"]  .timeline-dot,
    .timeline-card[data-side="right"] .timeline-dot { left: 9px; right: auto; }
    .timeline-card[data-side="left"]  .timeline-numbers,
    .timeline-card[data-side="right"] .timeline-numbers { justify-content: flex-start; }

    .countdown { gap: 8px; padding: 18px 18px; }
    .countdown-sep { font-size: 8vw; }
    .jackpot-meta { padding: 14px 16px; }
}

@media (max-width: 460px) {
    .countdown-cell { min-width: 56px; }
    .countdown-label { letter-spacing: 0.24em; }
    .draw-readout { gap: 12px; }
    .redraw-btn { padding: 10px 22px; font-size: 11px; }
}
