/* Tokens copied from rolly.io CSS (see rolly_1_brand_core/brand/brand.md) */
@font-face { font-family: Rubik; src: url(assets/fonts/Rubik_latin-normal.woff2) format('woff2'); font-weight: 300 900; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: Rubik; src: url(assets/fonts/Rubik_cyrillic-normal.woff2) format('woff2'); font-weight: 300 900; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Saira; src: url(assets/fonts/Saira_latin-normal.woff2) format('woff2'); font-weight: 100 900; }

:root {
  --brand: #F5FF00;
  --brand-dark: #C9D200;
  --bg: #0C102D;
  --bg-2: #0D1638;
  --level2: #1D213D;
  --azure: #0076FF;
  --ultra: #000DFF;
  --green: #76FF00;
  --white: #FFFFFF;
  --line: #E5EAF429;
  --muted: #E5EAF4B8;
  --soft: #E5EAF414;
  /* VIP gold from the ranks gradient */
  --gold-1: #FAD12B;
  --gold-2: #D28401;
  --gold-3: #743B01;
  --display: Saira, Rubik, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(120% 60% at 50% 30%, #131C55 0%, var(--bg) 60%, #070A1E 100%) fixed, var(--bg);
  color: var(--white);
  font-family: Rubik, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}
img { -webkit-user-drag: none; }

/* ---------- ambient background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.glow--a { width: 360px; height: 360px; background: var(--ultra); opacity: .5; top: 150px; left: -180px; animation: drift 9s ease-in-out infinite; }
.glow--b { width: 320px; height: 320px; background: #242EFF; opacity: .4; bottom: -60px; right: -160px; animation: drift 11s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: translate(40px, -30px) scale(1.15); } }
.spot {
  position: absolute; top: -40px; width: 140px; height: 120vh; opacity: .16; filter: blur(8px);
  background: linear-gradient(180deg, #F5FF00, transparent 70%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
}
.spot--l { left: 0; transform-origin: 50% 0; animation: sweepL 6s ease-in-out infinite; }
.spot--r { right: 0; transform-origin: 50% 0; animation: sweepR 7s ease-in-out infinite; background: linear-gradient(180deg, #0076FF, transparent 70%); opacity: .22; }
@keyframes sweepL { 0%, 100% { transform: rotate(-28deg); } 50% { transform: rotate(-8deg); } }
@keyframes sweepR { 0%, 100% { transform: rotate(26deg); } 50% { transform: rotate(6deg); } }
.float { position: absolute; opacity: .85; filter: drop-shadow(0 10px 20px #000A); }
.float--1 { width: 86px; top: 46%; left: -26px; animation: bob 5s ease-in-out infinite; }
.float--2 { width: 70px; top: 18%; right: -14px; animation: bob 6s ease-in-out infinite -2s; }
.float--3 { width: 64px; bottom: 9%; right: 6px; animation: bob 4.5s ease-in-out infinite -1s; }
.float--4 { width: 54px; bottom: 22%; left: 8px; opacity: .6; animation: bob 7s ease-in-out infinite -3s; }
@keyframes bob { 50% { transform: translateY(-16px) rotate(8deg); } }
.sparkles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- layout ---------- */
.app {
  position: relative; z-index: 1;
  max-width: 440px; margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
}
.app.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-7px, 3px) rotate(-.6deg); } 40%, 60% { transform: translate(7px, -3px) rotate(.6deg); }
}

.top { width: 100%; display: flex; align-items: center; gap: 8px; }
.logo { height: 20px; }
.beta {
  height: 20px; padding: 0 8px; display: inline-flex; align-items: center;
  background: var(--azure); border: 1px solid #E5EAF40A; border-radius: 4px;
  font: 500 12px/16px Rubik, sans-serif;
}
.sound {
  margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--soft); color: var(--white); font-size: 16px; cursor: pointer;
}

