/* c00i kit — kit.css
 * Shared design system: tokens, layout shell, overlays, buttons, HUD chips,
 * toasts, coin/streak badges and the ad overlay. Neon-glass aesthetic tuned to
 * the existing c00i palette. Original styles, no external fonts/assets.
 */
:root {
  --bg: #0a0a12;
  --bg2: #12121f;
  --card: #171728;
  --line: rgba(154, 186, 255, 0.16);
  --text: #eef0ff;
  --muted: #9aa0c0;
  --accent: #6c5cff;
  --accent2: #00e0c6;
  --pink: #ff5d9e;
  --gold: #ffd166;
  --ok: #7cff93;
  --bad: #ff7d7d;
  --grad: linear-gradient(120deg, var(--accent2), var(--accent) 55%, var(--pink));
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: radial-gradient(1200px 700px at 70% -10%, #1c1636 0%, var(--bg) 60%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Full-bleed game stage with safe-area padding for notched phones. */
.c00i-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.c00i-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* ---------- Top HUD bar ---------- */
.c00i-hud {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 10px);
  left: calc(env(safe-area-inset-left) + 10px);
  right: calc(env(safe-area-inset-right) + 62px); /* leave room for the gear */
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  overflow: hidden;
  flex-wrap: nowrap;
}
.c00i-hud .c00i-chip { flex: 0 0 auto; }

.c00i-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(9, 10, 20, 0.62);
  backdrop-filter: blur(10px);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.c00i-chip small { color: var(--muted); font-weight: 700; font-size: 11px; }
.c00i-chip .v { color: var(--gold); }

.c00i-iconbtn {
  position: fixed;
  z-index: 6;
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(9, 10, 20, 0.62);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}
.c00i-iconbtn.tr { top: calc(env(safe-area-inset-top) + 10px); right: calc(env(safe-area-inset-right) + 10px); }

/* ---------- Overlays (start / gameover / settings) ---------- */
.c00i-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 20%, rgba(108, 92, 255, 0.18), transparent 45%), rgba(6, 7, 16, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}
.c00i-overlay.show { opacity: 1; visibility: visible; }

.c00i-card {
  width: min(400px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--card), var(--bg2));
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: c00i-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes c00i-pop { from { transform: translateY(14px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }

.c00i-eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #07111c;
  background: var(--grad);
}
.c00i-title {
  margin: 14px 0 6px;
  font-size: clamp(30px, 8vw, 46px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.c00i-lead { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 auto 18px; max-width: 32ch; }

.c00i-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 20px;
}
.c00i-stat {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.c00i-stat span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.c00i-stat strong { display: block; margin-top: 4px; font-size: 26px; font-weight: 900; }
.c00i-stat.big strong { color: var(--gold); }

.c00i-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.c00i-btn:active { transform: scale(0.97); }
.c00i-btn.primary { color: #07111c; background: var(--grad); border-color: transparent; box-shadow: 0 14px 34px -12px var(--accent); }
.c00i-btn.primary:hover { filter: brightness(1.06); }
.c00i-btn.ghost { font-size: 15px; color: var(--muted); }

.c00i-bullets {
  text-align: left;
  margin: 4px 0 16px;
  padding-left: 20px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.7;
}
.c00i-bullets li { color: var(--muted); }
.c00i-bullets li::marker { color: var(--accent2); }

.pick-label {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.c00i-btn-row { display: flex; gap: 10px; }
.c00i-btn-row .c00i-btn { margin-top: 10px; }

.c00i-badge-new {
  display: inline-block;
  margin-bottom: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #07111c;
  background: linear-gradient(120deg, var(--gold), var(--pink));
  animation: c00i-glow 1s ease-in-out infinite alternate;
}
@keyframes c00i-glow { from { box-shadow: 0 0 0 rgba(255, 209, 102, 0); } to { box-shadow: 0 0 26px rgba(255, 209, 102, 0.7); } }

/* ---------- Settings toggles ---------- */
.c00i-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.c00i-toggle:last-of-type { border-bottom: 0; }
.c00i-switch { position: relative; width: 50px; height: 28px; }
.c00i-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.c00i-switch .track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.12); transition: background 0.16s ease; }
.c00i-switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.16s ease; }
.c00i-switch input:checked + .track { background: var(--accent2); }
.c00i-switch input:checked + .track::after { transform: translateX(22px); }

/* ---------- Toast ---------- */
.c00i-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 22px);
  transform: translateX(-50%) translateY(20px);
  z-index: 30;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(9, 10, 20, 0.9);
  backdrop-filter: blur(10px);
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.c00i-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Ad overlay ---------- */
.c00i-ad {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 5, 12, 0.9);
  backdrop-filter: blur(8px);
}
.c00i-ad[hidden] { display: none; }
.c00i-ad-card {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 22px;
  text-align: center;
  background: linear-gradient(180deg, var(--card), var(--bg2));
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}
.c00i-ad-tag { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); }
.c00i-ad-tag.reward { color: #07111c; background: var(--gold); border-color: transparent; }
.c00i-ad-emoji { font-size: 58px; margin: 14px 0 6px; }
.c00i-ad-card h3 { margin: 0 0 6px; font-size: 24px; }
.c00i-ad-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.c00i-ad-cta { display: block; padding: 14px; border-radius: 14px; font-weight: 800; font-size: 16px; text-decoration: none; color: #07111c; background: var(--grad); cursor: pointer; border: 0; width: 100%; }
.c00i-ad-skip { margin-top: 10px; width: 100%; padding: 12px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.c00i-ad-skip:disabled { opacity: 0.5; cursor: default; }

.c00i-hidden { display: none !important; }
