/* Капча BeyWins: синий градиент, крупный заголовок, стеклянные карточки, кнопки «жидкое стекло».
   Шрифты лежат на нашем сервере (static/fonts) — к Google страница не обращается. */

@font-face {
  font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/oswald-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/oswald-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/static/fonts/montserrat-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/static/fonts/montserrat-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue-0: #0b4dff;
  --blue-1: #1a7bff;
  --ink: #0d47e0;
  --white: #ffffff;
  --glass-edge: rgba(255, 255, 255, .55);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  position: relative; min-height: 100dvh; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: max(28px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  color: var(--white); font-family: Montserrat, system-ui, sans-serif;
  background:
    radial-gradient(60% 40% at 85% 0%, rgba(120, 230, 255, .75), transparent 70%),
    radial-gradient(70% 50% at 0% 100%, rgba(10, 60, 255, .9), transparent 70%),
    linear-gradient(160deg, var(--blue-1) 0%, var(--blue-0) 55%, #0a3fe0 100%);
  background-color: var(--blue-0);
  -webkit-tap-highlight-color: transparent;
}
/* световые лучи */
body::before {
  content: ""; position: fixed; inset: -20% -40%; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 80px, rgba(255, 255, 255, .06) 80px 140px, transparent 140px 260px);
  filter: blur(18px);
}
/* стеклянные кубики-декор в углах */
.deco { position: fixed; width: 120px; height: 120px; border-radius: 26px; pointer-events: none;
        background: linear-gradient(145deg, rgba(255,255,255,.35), rgba(120,220,255,.08));
        border: 1px solid rgba(255,255,255,.35); filter: blur(1.5px); opacity: .7; }
.deco.a { top: 4%; right: -34px; transform: rotate(18deg); }
.deco.b { bottom: 12%; left: -48px; width: 150px; height: 150px; transform: rotate(-22deg); opacity: .45; }

.wrap { position: relative; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; }
[hidden] { display: none !important; }

/* ---- заголовок ---- */
.title { position: relative; width: 100%; margin: 6px 0 0; text-align: center; }
.title h1 {
  margin: 0; font-family: Oswald, "Arial Narrow", sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(56px, 19vw, 112px); line-height: .86; letter-spacing: -.01em;
  text-shadow: 0 6px 30px rgba(0, 30, 140, .25);
}
.chip {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%) rotate(-6deg);
  padding: 8px 22px; border-radius: 999px; font-weight: 900; font-size: 15px; letter-spacing: .14em;
  color: var(--ink); background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(220,235,255,.8));
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: inset 0 -3px 8px rgba(13,71,224,.15), 0 8px 24px rgba(0,40,160,.3);
}

/* ---- стеклянная карточка с текстом ---- */
.card {
  position: relative; z-index: 1; margin: 16px 6px 0; padding: 18px 22px; border-radius: 34px;
  transform: rotate(-4deg); text-align: center;
  background: linear-gradient(160deg, rgba(255,255,255,.34), rgba(255,255,255,.1));
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 18px 40px rgba(0, 30, 150, .28);
}
.card p { margin: 0; font-weight: 800; font-size: 16px; line-height: 1.35; text-shadow: 0 1px 8px rgba(0,40,160,.25); }

/* ---- кубик ---- */
.stage {
  position: relative; width: min(300px, 80vw); aspect-ratio: 1; margin: 6px 0 0;
  border: 0; padding: 0; background: none; cursor: pointer; border-radius: 32px;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.stage::before {
  content: ""; position: absolute; inset: 22% 16% 10%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 235, 255, .55), transparent); filter: blur(18px);
}
.stage:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.stage[disabled] { cursor: default; }
canvas { position: relative; display: block; width: 100%; height: 100%; }

