/* ============================================================ Cuck Wheel */
:root {
  --bg: #09090f;
  --surface: #13131d;
  --surface-2: #1a1a27;
  --surface-3: #232334;
  --border: #272738;
  --border-2: #36364c;
  --text: #f4f3fa;
  --text-2: #c9c7da;
  --muted: #8e8ca6;
  --accent: #ff3d81;
  --accent-2: #ff8a3d;
  --accent-grad: linear-gradient(135deg, #ff3d81 0%, #ff6a5c 55%, #ff8a3d 100%);
  --ok: #34d399;
  --danger: #fb7185;
  --r-common: #a3a3b8;
  --r-rare: #3b82f6;
  --r-epic: #a855f7;
  --r-legendary: #f5b301;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --header-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 85% -8%, rgba(255, 61, 129, .13), transparent 60%),
    radial-gradient(900px 520px at -10% 8%, rgba(168, 85, 247, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
main { flex: 1; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(255, 61, 129, .35); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 6vw, 64px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: 18px; }
p { margin: 0; }

.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 9, 15, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; white-space: nowrap; }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px; transition: background .15s, color .15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-3); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); font-weight: 800; font-size: 13px;
}
.lang-btn:hover { color: var(--text); background: var(--surface-3); }
.lang-btn .icon { width: 16px; height: 16px; }
.lang-btn .chev { width: 14px; height: 14px; opacity: .7; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 180px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow);
}
.lang-menu button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; font-weight: 600; color: var(--text-2);
}
.lang-menu button:hover { background: var(--surface-3); color: var(--text); }
.lang-menu button[aria-checked="true"] { color: var(--text); background: rgba(255, 61, 129, .12); }
.lang-menu .code { width: 28px; font-size: 12px; font-weight: 800; color: var(--muted); }
.nav .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 12px; line-height: 20px; text-align: center;
  background: var(--accent); color: #fff; font-weight: 700;
}
@media (max-width: 760px) {
  .site-header .container { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .logo { font-size: 16px; }
  /* на телефоне все пункты меню видны сразу: что не поместилось — на вторую строку (без прокрутки вбок) */
  .nav { order: 3; width: 100%; margin: 6px -6px 8px; flex-wrap: wrap; gap: 2px; }
  .nav a { padding: 7px 11px; font-size: 14px; }
  .header-cta { padding: 9px 14px; font-size: 14px; }
  .lang-btn { height: 36px; padding: 0 10px; }
}
@media (max-width: 480px) {
  .header-cta .label { display: none; }
  .header-cta { padding: 9px; }
}

/* пока не подставлены переводы, страницу не показываем (страховка: через 2.5 с покажем в любом случае) */
html:not(.i18n-ready) body { opacity: 0; animation: cw-reveal 0s linear 2.5s forwards; }
@keyframes cw-reveal { to { opacity: 1; } }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.2;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .2s, opacity .15s;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--surface-3); border-color: #45455f; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 26px rgba(255, 61, 129, .28); }
.btn-primary:hover { background: var(--accent-grad); border-color: transparent; box-shadow: 0 10px 34px rgba(255, 61, 129, .42); filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: rgba(251, 113, 133, .12); border-color: rgba(251, 113, 133, .4); }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-sm { padding: 7px 12px; font-size: 13px; gap: 6px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-icon { padding: 9px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ generic surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.section { padding: 72px 0; scroll-margin-top: calc(var(--header-h) + 8px); }
@media (max-width: 760px) { .section { scroll-margin-top: 110px; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 620px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--text-2);
  white-space: nowrap;
}
.pill .icon { width: 14px; height: 14px; }
.pill.warn { color: #fbbf24; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }

/* ------------------------------------------------------------ rarity */
.r-common { --rc: var(--r-common); }
.r-rare { --rc: var(--r-rare); }
.r-epic { --rc: var(--r-epic); }
.r-legendary { --rc: var(--r-legendary); }
.rarity-dot { display: inline-block; vertical-align: middle; width: 10px; height: 10px; border-radius: 50%; background: var(--rc); flex: none; box-shadow: 0 0 10px color-mix(in srgb, var(--rc) 60%, transparent); }
.rarity-tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; color: var(--rc);
  background: color-mix(in srgb, var(--rc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent);
}
.rarity-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.rarity-bar i { display: block; background: var(--rc); min-width: 3px; }

/* ------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .label { font-weight: 700; font-size: 14px; color: var(--text-2); }
.field .hint { font-size: 13px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-2);
  background: var(--bg); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 61, 129, .18); }
.textarea { resize: vertical; min-height: 84px; }
.input-wrap { position: relative; }
.input-wrap .status { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--danger); }

.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented button {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--bg);
  font-weight: 700; font-size: 14px; color: var(--text-2);
}
.segmented button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ------------------------------------------------------------ modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 4, 8, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .18s ease-out;
}
.modal {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 22px; box-shadow: var(--shadow);
  padding: 26px; animation: pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.modal h2 { font-size: 22px; margin-bottom: 10px; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 5; }
.modal-report { position: absolute; top: 12px; left: 12px; z-index: 5; color: var(--muted); }
.modal-report:hover { color: var(--danger); }
.support-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.support-direct { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.viewer-modal { max-width: 900px; padding: 16px; }
.viewer-modal .prize-media { max-height: 80vh; }
.viewer-modal .prize-media img, .viewer-modal .prize-media video { max-height: 80vh; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.modal-actions .btn { flex: 1 1 auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* prize modal */
.prize-modal { max-width: 640px; padding: 22px; text-align: center; border-color: color-mix(in srgb, var(--rc) 45%, var(--border-2)); }
.prize-modal::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px 220px at 50% 0%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%);
}
.prize-head { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.prize-head .title { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--rc); text-shadow: 0 0 24px color-mix(in srgb, var(--rc) 55%, transparent); }
.prize-head .title .rarity-dot { width: 14px; height: 14px; margin-top: -4px; }
.prize-media {
  position: relative; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--border);
  display: grid; place-items: center; max-height: 60vh;
}
.prize-media img, .prize-media video { max-height: 60vh; width: auto; margin: 0 auto; }
.prize-meta { margin-top: 12px; color: var(--muted); font-size: 14px; }
.prize-meta b { color: var(--text); }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.confetti i {
  position: absolute; top: 40%; left: 50%; width: 9px; height: 14px; border-radius: 2px; opacity: 0;
  animation: confetti 1.6s cubic-bezier(.15, .7, .3, 1) forwards;
}
@keyframes confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}

