/* K-Nuance Radio (Spotify-Style UI) */
:root {
  --radio-bg: #000000;
  --radio-surface: #121212;
  --radio-elevated: #181818;
  --radio-highlight: #282828;
  --radio-text: #FFFFFF;
  --radio-muted: #B3B3B3;
  --radio-accent: #1DB954; /* Spotify green, or we can use our primary gradient */
  --radio-primary: #FF512F; 
  --radio-secondary: #DD2476;
}

body.radio-body {
  background-color: var(--radio-bg);
  color: var(--radio-text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header Override for Dark Mode */
.radio-body klang-header {
  background: var(--radio-surface);
  border-bottom: 1px solid var(--radio-highlight);
}

.radio-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 60px - 90px); /* Header 60px, Footer 90px */
}

/* Sidebar */
.radio-sidebar {
  width: 280px;
  background-color: var(--radio-bg);
  padding: 24px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--radio-highlight);
}
.sidebar-title {
  font-size: 13px; font-weight: 700; color: var(--radio-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; padding-left: 8px;
}
.playlist-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--radio-muted); font-size: 14px; padding: 10px 8px;
  border-radius: 4px; cursor: pointer; transition: color 0.2s, background 0.2s;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.playlist-item:hover { color: var(--radio-text); background-color: var(--radio-highlight); }
.playlist-item.is-active { color: var(--radio-text); background-color: var(--radio-highlight); font-weight: 600; }
.playlist-group { margin-bottom: 24px; }
.playlist-group-title { font-size: 12px; color: var(--radio-primary); margin: 0 0 8px 8px; font-weight: 700; }
.playlist-lock-badge { font-size: 11px; color: var(--radio-muted); font-weight: 700; }

.radio-lock-note {
  font-size: 13px; color: var(--radio-muted); text-align: center; margin-top: 12px;
}
.radio-lock-note a { color: var(--radio-primary); font-weight: 600; }

/* Main View */
.radio-main {
  flex: 1; background: linear-gradient(to bottom, var(--radio-surface), var(--radio-bg));
  padding: 40px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow-y: auto;
}
.radio-empty { color: var(--radio-muted); font-size: 24px; font-weight: 600; }
.track-info { text-align: center; max-width: 800px; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.track-roman { font-size: 24px; color: var(--radio-primary); font-weight: 600; margin-bottom: 16px; letter-spacing: 2px; }
.track-term { font-size: 80px; font-weight: 800; color: var(--radio-text); margin-bottom: 24px; line-height: 1.1; }
.track-meaning { font-size: 28px; color: var(--radio-muted); margin-bottom: 32px; font-weight: 500; }
.track-nuance { font-size: 18px; color: #888; line-height: 1.6; padding: 0 40px; }

/* Bottom Player */
.radio-player {
  height: 90px; background-color: var(--radio-elevated); border-top: 1px solid var(--radio-highlight);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.player-left { width: 30%; min-width: 180px; }
.current-album { font-size: 14px; font-weight: 600; color: var(--radio-text); margin-bottom: 4px; }
.current-category { font-size: 12px; color: var(--radio-muted); }

.player-center { flex: 1; max-width: 600px; display: flex; flex-direction: column; align-items: center; }
.player-controls { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; }
.control-btn { 
  background: none; border: none; color: var(--radio-muted); font-size: 20px; 
  cursor: pointer; transition: color 0.2s, transform 0.2s; 
}
.control-btn:hover { color: var(--radio-text); }
.control-btn.is-active { color: var(--radio-accent); }
.play-btn { 
  width: 36px; height: 36px; border-radius: 50%; background: var(--radio-text); 
  color: #000; display: flex; align-items: center; justify-content: center; font-size: 16px; padding-left: 2px;
}
.play-btn:hover { transform: scale(1.05); }

.player-timeline { display: flex; align-items: center; width: 100%; gap: 12px; font-size: 11px; color: var(--radio-muted); }
.progress-bar { flex: 1; height: 4px; background: #535353; border-radius: 2px; overflow: hidden; cursor: pointer; }
.progress-fill { height: 100%; background: var(--radio-text); width: 0%; transition: width 0.1s linear; }
.progress-bar:hover .progress-fill { background: var(--radio-accent); }

.player-right { width: 30%; min-width: 180px; display: flex; justify-content: flex-end; align-items: center; }
.shadowing-indicator { font-size: 12px; color: var(--radio-accent); font-weight: 600; border: 1px solid var(--radio-accent); padding: 4px 10px; border-radius: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .radio-sidebar { display: none; } /* Hide sidebar on mobile for now, or add a toggle */
  .player-left { display: none; }
  .player-right { display: none; }
  .track-term { font-size: 48px; }
  .track-meaning { font-size: 20px; }
  .radio-layout { height: calc(100vh - 60px - 140px); }
  .radio-player { height: 140px; padding: 16px; }
}
