/* --- TACTICAL CSS (r.css) --- */

:root {
  --green: #00FF41;
  --green-dim: #007722;
  --bg: #000000;
  --panel-border: 1px solid var(--green-dim);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--green);
  font-family: 'Share Tech Mono', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* Scanline Overlay */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0,0,0,0.2) 2px, rgba(0,0,0,0.2) 3px);
  pointer-events: none;
  z-index: 100;
}

/* ── HEADER ── */

#main-radio-console {
  width: 100%;
  max-width: 480px;
  padding: 20px;
  border: var(--panel-border);
  background: #050505;
  text-align: center;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}

#header-title { font-size: 0.9rem; color: var(--green-dim); margin-bottom: 10px; }
#frequency-display {
  font-size: 1.2rem;
  height: 1.5em;
  text-shadow: 0 0 8px var(--green);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right side: controls + volume stacked */

.channel-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.controls {
  display: flex;
  gap: 6px;
}

.ctrl-btn {
  background: none;
  border: 1px solid var(--green-dim);
  color: var(--green);
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ctrl-btn:hover {
  border-color: var(--green);
  box-shadow: 0 0 5px rgba(0,255,65,0.3);
}

.ctrl-btn.stop-btn { color: #ff4444; border-color: #441111; }
.ctrl-btn.stop-btn:hover { border-color: #ff4444; }

/* ── VOLUME ROW ── */

.vol-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.vol-icon {
  font-size: 0.7rem;
  opacity: 0.6;
}

.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 3px;
  background: var(--green-dim);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 4px var(--green);
  cursor: pointer;
}

.vol-val {
  font-size: 0.65rem;
  color: var(--green-dim);
  width: 22px;
  text-align: right;
}
  
* { box-sizing: border-box; margin: 0; padding: 0; }

#header-title { font-size: 0.9rem; color: var(--green-dim); margin-bottom: 10px; }
#frequency-display {
  font-size: 1.2rem;
  height: 1.5em;
  text-shadow: 0 0 8px var(--green);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

canvas {
  width: 100%;
  height: 60px;
  background: #020502;
  border: 1px solid #111;
}

/* ── CHANNEL STACK ── */

#channel-stack {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label {
  font-size: 0.7rem;
  color: var(--green-dim);
  padding: 10px 0;
  border-bottom: 1px dashed #222;
  letter-spacing: 2px;
}

.radio-channel {
  background: #0a0a0a;
  border: var(--panel-border);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.radio-channel.active {
  border-color: var(--green);
  box-shadow: inset 0 0 10px rgba(0,255,65,0.1);
}

.station-name {
  font-size: 0.85rem;
  color: #eee;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right side: controls + volume stacked */
.channel-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.controls {
  display: flex;
  gap: 6px;
}

.ctrl-btn {
  background: none;
  border: 1px solid var(--green-dim);
  color: var(--green);
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ctrl-btn:hover {
  border-color: var(--green);
  box-shadow: 0 0 5px rgba(0,255,65,0.3);
}

.ctrl-btn.stop-btn { color: #ff4444; border-color: #441111; }
.ctrl-btn.stop-btn:hover { border-color: #ff4444; }

/* ── VOLUME ROW ── */
.vol-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.vol-icon {
  font-size: 0.7rem;
  opacity: 0.6;
}

.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 3px;
  background: var(--green-dim);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 4px var(--green);
  cursor: pointer;
}

.vol-val {
  font-size: 0.65rem;
  color: var(--green-dim);
  width: 22px;
  text-align: right;
}

/* Hidden Player 
#yt-player-container {
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
*/

/* ── SEEKER ROW ── */
#seeker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 0 2px;
}

#current-time, #duration-time {
  font-size: 0.68rem;
  color: var(--green-dim);
  min-width: 34px;
  white-space: nowrap;
}

#duration-time { text-align: right; }

#global-seek-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--green-dim);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  accent-color: var(--green);
}

#global-seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--green);
  cursor: pointer;
}

#yt-player-container {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  max-width: 480px;
}