/* ===== snut.no — Politiscanner: retro hardware look ===== */
* { box-sizing: border-box; }

:root {
  --lcd: #ffb62e;          /* amber phosphor */
  --lcd-dim: #7a5410;
  --lcd-glow: rgba(255, 182, 46, 0.55);
  --case: #23262b;
  --case-hi: #34383f;
  --case-lo: #15171a;
  --led-tx: #ff3b30;
  --led-pwr: #35d07f;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(120% 90% at 50% -10%, #2a2d33 0%, #0b0c0e 60%, #000 100%);
  color: #cfd3d8;
  font-family: "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  align-items: center;
  justify-content: center;
  padding: 40px 18px 60px;
}

/* ---------- The scanner unit ---------- */
.scanner {
  width: 420px;
  max-width: 94vw;
  border-radius: 22px;
  padding: 20px 20px 26px;
  background:
    linear-gradient(180deg, var(--case-hi), var(--case) 30%, var(--case-lo));
  box-shadow:
    0 2px 0 #3d424a inset,
    0 -3px 8px rgba(0,0,0,.6) inset,
    0 30px 60px rgba(0,0,0,.6),
    0 2px 0 rgba(255,255,255,.05);
  border: 1px solid #0c0d0f;
}

.brandbar {
  display: flex; align-items: center; justify-content: space-between;
  color: #8b9099; font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 12px; padding: 0 4px;
}
.brandbar b { color: #d6dae0; letter-spacing: 3px; }
.model { font-size: 10px; color: #6b7079; }

/* speaker grille */
.grille {
  height: 26px; border-radius: 8px; margin-bottom: 16px;
  background:
    repeating-linear-gradient(90deg, #101215 0 4px, #2b2f35 4px 8px);
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 2px 6px rgba(0,0,0,.5) inset;
  opacity: .9;
}

/* ---------- LCD ---------- */
.lcd {
  position: relative;
  border-radius: 12px;
  padding: 14px 16px 12px;
  background:
    linear-gradient(180deg, #201a08, #16130a 70%, #0f0d07);
  box-shadow:
    0 0 0 2px #0a0b0d,
    0 0 0 5px #2c3037,
    0 8px 22px rgba(0,0,0,.6) inset;
  overflow: hidden;
}
/* scanline + glass sheen */
.lcd::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 2px, transparent 2px 4px),
    radial-gradient(120% 60% at 50% -20%, rgba(255,255,255,.08), transparent 60%);
  mix-blend-mode: screen;
}
.lcd.off { filter: brightness(.12) saturate(.2); }

.lcd-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  color: var(--lcd); text-shadow: 0 0 8px var(--lcd-glow);
  font-family: "Courier New", monospace;
}
.chan-label { font-size: 10px; letter-spacing: 2px; color: var(--lcd-dim); }
.chan { font-size: 40px; font-weight: 700; line-height: .9; letter-spacing: 2px; }
.chan small { font-size: 13px; }
.rssi { display: flex; gap: 3px; align-items: flex-end; height: 34px; }
.rssi i {
  width: 6px; background: var(--lcd-dim); border-radius: 1px;
  box-shadow: 0 0 6px transparent; transition: background .08s, box-shadow .08s;
}
.rssi i.on { background: var(--lcd); box-shadow: 0 0 8px var(--lcd-glow); }

.callsign {
  margin: 8px 0 6px; font-family: "Courier New", monospace;
  font-size: 13px; letter-spacing: 2px; color: var(--lcd);
  text-shadow: 0 0 8px var(--lcd-glow);
  display: flex; align-items: center; gap: 8px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lcd-dim); }
