/* Qwiznight – fælles stil */
:root {
  --bg: #120E33;
  --bg2: #1A1548;
  --panel: #221C5C;
  --panel2: #2C2570;
  --line: #3B3390;
  --ink: #FFFFFF;
  --muted: #B3ADE6;
  --dim: #7C75BD;
  --accent: #FFD23F;
  --good: #2EE59D;
  --bad: #FF4D6D;
  --optA: #FF4D6D;
  --optB: #3D8BFF;
  --optC: #FFD23F;
  --optD: #2EE59D;
  --shadow: #07051C;
  --r: 18px;
  --display: "Bricolage Grotesque", "Rubik", system-ui, sans-serif;
  --body: "Rubik", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 77, 109, .18), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(61, 139, 255, .20), transparent 45%),
    radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 14px; }

/* Logo */
.logo { font-family: var(--display); font-weight: 800; font-size: 28px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo .q {
  display: inline-grid; place-items: center; width: 1.4em; height: 1.4em;
  background: var(--accent); color: var(--bg); border-radius: 12px;
  transform: rotate(-8deg); box-shadow: 3px 3px 0 var(--optA);
}
.logo.big { font-size: clamp(44px, 10vw, 84px); }

/* Knapper */
.btn {
  appearance: none; border: 3px solid var(--shadow); cursor: pointer;
  font: 700 18px/1 var(--body); color: var(--bg);
  background: var(--accent); padding: 16px 22px; border-radius: 14px;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform .08s ease, box-shadow .08s ease, opacity .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; min-height: 52px;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--panel2); color: var(--ink); border-color: var(--line); box-shadow: 4px 4px 0 var(--shadow); }
.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; box-shadow: none; padding: 10px 12px; min-height: 0; font-weight: 600; }
.btn.ghost:hover { color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { font-size: 15px; padding: 10px 14px; min-height: 40px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.huge { font-size: 24px; padding: 20px 34px; }

/* Felter */
.field { display: block; }
.field > span { display: block; font-weight: 600; color: var(--muted); margin-bottom: 6px; font-size: 15px; }
input[type=text], input[type=number], input[type=password], input[type=url], select, textarea, input:not([type]) {
  width: 100%; font: 500 18px/1.3 var(--body); color: var(--ink);
  background: var(--bg2); border: 2px solid var(--line); border-radius: 12px;
  padding: 13px 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }

.card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--r);
  padding: 20px; box-shadow: 6px 6px 0 var(--shadow);
}

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(140%);
  background: var(--bad); color: #fff; font-weight: 600; padding: 14px 18px; border-radius: 12px;
  border: 3px solid var(--shadow); box-shadow: 4px 4px 0 var(--shadow);
  transition: transform .25s ease; z-index: 100; max-width: calc(100vw - 32px);
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.ok { background: var(--good); color: var(--bg); }

/* Svarmuligheder */
.opt-a { --c: var(--optA); --fg: #fff; }
.opt-b { --c: var(--optB); --fg: #fff; }
.opt-c { --c: var(--optC); --fg: var(--bg); }
.opt-d { --c: var(--optD); --fg: var(--bg); }
.letter {
  display: inline-grid; place-items: center; flex: none;
  width: 1.7em; height: 1.7em; border-radius: 10px;
  background: rgba(0,0,0,.18); font-family: var(--display); font-weight: 800;
}

/* Hold-badge */
.team-dot { display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--tc, #888); flex: none; }
.crown { font-size: .85em; }

/* Timer-ring */
.timer { position: relative; width: 84px; height: 84px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 9; }
.timer .track { stroke: rgba(255,255,255,.12); }
.timer .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.timer.low .bar { stroke: var(--bad); }
.timer .num { position: absolute; inset: 0; display: grid; place-items: center; font: 800 28px var(--display); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; background: var(--panel2); color: var(--muted);
}
.badge.hot { background: var(--accent); color: var(--bg); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.pop { animation: pop .4s cubic-bezier(.2,.9,.3,1.3) both; }
.rise { animation: rise .45s ease both; }

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