:root {
  /* KayHoot-huisstijl: Egeïsche zee bij nacht, met zon en koraal */
  --bg: #0a1f44;
  --bg-2: #14508f;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);
  --accent: #ffb627;
  --coral: #ff6b5b;
  --good: #2bc48a;
  --bad: #ff5a5f;
  --c0: #e8504a;
  --c1: #1f7ad1;
  --c2: #e09a12;
  --c3: #3f9b4a;
  --c4: #8a5cd6;
  --c5: #11a3a0;
  --radius: 18px;
  --font-display: 'Fredoka', 'Montserrat', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 20% 0%, var(--bg-2), var(--bg) 60%) fixed;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body { min-height: 100dvh; }

/* Zachte golven onderaan en een zonnegloed rechtsboven */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 6%, rgba(255, 182, 39, 0.22), transparent 28%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 60 Q150 20 300 60 T600 60 T900 60 T1200 60 V120 H0Z' fill='%23ffffff' fill-opacity='0.04'/%3E%3Cpath d='M0 80 Q150 45 300 80 T600 80 T900 80 T1200 80 V120 H0Z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E") bottom / 100% 140px no-repeat;
}

h1, h2, .logo, .big, .timer, .points, .pin, .val, .block, .who, .count, .ch-title, .qtext, .ghost-num, .n {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

button, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 0.08s ease, filter 0.15s ease, opacity 0.15s;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.4; cursor: default; }

.btn {
  background: var(--panel-strong);
  padding: 12px 20px;
  font-size: 16px;
}
.btn:hover:not(:disabled) { filter: brightness(1.2); }
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: 0 4px 0 #c9850a; }
.btn-primary:active { box-shadow: 0 1px 0 #c9850a; transform: translateY(3px); }
.btn-good { background: var(--good); }
.btn-bad { background: var(--bad); }
.btn-lg { padding: 18px 32px; font-size: 22px; }

input {
  width: 100%;
  padding: 16px;
  font-size: 20px;
  font-weight: 700;
  border-radius: var(--radius);
  border: 3px solid transparent;
  background: #fff;
  color: var(--bg);
  text-align: center;
  outline: none;
}
input:focus { border-color: var(--accent); }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }

.card {
  background: var(--panel);
  border-radius: 20px;
  padding: 24px;
}

.logo {
  font-size: 42px;
  letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }
.logo::after {
  content: '';
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  margin-left: 0.08em;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0.08em rgba(255, 107, 91, 0.3);
}

/* ---------- Opties (kleuren + vormen) ---------- */

.opt { background: var(--c0); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18); }
.opt.o1 { background: var(--c1); }
.opt.o2 { background: var(--c2); }
.opt.o3 { background: var(--c3); }
.opt.o4 { background: var(--c4); }
.opt.o5 { background: var(--c5); }
.opt.o6 { background: var(--c0); }
.opt.o7 { background: var(--c1); }

.shape { width: 1em; height: 1em; flex: none; fill: #fff; }

/* ---------- Timer ---------- */

.timer {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 900;
  background: conic-gradient(var(--accent) calc(var(--p, 1) * 360deg), var(--panel) 0);
  position: relative;
}
.timer::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bg);
}
.timer b { position: relative; }
.timer.urgent { background: conic-gradient(var(--bad) calc(var(--p, 1) * 360deg), var(--panel) 0); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--bad);
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  z-index: 100;
  max-width: calc(100% - 32px);
}

@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
.pop { animation: pop 0.35s ease-out both; }

@keyframes rise {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