.dot.live { background: var(--led-tx); box-shadow: 0 0 10px var(--led-tx); animation: blink .7s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* waveform */
.wavewrap { position: relative; border-radius: 6px; overflow: hidden; margin: 4px 0 8px;
  background: linear-gradient(180deg, #171307, #0d0b06); box-shadow: 0 0 0 1px #000 inset; }
#wave { display: block; width: 100%; height: 90px; }

/* status ticker */
.ticker {
  height: 20px; overflow: hidden; font-family: "Courier New", monospace;
  font-size: 12px; color: var(--lcd); text-shadow: 0 0 8px var(--lcd-glow);
  white-space: nowrap; letter-spacing: 1px;
}
.ticker span { display: inline-block; padding-left: 100%; animation: scroll 16s linear infinite; }
@keyframes scroll { to { transform: translateX(-100%); } }

/* ---------- Controls ---------- */
.controls {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px;
  align-items: center; margin-top: 20px;
}
.knobs { display: flex; gap: 18px; }
.knob { text-align: center; user-select: none; }
.knob .dial {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 5px;
  background: radial-gradient(circle at 38% 32%, #4a4f57, #24272c 70%, #17181b);
  box-shadow: 0 3px 6px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.08) inset;
  position: relative; cursor: ns-resize; touch-action: none;
}
.knob .dial::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 14px;
  background: var(--lcd); border-radius: 2px;
  transform: translateX(-50%) rotate(var(--rot, 0deg));
  transform-origin: 50% 19px; box-shadow: 0 0 6px var(--lcd-glow);
}
.knob label { font-size: 10px; letter-spacing: 2px; color: #8b9099; }

.power {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.power button {
  width: 58px; height: 40px; border-radius: 8px; cursor: pointer;
  border: 1px solid #0b0c0e; color: #d6dae0; font-size: 11px; letter-spacing: 1px;
  background: linear-gradient(180deg, #3a3f46, #23262b);
  box-shadow: 0 2px 5px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.08) inset;
}
.power button.on { color: #fff; }

/* "Press me" cue: a tactile embossed breathing — the button swells and glows. */
.power button.attention { animation: emboss 1.25s ease-in-out infinite; color: #eafff2; }
@keyframes emboss {
  0%, 100% {
    transform: translateY(0) scale(1);
    background: linear-gradient(180deg, #3a3f46, #23262b);
    border-color: #0b0c0e;
    box-shadow:
      0 2px 5px rgba(0,0,0,.5),
      0 1px 0 rgba(255,255,255,.08) inset,
      0 0 0 0 rgba(53,208,127,0);
  }
  50% {
    transform: translateY(-3px) scale(1.07);
    background: linear-gradient(180deg, #566270, #2c313a);
    border-color: #3f6f52;
    box-shadow:
      0 10px 20px rgba(0,0,0,.55),
      0 2px 0 rgba(255,255,255,.28) inset,
      0 -3px 6px rgba(0,0,0,.45) inset,
      0 0 24px 7px rgba(53,208,127,.8);
  }
}
/* Reduced-motion: no movement, but still breathe the glow so the cue is visible. */
@media (prefers-reduced-motion: reduce) {
  .power button.attention { animation: glowpulse 1.6s ease-in-out infinite; }
}
@keyframes glowpulse {
  0%, 100% {
    box-shadow: 0 2px 5px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.08) inset,
                0 0 5px 1px rgba(53,208,127,.22);
  }
  50% {
    box-shadow: 0 2px 5px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.08) inset,
                0 0 26px 8px rgba(53,208,127,.9);
  }
}

#badboysBtn.active { color: var(--lcd); text-shadow: 0 0 8px var(--lcd-glow); font-weight: bold; }
.pwr-led {
  width: 9px; height: 9px; border-radius: 50%; background: #143a26;
  box-shadow: 0 0 0 1px #000;
}
.pwr-led.lit { background: var(--led-pwr); box-shadow: 0 0 10px var(--led-pwr); }

/* big record / PTT button */
.ptt {
  grid-column: 1 / -1; margin-top: 6px;
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 18px; border-radius: 12px; cursor: pointer;
  border: 1px solid #3a0f0d; color: #ffdcd9; letter-spacing: 1px;
  background: linear-gradient(180deg, #b5241c, #7c1712);
  box-shadow: 0 4px 10px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.15) inset;
  font-size: 14px; font-weight: 700; text-align: left;
}
.ptt:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.ptt .rec-dot {
  width: 16px; height: 16px; border-radius: 50%; background: #ffece9; flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(255,255,255,.18);
}
.ptt.recording { background: linear-gradient(180deg, #e23b32, #a51f18); }
.ptt.recording .rec-dot { animation: recpulse .8s ease-in-out infinite; }
@keyframes recpulse { 50% { transform: scale(1.35); opacity: .6; } }
.ptt small { display: block; font-weight: 400; font-size: 11px; opacity: .8; letter-spacing: .5px; }

.hint { text-align: center; color: #5c616a; font-size: 11px; margin-top: 14px; letter-spacing: .5px; }
.hint a { color: #7d838c; }

/* ---------- WANTED poster ---------- */
.wanted {
  width: 300px; max-width: 94vw;
  background: repeating-linear-gradient(0deg, #efe7d2 0 3px, #ece3cc 3px 6px);
  color: #2a2317; border-radius: 4px; padding: 18px 20px 22px;
  box-shadow: 0 24px 50px rgba(0,0,0,.55); transform: rotate(-1.4deg);
  border: 1px solid #d8ceb2; font-family: Georgia, "Times New Roman", serif;
}
.wanted h2 {
  margin: 0 0 2px; text-align: center; font-family: "Arial Black", Impact, sans-serif;
  letter-spacing: 6px; font-size: 34px; color: #1c1710;
}
.wanted .sub { text-align: center; font-size: 11px; letter-spacing: 3px; color: #6b5c3a; margin-bottom: 12px; }
.wanted .mug {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: 50% 20%;
  filter: grayscale(1) contrast(1.15); border: 3px solid #2a2317; background: #000;
}
.wanted .caseno { text-align: center; font-family: "Courier New", monospace; font-size: 11px; color: #6b5c3a; margin: 6px 0 10px; }
.wanted dl { margin: 0; font-size: 13px; line-height: 1.5; }
.wanted dt { font-weight: bold; letter-spacing: 1px; text-transform: uppercase; font-size: 10px; color: #6b5c3a; margin-top: 8px; }
.wanted dd { margin: 0; }
.wanted .reward { margin-top: 14px; text-align: center; font-family: "Arial Black", Impact, sans-serif;
  letter-spacing: 2px; font-size: 15px; border-top: 2px solid #2a2317; padding-top: 8px; }

@media (max-width: 520px) {
  .chan { font-size: 32px; }
  .wanted { transform: none; }
}
