:root {
    --gold: #c9a227;
    --gold-2: #e8c547;
    --green: #0d1f14;
    --safe: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
    min-height: 100dvh;
    font-family: "Montserrat", system-ui, sans-serif;
    color: #fff;
    background: var(--green);
}
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 162, 39, 0.22), transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 75%, rgba(26, 58, 40, 0.5), transparent 50%),
        linear-gradient(180deg, #163024 0%, #0d1f14 55%, #07140c 100%);
}
.page {
    width: min(980px, 100%);
    margin: 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 16px calc(32px + var(--safe));
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lang {
    align-self: flex-end;
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.lang a {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: #111;
    background: var(--gold);
    padding: 6px 10px;
    border-radius: 999px;
}
.lang a.dim {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}
.logo {
    width: min(200px, 48vw);
    height: auto;
    border-radius: 14px;
    filter: drop-shadow(0 10px 22px rgba(201, 162, 39, 0.3));
}
.kicker {
    margin-top: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
}
h1 {
    margin-top: 4px;
    font-size: clamp(26px, 7.5vw, 46px);
    font-weight: 900;
    text-align: center;
    letter-spacing: -0.03em;
    line-height: 1;
}
h1 span { color: var(--gold); }
.sub {
    margin-top: 8px;
    max-width: 420px;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(12px, 3.4vw, 14px);
    line-height: 1.45;
    font-weight: 600;
    padding: 0 4px;
}
.jackpot {
    margin-top: 12px;
    width: min(520px, 100%);
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--gold);
    box-shadow: 0 0 28px rgba(201, 162, 39, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
}
.jackpot img {
    width: 100%;
    height: auto;
    max-height: min(42vw, 220px);
    object-fit: cover;
    object-position: center;
    display: block;
}
.jackpot-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    color: #111;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
}
.jackpot-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 12px 10px;
    background: linear-gradient(180deg, transparent, rgba(7, 20, 12, 0.92));
    text-align: center;
}
.jackpot-caption b {
    display: block;
    color: var(--gold);
    font-size: clamp(16px, 4.5vw, 24px);
    font-weight: 900;
}
.jackpot-caption span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    font-weight: 600;
}
.top-prizes {
    margin-top: 10px;
    width: min(480px, 100%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.top-prizes .tp {
    text-align: center;
    padding: 10px 6px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(201, 162, 39, 0.25);
}
.top-prizes .tp.max {
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.22), rgba(255,255,255,0.04));
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.25);
}
.top-prizes .tp b {
    display: block;
    color: var(--gold);
    font-size: clamp(13px, 3.6vw, 20px);
    font-weight: 900;
}
.top-prizes .tp span {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    color: rgba(255,255,255,0.65);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.stage-wrap {
    position: relative;
    margin-top: 14px;
    width: min(520px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.side-arrow {
    flex: 0 0 auto;
    width: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: arrowBounce 1.15s ease-in-out infinite;
}
.side-arrow.right { animation-delay: 0.28s; }
.side-arrow svg {
    width: 34px;
    height: 78px;
    overflow: visible;
    filter:
        drop-shadow(0 0 6px rgba(232, 197, 71, 0.95))
        drop-shadow(0 0 16px rgba(201, 162, 39, 0.75));
}
@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(12px); opacity: 0.7; }
}
.stage {
    position: relative;
    width: min(380px, 70vw);
    aspect-ratio: 1;
    flex: 0 1 auto;
}
.lights {
    position: absolute;
    inset: -8px;
    pointer-events: none;
    z-index: 2;
}
.light {
    position: absolute;
    width: 11px;
    height: 11px;
    margin: -5px;
    border-radius: 50%;
    background: #f0e0a0;
    box-shadow: 0 0 10px var(--gold);
    animation: blink 1.15s ease-in-out infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    z-index: 6;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 32px solid var(--gold);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
}
.pointer::after {
    content: "";
    position: absolute;
    top: -38px;
    left: -7px;
    width: 14px;
    height: 14px;
    background: #fff8dc;
    border: 3px solid #111;
    border-radius: 50%;
}
canvas#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0d1f14;
    box-shadow:
        0 0 0 8px #0a1810,
        0 0 0 13px var(--gold),
        0 18px 40px rgba(0, 0, 0, 0.55);
}
.hub {
    position: absolute;
    inset: 36%;
    z-index: 4;
    border-radius: 50%;
    background: #0d1f14;
    border: 4px solid var(--gold);
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.65), 0 0 18px rgba(201, 162, 39, 0.3);
}
.hub img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.spin-btn {
    margin-top: 22px;
    width: min(320px, 100%);
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111;
    background: linear-gradient(180deg, var(--gold-2), var(--gold) 50%, #a8861a);
    padding: 16px 24px;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(201, 162, 39, 0.35);
}
.spin-wait {
    margin-top: 10px;
    text-align: center;
    color: var(--gold-2);
    font-size: 13px;
    font-weight: 800;
}
.spin-wait[hidden] { display: none; }
.coupon-note {
    margin: 14px auto 0;
    max-width: 420px;
    text-align: center;
    color: #fff8dc;
    background: rgba(201, 162, 39, 0.16);
    border: 1px solid rgba(232, 197, 71, 0.45);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}
.spin-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.spin-btn:active:not(:disabled) { transform: scale(0.98); }
.grid {
    width: 100%;
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
}
.card.top {
    grid-column: 1 / -1;
    border-color: rgba(201, 162, 39, 0.55);
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.18), rgba(255, 255, 255, 0.04));
}
.card b {
    display: block;
    color: var(--gold);
    font-size: 15px;
    font-weight: 900;
}
.card span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 600;
}
.fine {
    margin-top: 18px;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.5;
    max-width: 460px;
}
.fine a { color: var(--gold); }
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: none;
    place-items: center;
    z-index: 20;
    padding: 16px;
}
.overlay.show { display: grid; }
.modal {
    width: min(420px, 100%);
    background: linear-gradient(180deg, #1a3a28, #0d1f14);
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 20px;
    padding: 28px 20px 20px;
    text-align: center;
}
.modal h2 { font-size: 24px; font-weight: 900; }
.prize-name {
    margin: 12px 0 8px;
    color: var(--gold);
    font-size: 20px;
    font-weight: 800;
}
.modal p { color: rgba(255, 255, 255, 0.72); font-size: 14px; line-height: 1.5; }
.claim-code {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed var(--gold);
    background: rgba(201, 162, 39, 0.12);
}
.claim-code small {
    display: block;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}
.claim-code strong {
    display: block;
    margin-top: 4px;
    font-size: 28px;
    letter-spacing: 0.18em;
    color: var(--gold-2);
}
.claim-form input {
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
}
.claim-form button {
    margin-top: 12px;
}
.claim-error {
    margin-top: 8px;
    color: #ffb4b4;
    font-size: 13px;
    font-weight: 700;
}
.wa-btn {
    display: block;
    margin-top: 12px;
    padding: 14px;
    border-radius: 999px;
    background: #25D366;
    color: #083018;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
}
.wa-btn[hidden], .claim-form[hidden], .claim-code[hidden] {
    display: none !important;
}
.modal button {
    margin-top: 18px;
    width: 100%;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    padding: 14px;
    border-radius: 999px;
    background: var(--gold);
    color: #111;
    font-size: 16px;
}
canvas#confetti {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 30;
}
@media (max-width: 420px) {
    .page { padding-left: 12px; padding-right: 12px; }
    .side-arrow { width: 26px; }
    .side-arrow svg { width: 26px; height: 64px; }
    .stage { width: min(300px, 68vw); }
    .spin-btn { font-size: 14px; letter-spacing: 0.06em; padding: 14px 16px; }
}
@media (min-width: 720px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .stage { width: min(420px, 90vw); }
    .jackpot img { max-height: 260px; }
    .logo { width: min(220px, 48vw); }
}
