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

:root {
    --gold: #f5a623;
    --gold-light: #ffd700;
    --purple: #6c2bd9;
    --purple-dark: #1a0a3e;
    --green: #00e676;
    --red: #ff1744;
    --bg-dark: #0a0a1a;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(10,10,26,0.40) 0%,
            rgba(10,10,26,0.60) 30%,
            rgba(10,10,26,0.85) 70%,
            rgba(10,10,26,0.95) 100%),
        url('bg-image.png') center top / cover no-repeat;
    z-index: -2;
}

.bg-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(108, 43, 217, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(245, 166, 35, 0.10) 0%, transparent 50%);
    z-index: -1;
}

/* Header */
header {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 26, 0.7);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 24px;
    color: var(--gold);
    line-height: 1;
}

.brand-name {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
}

.brand-accent {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px 12px;
}

.badge-flag { font-size: 16px; line-height: 1; }

.badge-text {
    font-size: 10px;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Above-fold */
.above-fold {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 24px 20px;
    min-height: calc(100vh - 100px);
}

.hero-col {
    flex: 1;
    max-width: 480px;
}

/* Timer */
.timer-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 23, 68, 0.18);
    border: 2px solid rgba(255, 23, 68, 0.4);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 10px;
    width: fit-content;
    animation: timer-pulse 1s infinite;
}

.timer-bar strong {
    color: #ff4466;
    font-variant-numeric: tabular-nums;
    font-size: 16px;
    text-shadow: 0 0 8px rgba(255, 23, 68, 0.6);
}

.timer-icon { font-size: 16px; }

@keyframes timer-pulse {
    0%, 100% {
        border-color: rgba(255, 23, 68, 0.4);
        box-shadow: 0 0 6px rgba(255, 23, 68, 0.15);
        background: rgba(255, 23, 68, 0.18);
    }
    50% {
        border-color: rgba(255, 68, 102, 0.8);
        box-shadow: 0 0 20px rgba(255, 23, 68, 0.4), 0 0 40px rgba(255, 23, 68, 0.15);
        background: rgba(255, 23, 68, 0.25);
    }
}

/* Jackpot badge */
.jackpot-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid rgba(255, 23, 68, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255, 23, 68, 0); }
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
    animation: dot-pulse 1.5s infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

h1 {
    font-size: clamp(26px, 3.5vw, 44px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.hero-sub strong { color: var(--gold); }

/* Unified icon rows */
.icon-section { margin-bottom: 12px; }

.icon-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
    margin-bottom: 5px;
}

.icon-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* All icons: same circle style */
.coin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.2s;
    overflow: hidden;
}

.coin-icon:hover { transform: scale(1.12); }

.coin-icon img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Payment brand icons (simple-icons = mono, need bg + white filter) */
.coin-icon.ci-brand img {
    width: 16px;
    height: 16px;
    border-radius: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.ci-visa { background: #1A1F71; }
.ci-mc { background: #EB001B; }
.ci-apple { background: #000; }
.ci-google { background: #4285F4; }

.benefit-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.benefit-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Wheel */
.wheel-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.wheel-glow {
    position: absolute;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(108, 43, 217, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    pointer-events: none;
}

.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
}

#wheelCanvas {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 40px rgba(108, 43, 217, 0.4));
}

.wheel-pointer {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 32px solid var(--gold);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    z-index: 10;
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    top: -36px;
    left: -9px;
    width: 18px;
    height: 18px;
    background: var(--gold-light);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: var(--gold);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 0 30px rgba(108, 43, 217, 0.5), inset 0 0 20px rgba(108, 43, 217, 0.3);
    transition: all 0.3s;
    z-index: 5;
}

.spin-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 50px rgba(108, 43, 217, 0.7), inset 0 0 30px rgba(108, 43, 217, 0.4);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translate(-50%, -50%);
}

.spins-left {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.spins-left strong { color: var(--green); }

/* First spin win badge — floats over the wheel */
.win-badge-wrap {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
}

.win-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 50, 25, 0.9);
    border: 2px solid var(--green);
    border-radius: 24px;
    padding: 7px 18px;
    font-size: 14px;
    font-weight: 800;
    color: var(--green);
    white-space: nowrap;
    backdrop-filter: blur(10px);
    animation: win-badge-in 0.5s cubic-bezier(0.16, 1, 0.3, 1), win-badge-glow 1.2s ease-in-out 0.5s infinite;
}

@keyframes win-badge-in {
    from { opacity: 0; transform: scale(0.3) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes win-badge-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 230, 118, 0.2); }
    50% { box-shadow: 0 0 24px rgba(0, 230, 118, 0.5), 0 0 48px rgba(0, 230, 118, 0.15); }
}

/* Popup */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-overlay.active { display: flex; }

.popup {
    background: linear-gradient(160deg, #1a1040, #0d0820);
    border: 1px solid rgba(245, 166, 35, 0.2);
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: popup-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popup-in {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.popup h2 {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.prize-display {
    font-size: 34px;
    font-weight: 900;
    color: var(--green);
    margin: 10px 0;
    text-shadow: 0 0 30px rgba(0, 230, 118, 0.4);
}

.prize-sub {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.claim-form { display: flex; flex-direction: column; gap: 8px; }
.form-row { display: flex; gap: 8px; }
.form-row input { flex: 1; }

.claim-form input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 11px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color 0.3s;
}

.claim-form input::placeholder { color: rgba(255, 255, 255, 0.3); }
.claim-form input:focus { border-color: var(--gold); }

.claim-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--gold), #e6941e);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
}

.claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 166, 35, 0.4);
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    cursor: pointer;
}

.consent-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    min-width: 14px;
    margin-top: 2px;
    accent-color: var(--gold);
    cursor: pointer;
}