/* ------------------------------------------------------------ toast */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
  padding: 12px 16px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--border-2);
  box-shadow: var(--shadow); font-weight: 600; font-size: 14px; animation: pop .2s ease-out;
}
.toast.error { border-color: rgba(251, 113, 133, .5); }
.toast.ok { border-color: rgba(52, 211, 153, .5); }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 24px; color: var(--muted); font-size: 14px; margin-top: 48px; background: rgba(255, 255, 255, .012); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 28px; }
.footer-brand .logo { font-size: 16px; margin-bottom: 10px; }
.footer-brand .logo svg { width: 26px; height: 26px; }
.footer-brand p { max-width: 320px; }
.site-footer h4 { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a:hover, .link-btn:hover { color: var(--text); }
.contact-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.contact-link .icon { width: 16px; height: 16px; color: var(--accent); }
.link-btn { border: 0; background: none; padding: 0; font-size: 14px; text-align: left; }
.footer-ads-note { font-size: 13px; color: var(--muted); max-width: 260px; overflow-wrap: anywhere; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
/* самые узкие телефоны: почта поддержки не влезает во вторую колонку и раздвигала страницу вбок (а с ней — кнопку чата) */
@media (max-width: 359px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-link { overflow-wrap: anywhere; }
}

/* ------------------------------------------------------------ wheel */
.wheel-stage { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; margin: 0 auto; }
.wheel-stage canvas { width: 100%; height: 100%; }
.wheel-pointer {
  position: absolute; left: 50%; top: -6px; width: 44px; height: 54px; transform: translateX(-50%);
  transform-origin: 50% 12px; z-index: 2; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55));
}
.wheel-pointer.tick { animation: tick .14s ease-out; }
@keyframes tick { 40% { transform: translateX(-50%) rotate(-16deg); } }
.wheel-glow {
  position: absolute; inset: 6%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, var(--wheel-glow, rgba(255, 61, 129, .35)), transparent 65%); filter: blur(30px);
}
/* темы колеса (wheel.js → THEMES): стрелка и подсветка вокруг */
.wheel-stage[data-theme="neon"] { --wheel-accent: #22d3ee; --wheel-tint: #cffafe; --wheel-glow: rgba(34, 211, 238, .33); }
.wheel-stage[data-theme="gold"] { --wheel-accent: #f5b301; --wheel-tint: #fff1b8; --wheel-glow: rgba(245, 179, 1, .30); }
.wheel-stage[data-theme="emerald"] { --wheel-accent: #34d399; --wheel-tint: #d1fae5; --wheel-glow: rgba(52, 211, 153, .30); }
.wheel-stage[data-theme="inferno"] { --wheel-accent: #ef4444; --wheel-tint: #ffe4e6; --wheel-glow: rgba(239, 68, 68, .35); }
.wheel-stage[data-theme="amethyst"] { --wheel-accent: #c084fc; --wheel-tint: #f3e8ff; --wheel-glow: rgba(192, 132, 252, .33); }

/* ------------------------------------------------------------ age gate */
.age-gate .modal { max-width: 460px; text-align: center; }
.age-gate .badge18 {
  width: 76px; height: 76px; margin: 4px auto 16px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 24px; background: var(--accent-grad); color: #fff;
}
.age-gate p { color: var(--text-2); }
.age-lang { flex: 1 1 100%; display: flex; justify-content: center; }
.age-lang .lang-menu { top: auto; bottom: calc(100% + 8px); right: 50%; transform: translateX(50%); }

/* ------------------------------------------------------------ empty / states */
.empty {
  text-align: center; padding: 56px 20px; border: 1px dashed var(--border-2); border-radius: var(--radius); color: var(--muted);
}
.empty h3 { color: var(--text); margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