.hero { width: 100%; display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.mascot { width: 116px; flex: none; margin-left: -10px; filter: drop-shadow(0 8px 24px #000DFF88); animation: mascotIdle 3s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes mascotIdle { 50% { transform: translateY(-4px) rotate(-2deg); } }
.mascot.hype { animation: mascotHype .35s ease-in-out infinite; }
@keyframes mascotHype { 50% { transform: translateY(-6px) rotate(4deg) scale(1.04); } }
.mascot.jump { animation: mascotJump .7s cubic-bezier(.3,1.6,.5,1) 2; }
@keyframes mascotJump { 40% { transform: translateY(-26px) rotate(-8deg) scale(1.1); } }

.eyebrow { margin: 0 0 4px; display: flex; align-items: center; gap: 6px; color: var(--brand); font: 600 12px/16px Rubik, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow--center { justify-content: center; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 #76FF0099; animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px #76FF0000; } }
h1 { margin: 0; font: 900 26px/1.02 var(--display); text-transform: uppercase; font-style: italic; text-shadow: 0 3px 0 #000DFF, 0 0 24px #000DFF; }
h1 em { font-style: italic; color: var(--brand); text-shadow: 0 3px 0 #6B7000, 0 0 24px #F5FF0088; }

/* ---------- game slot ---------- */
.game { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; margin-top: 18px; }
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* ---------- spin tokens ---------- */
.tokens { display: flex; align-items: center; gap: 8px; height: 34px; margin: 14px 0 10px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tokens img { width: 30px; height: 30px; filter: drop-shadow(0 0 8px #6591FF); }
.tokens img.new { animation: tokenIn .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes tokenIn { from { transform: scale(0) rotate(-180deg); } }

/* ---------- 3D CTA ---------- */
.cta {
  position: relative; overflow: hidden; width: 100%; height: 64px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #FDFF9E 0%, var(--brand) 38%, var(--brand-dark) 100%);
  color: var(--bg); font: 900 21px var(--display); font-style: italic; text-transform: uppercase; letter-spacing: .04em;
  box-shadow: 0 6px 0 #7E8500, 0 10px 26px #F5FF0055, inset 0 2px 0 #FFFFFFAA;
  transition: transform .08s, box-shadow .08s, filter .2s;
}
.cta:active { transform: translateY(5px); box-shadow: 0 1px 0 #7E8500, 0 4px 14px #F5FF0055, inset 0 2px 0 #FFFFFFAA; }
.cta:disabled { filter: saturate(.4) brightness(.7); cursor: default; }
.cta:not(:disabled) { animation: ctaPulse 1.4s ease-in-out infinite; }
@keyframes ctaPulse { 50% { box-shadow: 0 6px 0 #7E8500, 0 0 0 7px #F5FF0026, 0 10px 44px #F5FF00AA, inset 0 2px 0 #FFFFFFAA; } }
.cta__label { position: relative; z-index: 1; }
.cta__shine {
  position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, #FFFFFFCC, transparent);
  animation: shine 2.6s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { left: -40%; } 100% { left: 130%; } }
.cta--claim { margin-top: 2px; }

.tap-hint { position: relative; height: 0; width: 100%; pointer-events: none; }
.tap-hint.show::before {
  content: '👆'; position: absolute; right: 18%; top: -26px; font-size: 34px;
  animation: tap 1.1s ease-in-out infinite; filter: drop-shadow(0 4px 6px #000a);
}
@keyframes tap { 50% { transform: translate(-4px, -10px) scale(.9); } }

.trust { list-style: none; padding: 0; margin: 20px 0 0; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trust li {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #1D213DCC; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 6px; text-align: center; font-size: 11px; line-height: 14px; color: var(--muted);
}
.trust b { font: 900 16px var(--display); font-style: italic; color: var(--brand); }
.legal { margin: 16px 0 0; text-align: center; font-size: 11px; color: #E5EAF48F; }

/* ---------- effects ---------- */
.flash { position: fixed; inset: 0; z-index: 30; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .5s ease-out; }
.flash.go-yellow { background: var(--brand); animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.rain { position: fixed; inset: 0; z-index: 25; width: 100%; height: 100%; pointer-events: none; }

.banner { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; align-content: center; pointer-events: none; background: radial-gradient(circle, #0C102DAA, #0C102DEE 70%); animation: fade .25s; }
.banner[hidden] { display: none; }
.banner__rays {
  position: absolute; left: 50%; top: 50%; width: 180vmax; height: 180vmax; margin: -90vmax;
  background: repeating-conic-gradient(from 0deg, #F5FF0030 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 5%, transparent 40%); mask: radial-gradient(circle, #000 5%, transparent 40%);
  animation: spinSlow 8s linear infinite;
}
.banner__text {
  position: relative; font: 900 64px/0.95 var(--display); font-style: italic; text-transform: uppercase; text-align: center;
  background: linear-gradient(180deg, #FFFDE0 0%, var(--brand) 40%, var(--gold-1) 60%, var(--gold-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #3A2200) drop-shadow(0 0 24px #F5FF00AA);
  animation: slam .6s cubic-bezier(.2,1.5,.4,1);
}
.banner--blue .banner__text { background-image: linear-gradient(180deg, #fff, #6591FF 50%, #0076FF); filter: drop-shadow(0 4px 0 #000D7A) drop-shadow(0 0 24px #0076FFAA); }
.banner--blue .banner__rays { background: repeating-conic-gradient(from 0deg, #0076FF40 0 6deg, transparent 6deg 18deg); }
.banner__sub {
  position: relative; margin-top: 12px; padding: 8px 18px; border-radius: 999px;
  background: var(--azure); font: 800 18px var(--display); font-style: italic; text-transform: uppercase;
  box-shadow: 0 0 24px #0076FFAA; animation: slam .6s .18s cubic-bezier(.2,1.5,.4,1) backwards;
}
.banner__sub:empty { display: none; }
@keyframes slam { 0% { transform: scale(3.2); opacity: 0; filter: blur(10px); } 60% { opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- bonus modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 22; display: grid; place-items: center; padding: 16px;
  background: #0C102DE6; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .3s;
}
.modal[hidden] { display: none; }
.modal__card {
  position: relative; overflow: hidden; isolation: isolate; width: 100%; max-width: 400px; padding: 22px 18px 16px;
  text-align: center; border-radius: 18px;
  background: radial-gradient(120% 70% at 50% 0%, #000DFF77, transparent 70%), var(--level2);
  animation: cardIn .7s cubic-bezier(.2,1.3,.4,1);
}
/* animated gold border */
.modal__card::before {
  content: ''; position: absolute; inset: -60%; z-index: -2;
  background: conic-gradient(var(--gold-1), var(--brand), var(--gold-3), var(--gold-1), #FFF2A6, var(--gold-2), var(--gold-1));
  animation: spinSlow 4s linear infinite;
}
.modal__card::after { content: ''; position: absolute; inset: 2px; z-index: -1; border-radius: 16px; background: radial-gradient(120% 70% at 50% 0%, #1A2380, transparent 70%), var(--level2); }
@keyframes cardIn { 0% { transform: perspective(800px) rotateX(70deg) scale(.6); opacity: 0; } 100% { transform: none; } }
.modal__rays {
  position: absolute; left: 50%; top: 110px; width: 520px; height: 520px; margin: -260px; z-index: -1;
  background: repeating-conic-gradient(from 0deg, #F5FF0026 0 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 55%); mask: radial-gradient(circle, #000 10%, transparent 55%);
  animation: spinSlow 12s linear infinite;
}
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.gift { position: relative; width: 150px; margin: 4px auto 6px; display: block; filter: drop-shadow(0 10px 30px #000DFFAA); animation: giftIn .9s cubic-bezier(.2,1.6,.4,1), float 2.4s ease-in-out .9s infinite; }
@keyframes giftIn { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.15) rotate(6deg); } }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
h2 { margin: 0; font: 900 32px/1.02 var(--display); font-style: italic; text-transform: uppercase; }
.shimmer {
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand) 40%, #FFFFFF 50%, var(--brand) 60%, var(--brand) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #4A4F00) drop-shadow(0 0 18px #F5FF0066);
  animation: shimmer 2.4s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.muted { margin: 8px 0 14px; color: var(--muted); font-size: 14px; }

.code {
  width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  padding: 10px 14px; border: 2px dashed var(--brand); border-radius: 12px; background: #0C102DAA;
  color: var(--white); font-family: inherit; text-align: left; cursor: pointer;
  animation: codeGlow 1.8s ease-in-out infinite;
}
@keyframes codeGlow { 50% { box-shadow: 0 0 22px #F5FF0055; } }
.code__label { grid-column: 1; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.code__value { grid-column: 1; font: 800 22px var(--display); letter-spacing: .08em; }
.code__copy { grid-column: 2; grid-row: 1 / 3; padding: 6px 10px; border-radius: 8px; background: var(--brand); color: var(--bg); font-size: 12px; font-weight: 700; text-transform: uppercase; }

.timer { margin: 12px 0; font-size: 13px; color: var(--muted); }
.terms { margin: -4px 0 12px; font-size: 11px; line-height: 15px; color: #E5EAF48F; }
.terms:empty { display: none; }
.timer b { display: inline-block; min-width: 54px; padding: 2px 6px; border-radius: 6px; background: #FF003629; color: #FF5C7A; font-variant-numeric: tabular-nums; }

.btn {
  width: 100%; height: 44px; margin-top: 10px; padding: 0 20px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  font: 600 14px Rubik, sans-serif; text-transform: uppercase; letter-spacing: .04em;
}
.btn--secondary { background: var(--soft); color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  .app.shake, .spot, .float, .halo, .banner__rays, .modal__rays, .cta__shine { animation: none !important; }
}