.consent-label span {
    font-size: 9px;
    color: rgba(255,255,255,0.35);
    line-height: 1.4;
}

.terms-text {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 10px;
    line-height: 1.4;
}

.terms-text a {
    color: rgba(255,255,255,0.35);
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer p {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 2px;
}

.footer-disclaimer {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.18);
    max-width: 500px;
    margin: 2px auto 0;
    line-height: 1.4;
}

#confettiCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Mobile */
@media (max-width: 768px) {
    header { padding: 10px 16px; }

    .header-inner { gap: 10px; }

    .brand-logo { gap: 5px; min-width: 0; flex-shrink: 1; overflow: hidden; }
    .brand-name { font-size: 15px; letter-spacing: 0.5px; white-space: nowrap; }
    .brand-icon { font-size: 18px; flex-shrink: 0; }

    .header-badge { padding: 4px 8px; flex-shrink: 0; gap: 4px; }
    .badge-flag { font-size: 13px; }
    .badge-text { font-size: 8px; white-space: nowrap; }

    /* Reorder: hero-top, wheel, hero-bottom */
    .above-fold {
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px 10px;
        min-height: auto;
        text-align: center;
    }

    .hero-col {
        max-width: 100%;
        display: contents;
    }

    .hero-top { order: 1; }
    .wheel-col { order: 2; }
    .hero-bottom { order: 3; }

    .timer-bar {
        margin: 0 auto 8px;
        font-size: 12px;
        padding: 7px 14px;
    }
    .timer-bar strong { font-size: 15px; }
    .timer-icon { font-size: 15px; }

    .jackpot-badge { margin-bottom: 8px; font-size: 9px; padding: 3px 10px; }

    .icon-row, .benefit-row { justify-content: center; }

    h1 { font-size: 24px; margin-bottom: 6px; }
    .hero-sub { font-size: 13px; margin-bottom: 0; }

    .icon-section { margin-bottom: 8px; }
    .icon-label { font-size: 8px; margin-bottom: 4px; }

    .coin-icon { width: 36px; height: 36px; }
    .coin-icon img { width: 36px; height: 36px; }
    .coin-icon.ci-brand img { width: 16px; height: 16px; }

    .icon-row { gap: 8px; }

    .benefit-row { gap: 5px; }
    .benefit-pill { font-size: 10px; padding: 3px 10px; }

    .wheel-glow { width: 320px; height: 320px; }

    .wheel-container { width: 300px; height: 300px; }

    .wheel-pointer {
        top: -12px;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 24px solid var(--gold);
    }

    .wheel-pointer::after {
        top: -28px;
        left: -7px;
        width: 14px;
        height: 14px;
    }

    .spin-btn { width: 56px; height: 56px; font-size: 11px; }

    .spins-left { margin-top: 8px; font-size: 12px; }

    .win-badge { font-size: 12px; padding: 5px 14px; }

    .popup { padding: 20px 16px; }
    .prize-display { font-size: 26px; }
    .form-row { flex-direction: column; }

    footer { padding: 10px 14px; }
}
