/* ========================================
   lottery.day - McBling Lottery Spectacle
   Palette: #f0e8f4, #f4e8c0, #1a0a2a, #1a1020,
            #e0e0f0, #a0a0b8, #505068, #c084fc,
            #818cf8, #22d3ee, #a78bfa, #f0d060, #ffffff
   ======================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.6;
    color: #e0e0f0;
    background: #1a0a2a;
    overflow-x: hidden;
}

/* ========================================
   Aurora Underlayer
   ======================================== */
#aurora-underlayer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background: linear-gradient(
        135deg,
        #c084fc 0%,
        #818cf8 25%,
        #22d3ee 50%,
        #a78bfa 75%,
        #c084fc 100%
    );
    background-size: 400% 400%;
    animation: auroraShift 12s ease infinite;
}

@keyframes auroraShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* ========================================
   Sparkle Particles Container
   ======================================== */
#sparkle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f0d060, #a0a0b8);
    opacity: 0;
    animation: sparkleFloat linear infinite;
}

@keyframes sparkleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0.3);
        opacity: 0;
    }
    10% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-20vh) translateX(50px) scale(0.8);
        opacity: 0;
    }
}

/* ========================================
   Section Base
   ======================================== */
.section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.section-dark {
    background: #1a1020;
}

.section-purple {
    background: #1a0a2a;
}

/* ========================================
   Frost Overlays
   ======================================== */
.frost-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 232, 244, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1;
}

.golden-frost {
    background: rgba(244, 232, 192, 0.7);
}

/* ========================================
   Chrome Text Effect
   ======================================== */
.chrome-text {
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #e0e0f0 20%,
        #a0a0b8 40%,
        #e0e0f0 60%,
        #505068 80%,
        #e0e0f0 100%
    );
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: chromeShimmer 4s ease infinite;
}

@keyframes chromeShimmer {
    0% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

/* ========================================
   Section Titles
   ======================================== */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    font-size: clamp(24px, 4vw, 48px);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 3vh;
    text-align: center;
}

/* ========================================
   SECTION 1: Hero
   ======================================== */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;
}

.brand-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    font-size: clamp(24px, 4vw, 48px);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 400ms ease forwards 800ms;
}

.brand-tagline {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: clamp(14px, 1.8vw, 20px);
    color: #505068;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 400ms ease forwards 1200ms;
}

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

/* ========================================
   Lottery Ball (Shared)
   ======================================== */
.lottery-ball {
    position: relative;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #e0e0f0 0%, #a0a0b8 50%, #505068 100%);
    box-shadow:
        0 8px 32px rgba(26, 10, 42, 0.4),
        inset 0 2px 8px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(192, 132, 252, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ball-specular {
    position: absolute;
    top: 12%;
    left: 22%;
    width: 30%;
    height: 25%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    pointer-events: none;
}

.ball-chrome-band {
    position: absolute;
    top: 42%;
    left: 5%;
    width: 90%;
    height: 16%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(224, 224, 240, 0.4) 30%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(224, 224, 240, 0.4) 70%,
        transparent 100%
    );
    border-radius: 50%;
    pointer-events: none;
}

.ball-number {
    position: relative;
    z-index: 2;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #1a0a2a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    perspective: 600px;
}

/* Hero Ball Specifics */
.hero-ball {
    width: 200px;
    height: 200px;
    animation: heroDropBounce 800ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: translateY(-200px);
}

.hero-ball .ball-number {
    font-size: clamp(48px, 10vw, 100px);
}

.hero-ball .kinetic-number {
    display: inline-block;
    animation: rotate3D 8s linear infinite;
}

@keyframes heroDropBounce {
    0% {
        transform: translateY(-200px);
        opacity: 0;
    }
    60% {
        transform: translateY(10px);
        opacity: 1;
    }
    80% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes rotate3D {
    from {
        transform: rotateX(0deg);
    }
    to {
        transform: rotateX(360deg);
    }
}

/* ========================================
   SECTION 2: The Draw
   ======================================== */
.draw-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.draw-balls {
    display: flex;
    gap: clamp(12px, 3vw, 40px);
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    padding: 0 20px;
}

.draw-ball {
    width: clamp(80px, 12vw, 140px);
    height: clamp(80px, 12vw, 140px);
    opacity: 0;
    transform: translateY(-200px);
}

.draw-ball .ball-number {
    font-size: clamp(24px, 4vw, 48px);
}

.draw-ball.animate-in {
    animation: ballDrop 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes ballDrop {
    0% {
        transform: translateY(-200px);
        opacity: 0;
    }
    60% {
        transform: translateY(8px);
        opacity: 1;
    }
    80% {
        transform: translateY(-4px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Sparkle burst on ball landing */
.sparkle-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 208, 96, 0.6) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
}

.sparkle-burst.active {
    animation: sparkleBurstAnim 300ms ease-out forwards;
}

@keyframes sparkleBurstAnim {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 250%;
        height: 250%;
        opacity: 0;
    }
}

/* HUD Overlay */
.hud-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 800px);
    height: min(60vh, 400px);
    z-index: 1;
    pointer-events: none;
}

.hud-svg {
    width: 100%;
    height: 100%;
}

.hud-circle {
    fill: none;
    stroke: #818cf8;
    stroke-width: 1;
    opacity: 0.3;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.hud-circle.animate-hud {
    animation: hudDraw 1.2s ease forwards;
}

.hud-circle-2 {
    stroke: #22d3ee;
    stroke-dasharray: 1100;
    stroke-dashoffset: 1100;
}

.hud-circle-3 {
    stroke: #a78bfa;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.hud-circle-2.animate-hud {
    animation-delay: 0.2s;
}

.hud-circle-3.animate-hud {
    animation-delay: 0.4s;
}

@keyframes hudDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.hud-line {
    stroke: #22d3ee;
    stroke-width: 1;
    opacity: 0.25;
}

/* ========================================
   SECTION 3: Jackpot
   ======================================== */
.jackpot-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.jackpot-amount {
    display: flex;
    align-items: baseline;
    gap: 0.05em;
}

.dollar-sign {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 72px);
}

.jackpot-number {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 10vw, 140px);
    background-size: 100% 300%;
    animation: jackpotChromeShift 3s ease infinite;
}