/* ---- кнопка «жидкое стекло» ---- */
.liquid {
  position: relative; isolation: isolate; overflow: hidden;
  min-width: 260px; min-height: 64px; padding: 0 34px 6px; margin-top: -6px;
  border: 1px solid rgba(255,255,255,.6); border-radius: 22px; cursor: pointer;
  font-family: Montserrat, system-ui, sans-serif; font-weight: 900; font-size: 22px; letter-spacing: .01em;
  color: #fff; text-shadow: 0 2px 10px rgba(0, 60, 200, .55), 0 0 2px rgba(255,255,255,.6);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255,255,255,.55), rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(120, 210, 255, .55), rgba(30, 110, 255, .45));
  backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.95),
    inset 0 -14px 24px rgba(0, 70, 230, .45),
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 0 0 6px rgba(255,255,255,.08),
    0 14px 34px rgba(0, 40, 170, .45);
  transition: transform .15s ease;
}
/* светящаяся полоска под текстом */
.liquid::after {
  content: ""; position: absolute; left: 27%; bottom: 13px; width: 46%; height: 4px;
  border-radius: 4px; background: #7fe7ff; box-shadow: 0 0 12px 2px rgba(127, 231, 255, .9);
}
/* бегущий блик — «жидкость» внутри стекла */
.liquid::before {
  content: ""; position: absolute; z-index: -1; top: -40%; left: -60%; width: 45%; height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.liquid:active { transform: scale(.97); }
.liquid:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.liquid[disabled] { opacity: .6; cursor: default; }
.liquid-small { min-width: 0; min-height: 54px; margin: 14px 0 0; font-size: 18px; }

.status { margin: 14px 0 0; min-height: 24px; font-weight: 800; font-size: 16px; text-align: center;
          text-shadow: 0 1px 8px rgba(0,40,160,.3); }

/* белая лента внизу */
.ribbon {
  align-self: flex-start; margin: 26px 0 0 -16px; padding: 12px 34px 12px 26px;
  background: #fff; color: var(--ink); clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%);
  font-family: Oswald, "Arial Narrow", sans-serif; font-weight: 700; font-size: 26px; letter-spacing: .02em;
}
.footnote { margin: 12px 0 0; font-size: 12px; font-weight: 700; opacity: .7; text-align: center; }

/* провал и ошибки: красноватое стекло */
.fail {
  margin-top: 4px; padding: 18px 26px; border-radius: 26px; text-align: center; transform: rotate(-2deg);
  background: linear-gradient(160deg, rgba(255, 120, 140, .45), rgba(255, 60, 90, .2));
  border: 1px solid rgba(255, 210, 220, .7);
  backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -10px 22px rgba(200, 20, 60, .25), 0 16px 36px rgba(60, 0, 80, .35);
}
.fail p { margin: 0; text-shadow: 0 1px 8px rgba(120, 0, 30, .35); }
.fail-title { font-family: Oswald, "Arial Narrow", sans-serif; font-weight: 700; font-size: 34px; line-height: 1.1; text-transform: uppercase; }
.fail-text { margin-top: 4px !important; font-weight: 800; font-size: 17px; }

/* ---- задача для подозрительных ---- */
.task {
  width: 100%; margin: 22px 0 0; padding: 20px 18px; border-radius: 30px; text-align: center;
  background: linear-gradient(160deg, rgba(255,255,255,.34), rgba(255,255,255,.1));
  border: 1px solid rgba(255,255,255,.55);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 18px 40px rgba(0, 30, 150, .28);
}
.task p { margin: 0; }
.task-title { font-family: Oswald, "Arial Narrow", sans-serif; font-weight: 700; font-size: 30px; line-height: 1.1; text-transform: uppercase; }
.task-text { margin-top: 6px !important; font-weight: 800; font-size: 15px; line-height: 1.4; }
.task-img { display: block; width: 100%; max-width: 300px; height: auto; margin: 10px auto 14px;
            filter: drop-shadow(0 10px 14px rgba(0, 30, 150, .35)); -webkit-user-select: none; user-select: none; }
.task-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.task-opt {
  min-height: 56px; border-radius: 18px; cursor: pointer; color: #fff;
  font-family: Montserrat, system-ui, sans-serif; font-weight: 900; font-size: 22px;
  border: 1px solid rgba(255,255,255,.6);
  background: radial-gradient(120% 90% at 50% -20%, rgba(255,255,255,.5), rgba(255,255,255,0) 55%),
              linear-gradient(180deg, rgba(120, 210, 255, .5), rgba(30, 110, 255, .4));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.9), inset 0 -10px 18px rgba(0, 70, 230, .4), 0 8px 20px rgba(0, 40, 170, .35);
  text-shadow: 0 2px 8px rgba(0, 60, 200, .5);
  transition: transform .12s ease, background .2s ease;
}
.task-opt:active { transform: scale(.95); }
.task-opt:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.task-opt[disabled] { cursor: default; }
.task-opt.picked { outline: 3px solid #fff; outline-offset: 2px; }
.task-opt.ok { background: linear-gradient(180deg, #4ade80, #16a34a); }
.task-opt.bad { background: linear-gradient(180deg, #fb7185, #e11d48); animation: shake .35s ease; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---- экран «откройте в Telegram» ---- */
body.no-tg .card, body.no-tg .stage, body.no-tg #roll, body.no-tg .status { display: none; }
.browser {
  position: relative; z-index: 1; width: 100%; margin: 18px 0 0; padding: 22px 20px 20px; border-radius: 30px;
  text-align: left;
  background: linear-gradient(160deg, rgba(255,255,255,.34), rgba(255,255,255,.1));
  border: 1px solid rgba(255,255,255,.55);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 18px 40px rgba(0, 30, 150, .28);
}
.browser h2 { margin: 0 0 8px; font-family: Oswald, "Arial Narrow", sans-serif; font-size: 30px; line-height: 1.1; text-transform: uppercase; }
.browser-lead { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.45; }
.browser-steps { margin: 14px 0 18px; padding: 0; list-style: none; counter-reset: s; }
.browser-steps li { position: relative; margin: 0 0 10px; padding-left: 40px; font-weight: 800; font-size: 15px; line-height: 1.4; counter-increment: s; }
.browser-steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 14px; color: var(--ink); background: #fff;
}
.liquid-link { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; margin: 0; text-decoration: none; }
.browser-bot { margin: 12px 0 0; text-align: center; font-weight: 700; font-size: 14px; }
.browser-hint { margin: 10px 0 0; font-size: 12px; font-weight: 700; line-height: 1.4; opacity: .8; text-align: center; }

@media (prefers-reduced-motion: reduce) { .liquid::before { animation: none; } }
