/* style.css — all styling */
:root {
  --bg: #0b0f1a;
  --bg-2: #131a2b;
  --panel: rgba(22, 28, 46, 0.72);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #eaf0ff;
  --muted: #9aa6c4;
  --accent: #6ee7ff;
  --accent-2: #c084fc;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef2fb;
    --bg-2: #ffffff;
    --panel: rgba(255, 255, 255, 0.85);
    --panel-border: rgba(15, 23, 42, 0.10);
    --text: #0f1834;
    --muted: #5a6party;
    --muted: #5a6party;
    --muted: #54668a;
    --accent: #0ea5b7;
    --accent-2: #7c3aed;
    --shadow: 0 10px 28px rgba(20, 30, 60, 0.18);
    color-scheme: light;
  }
}
html[data-theme="dark"] {
  --bg: #0b0f1a; --bg-2: #131a2b;
  --panel: rgba(22, 28, 46, 0.72);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #eaf0ff; --muted: #9aa6c4;
  --accent: #6ee7ff; --accent-2: #c084fc;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #eef2fb; --bg-2: #ffffff;
  --panel: rgba(255, 255, 255, 0.85);
  --panel-border: rgba(15, 23, 42, 0.10);
  --text: #0f1834; --muted: #54668a;
  --accent: #0ea5b7; --accent-2: #7c3aed;
  --shadow: 0 10px 28px rgba(20, 30, 60, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 700px at 15% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(1000px 600px at 110% 120%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: conic-gradient(from 0deg, #ff6ec7, #ffd166, #6ee7ff, #c084fc, #ff6ec7);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
  flex: 0 0 auto;
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.brand-text h1 { font-size: 18px; margin: 0; letter-spacing: 0.2px; font-weight: 700; }
.brand-text p { margin: 0; font-size: 12px; color: var(--muted); }

.counter {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1;
  padding: 8px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid var(--panel-border);
}
.counter-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.counter-value {
  font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: transform 0.12s ease;
}
.counter-value.bump { animation: bump 0.34s cubic-bezier(.2,.9,.3,1.4); }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

.stage-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}
#stage {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: pointer;
}
.hint {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  transition: opacity 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 18px;
  font-size: 12px; color: var(--muted);
  background: var(--panel);
  border-top: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
}
.reset {
  appearance: none;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--accent-2) 16%, transparent);
  color: var(--text);
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease, border-color 0.2s ease;
}
.reset:hover { background: color-mix(in srgb, var(--accent-2) 30%, transparent); }
.reset:active { transform: scale(0.94); }
.reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 360px) {
  .brand-text p { display: none; }
  .topbar { padding: 10px 12px; }
  .counter { padding: 6px 10px; }
  .counter-value { font-size: 20px; }
  .foot { padding: 8px 12px; }
}