@keyframes jackpotChromeShift {
    0% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

.jackpot-label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 3vw, 36px);
    letter-spacing: 0.3em;
    color: #505068;
    margin-top: 1vh;
}

.jackpot-sparkle-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 208, 96, 0.5) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
}

.jackpot-sparkle-burst.active {
    animation: jackpotBurst 600ms ease-out forwards;
}

@keyframes jackpotBurst {
    0% {
        width: 0;
        height: 0;
        opacity: 0.7;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

/* ========================================
   SECTION 4: History
   ======================================== */
.history-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-height: 100vh;
    padding: 6vh 0;
    overflow-y: auto;
}

.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
    padding: 2vh 0;
    width: min(90vw, 500px);
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #818cf8, #22d3ee, #a78bfa, transparent);
    opacity: 0.3;
    transform: translateX(-50%);
}

.timeline-entry {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.frost-card {
    background: rgba(240, 232, 244, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: clamp(16px, 2vw, 24px);
    text-align: center;
}

.card-date {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: clamp(12px, 1.2vw, 15px);
    color: #a0a0b8;
    margin-bottom: 1vh;
    letter-spacing: 0.05em;
}

.card-numbers {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1vh;
}

.mini-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(32px, 4vw, 44px);
    height: clamp(32px, 4vw, 44px);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.7) 0%, transparent 50%),
        radial-gradient(circle, #e0e0f0 0%, #a0a0b8 60%, #505068 100%);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(11px, 1.2vw, 14px);
    color: #1a0a2a;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(26, 10, 42, 0.3);
    animation: miniOscillate 3s ease-in-out infinite;
}

.mini-ball:nth-child(2) { animation-delay: 0.3s; }
.mini-ball:nth-child(3) { animation-delay: 0.6s; }
.mini-ball:nth-child(4) { animation-delay: 0.9s; }
.mini-ball:nth-child(5) { animation-delay: 1.2s; }

@keyframes miniOscillate {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

.card-prize {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 24px);
    background: linear-gradient(180deg, #f0d060, #e0e0f0, #f0d060);
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: chromeShimmer 3s ease infinite;
}

/* ========================================
   SECTION 5: Tonight - Countdown
   ======================================== */
.tonight-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2vh;
}

.tonight-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: clamp(16px, 2vw, 22px);
    color: #505068;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.countdown {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 10vw, 120px);
    line-height: 1;
}

.countdown-separator {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 80px);
    line-height: 1;
    animation: blinkSep 1s step-end infinite;
}

@keyframes blinkSep {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.countdown-label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: clamp(10px, 1.2vw, 14px);
    letter-spacing: 0.15em;
    color: #a0a0b8;
    margin-top: 0.5vh;
}

.tonight-footer {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 18px);
    color: #505068;
    letter-spacing: 0.05em;
    margin-top: 2vh;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 600px) {
    .hero-ball {
        width: 150px;
        height: 150px;
    }

    .draw-balls {
        gap: 10px;
    }

    .draw-ball {
        width: 60px;
        height: 60px;
    }

    .draw-ball .ball-number {
        font-size: 18px;
    }

    .countdown {
        gap: 8px;
    }
}
