/* KytePush Games — shared look. Brand: black / white / violet, Geist. */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@500;700&display=swap");

:root {
  --bg: #0A0A0B;
  --bg-2: #131316;
  --bg-3: #1C1C21;
  --line: #2A2A31;
  --text: #F5F5F7;
  --muted: #9A9AA6;
  --violet: #8B6DFF;
  --violet-2: #B3A0FF;
  --good: #3DDC97;
  --warn: #FFB547;
  --bad: #FF5C6C;
  --radius: 16px;
  --bar-h: 52px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* Game pages: full-viewport, no scroll, no text selection, no double-tap zoom. */
body.kp-game {
  height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
.kp-stage { flex: 1; position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; }
.kp-stage canvas { display: block; touch-action: none; }

/* Header bar */
.kp-bar {
  height: var(--bar-h); flex: none; display: flex; align-items: center; gap: 8px;
  padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--bg);
  position: relative; z-index: 5;
}
.kp-back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; padding: 8px 6px; border-radius: 10px; }
.kp-back:hover { color: var(--text); }
.kp-title { flex: 1; text-align: center; font-weight: 700; letter-spacing: -0.01em; font-size: 16px; margin-right: 34px; }
.kp-icon { background: none; border: 0; padding: 8px; border-radius: 10px; color: var(--muted); cursor: pointer; display: inline-flex; }
.kp-icon:hover { color: var(--text); background: var(--bg-3); }
.kp-bar .kp-icon { position: absolute; right: 8px; }

/* HUD pills games may use */
.kp-hud { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; pointer-events: none; z-index: 2; }
.kp-pill { background: rgba(19,19,22,.82); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-family: var(--mono); font-size: 14px; font-weight: 700; backdrop-filter: blur(6px); }
.kp-pill small { color: var(--muted); font-family: var(--font); font-weight: 500; margin-right: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* Overlay card */
.kp-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(10,10,11,.72); backdrop-filter: blur(4px); animation: kpfade .18s ease-out;
}
.kp-card {
  width: 100%; max-width: 380px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px;
  padding: 24px 22px 20px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: kppop .22s cubic-bezier(.2,1.4,.4,1);
}
.kp-kicker { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-2); margin-bottom: 6px; }
.kp-h { margin: 0 0 8px; font-size: 26px; letter-spacing: -0.02em; font-weight: 800; }
.kp-body { color: var(--muted); font-size: 15px; line-height: 1.5; }
.kp-body b, .kp-body strong { color: var(--text); }
.kp-big { font-family: var(--mono); font-size: 48px; font-weight: 700; color: var(--text); line-height: 1.1; margin: 6px 0 2px; }
.kp-stats { display: flex; justify-content: center; gap: 22px; margin: 12px 0 4px; }
.kp-stats div { display: flex; flex-direction: column; }
.kp-stats span { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--text); }
.kp-stats label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.kp-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.kp-btn {
  border: 1px solid var(--line); background: var(--bg-3); border-radius: 14px; padding: 13px 16px;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: transform .08s, background .15s;
}
.kp-btn:hover { background: #24242b; }
.kp-btn:active { transform: scale(.98); }
.kp-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.kp-primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.kp-primary:hover { background: #9b80ff; }
.kp-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.kp-ghost:hover { background: var(--bg-3); color: var(--text); }
.kp-btn .kp-ad-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; background: rgba(255,255,255,.18); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 1px; }
.kp-foot { margin-top: 14px; font-size: 12px; color: var(--muted); }
.kp-new { display: inline-block; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; margin-bottom: 6px; }

.kp-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  opacity: 0; transition: .2s; z-index: 60; pointer-events: none;
}
.kp-toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes kpfade { from { opacity: 0; } }
@keyframes kppop { from { transform: scale(.94); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .kp-overlay, .kp-card { animation: none; } }
