/* ================================================================
   AURORA METRO — Light Theme Override
   Overrides style.min.css dark variables for a light glassmorphism UI.
   DOES NOT redefine layout — only colors, backgrounds, shadows.
   ================================================================ */

/* ── Override all dark CSS variables ── */
:root {
  --bg-deep: #F0F4F8;
  --bg-base: #F0F4F8;
  --bg-surface: #E8EDF2;
  --bg-elevated: rgba(255,255,255,0.72);
  --bg-hover: #DEE4EC;
  --bg: var(--bg-base);
  --surface: var(--bg-surface);
  --surface-light: var(--bg-elevated);
  --surface-hover: var(--bg-hover);
  --text: #0F172A;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --accent: #0078D4;
  --accent-hover: #005A9E;
  --accent-glow: rgba(0,120,212,0.35);
  --glow-emerald: rgba(0,120,212,0.2);
  --glow-coral: rgba(255,61,0,0.2);
  --glow-amber: rgba(255,145,0,0.2);
  --glow-sky: rgba(0,176,255,0.2);
  --glow-violet: rgba(101,31,255,0.2);
  --glow-rose: rgba(255,64,129,0.2);
  --glow-cyan: rgba(0,200,255,0.2);
  --glow-gold: rgba(255,180,0,0.2);
  --glass-bg: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.5);
  --aurora-1: linear-gradient(135deg, #E8EDF2, #DEE4EC, #F0F4F8);
  --aurora-2: linear-gradient(135deg, #E8EDF2, #DEE4EC, #F0F4F8);
}

/* ── Body background ── */
body {
  background: var(--bg-deep) !important;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(0,176,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(101,31,255,0.03) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 80%, rgba(0,200,83,0.02) 0%, transparent 50%) !important;
  color: var(--text) !important;
  animation: none !important;
}

/* ── Sidebar ── */
.sidebar {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(20px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.6) !important;
  border-right: 1px solid rgba(255,255,255,0.6) !important;
}
.sidebar .logo { color: var(--text-primary); }
.accordion-header { color: var(--text-secondary); }
.accordion-header:hover { background: rgba(15,23,42,0.04); color: var(--text-primary); }
.accordion-list li a { color: var(--text-secondary); }
.accordion-list li a:hover { background: rgba(15,23,42,0.04); color: var(--text-primary); }
.accordion-list li a.active {
  background: linear-gradient(135deg, var(--accent), #00B0FF) !important;
  color: #fff !important;
}
.accordion-subhead { color: var(--text-muted); }

/* ── Player bar ── */
.player-bar {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-top: 1px solid var(--glass-border) !important;
}

/* ── Cards ── */
.card {
  background: var(--surface-light) !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
}
.card:hover { border-color: rgba(255,255,255,0.8) !important; }

/* ── Category chips ── */
.category-tab {
  background: var(--surface-light) !important;
  color: var(--text-secondary) !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
}
.category-tab:hover { background: #fff !important; color: var(--text-primary) !important; }
.category-tab.active {
  background: linear-gradient(135deg, var(--accent), #00B0FF) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ── Hero banners ── */
.hero-banner {
  background: linear-gradient(135deg, #0078D4, #00B0FF) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}
.hero-banner::before, .hero-banner::after { display: none !important; }

/* ── Buttons ── */
.btn-primary, .hero-btn {
  background: linear-gradient(135deg, var(--accent), #00B0FF) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-secondary {
  background: var(--surface-light) !important;
  color: var(--text-secondary) !important;
  border: 1px solid rgba(15,23,42,0.08) !important;
}
.btn-secondary:hover { background: #fff !important; color: var(--text-primary) !important; }

/* ── Now playing ── */
.now-playing-view {
  background: rgba(240,244,248,0.95) !important;
  backdrop-filter: blur(40px) !important;
}

/* ── Queue panel ── */
.queue-panel {
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.6) !important;
}

/* ── Settings dropdown ── */
.settings-dropdown {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
}

/* ── Volume slider wrap ── */
.volume-slider-wrap {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
}

/* ── Modal ── */
.modal-overlay { background: rgba(15,23,42,0.25) !important; }
.modal-box {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(30px) !important;
  border: 1px solid rgba(255,255,255,0.6) !important;
}

/* ── Story items ── */
.story-item {
  background: var(--surface-light) !important;
  border: 1px solid rgba(255,255,255,0.4) !important;
}
.story-item:hover { background: #fff !important; }

/* ── Chapter sheet ── */
.np-chapter-sheet {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(30px) !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
}

/* ── Inputs ── */
input, textarea, select, .modal-input {
  background: var(--surface-light) !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(15,23,42,0.1) !important;
}
input:focus, textarea:focus, select:focus, .modal-input:focus {
  background: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

/* ── Search input ── */
.search-box, #audiobook-search {
  background: var(--surface-light) !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(15,23,42,0.1) !important;
}
.search-box:focus, #audiobook-search:focus {
  background: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

/* ── Upload area ── */
.upload-area {
  background: var(--surface-light) !important;
  border-color: rgba(15,23,42,0.12) !important;
}

/* ── Toast ── */
.toast {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
}

/* ── Login box ── */
.login-box {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
}

/* ── Progress bars ── */
.progress-bar .progress-fill, .now-playing-progress-fill {
  background: linear-gradient(90deg, var(--accent), #00B0FF) !important;
}

/* ── Live badge ── */
.live-badge { background: #FF3D00 !important; }

/* ── Card play button ── */
.card-play {
  background: linear-gradient(135deg, var(--accent), #00B0FF) !important;
  color: #fff !important;
}

/* ── Card progress ── */
.card-progress { background: rgba(15,23,42,0.08) !important; }
.card-progress-fill { background: linear-gradient(90deg, var(--accent), #00B0FF) !important; }

/* ── Duration badge ── */
.duration-badge {
  background: rgba(15,23,42,0.55) !important;
  backdrop-filter: blur(4px) !important;
}

/* ── Radio card logos ── */
.card-logo {
  padding: 8px !important;
  background: transparent !important;
}

/* ── Scan status ── */
#scan-status {
  background: var(--surface-light) !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
}

/* ── Empty state ── */
.empty-state svg { stroke: var(--text-muted) !important; }
.empty-state p { color: var(--text-muted) !important; }

/* ── Selection ── */
::selection {
  background: var(--accent-glow);
  color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar-thumb {
  background: rgba(15,23,42,0.15);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15,23,42,0.25);
}

/* ── Contrast fixes for light theme ── */

/* Badges need darker background for white text, or we keep dark bg with white text */
.live-badge {
  background: #FF3D00 !important;
  color: #fff !important;
}

.duration-badge, .chapter-badge {
  background: rgba(15,23,42,0.65) !important;
  color: #fff !important;
  backdrop-filter: blur(4px) !important;
}

/* Play buttons on covers */
.card-play {
  background: linear-gradient(135deg, var(--accent), #00B0FF) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px var(--accent-glow) !important;
}

/* Progress bars */
.progress-fill, .now-playing-progress-fill {
  background: linear-gradient(90deg, var(--accent), #00B0FF) !important;
}

/* Now playing close button */
.now-playing-close {
  background: var(--surface-light) !important;
  color: var(--text-secondary) !important;
}

/* Mobile header */
.mobile-header {
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(15,23,42,0.06) !important;
}

/* Mobile sidebar overlay */
.mobile-overlay {
  background: rgba(15,23,42,0.2) !important;
  backdrop-filter: blur(4px) !important;
}

/* Sidebar scroll area */
.sidebar-scroll {
  background: transparent !important;
}

/* User menu */
.user-menu {
  border-top: 1px solid rgba(15,23,42,0.06) !important;
  color: var(--text-secondary) !important;
}
.user-menu a {
  color: var(--text-muted) !important;
}

/* Card text thumb */
.card-text-thumb {
  color: var(--text-secondary) !important;
}

/* Speed/sleep options */
.speed-opt, .sleep-opt {
  background: var(--surface-light) !important;
  color: var(--text-secondary) !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
}
.speed-opt.active, .sleep-opt.active {
  background: linear-gradient(135deg, var(--accent), #00B0FF) !important;
  color: #fff !important;
}

/* Voice items */
.voice-item {
  color: var(--text-secondary) !important;
}
.voice-item.active {
  background: var(--accent-glow) !important;
  color: var(--accent) !important;
}

/* Settings dropdown items */
.modal-item {
  color: var(--text-secondary) !important;
}
.modal-item:hover {
  background: rgba(15,23,42,0.04) !important;
  color: var(--text-primary) !important;
}

/* Track fav button */
.track-fav {
  color: var(--text-muted) !important;
}
.track-fav:hover {
  color: var(--accent) !important;
}

/* ── Global compact shelf cards ── */
.card-scroll .card {
    flex: 0 0 140px;
    min-width: 140px;
    padding: 10px;
}
.card-scroll .card-img {
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(15,23,42,0.08);
}
.card-scroll .card-title {
    font-size: 12px;
    margin-bottom: 2px;
}
.card-scroll .card-meta {
    font-size: 11px;
}

/* ── Aurora glow ring around cards ── */
/* Glow sits behind the entire card so it isn't covered by the image bg */
.card {
  position: relative;
  z-index: 1;
}
.card::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius-sm) + 6px);
  background: conic-gradient(from 0deg, var(--accent), #00B0FF, #E040FB, #00C853, var(--accent));
  z-index: -1;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.card:hover {
  z-index: 2;
}
.card:hover::before {
  opacity: 0.7;
  animation: aurora-spin 3s linear infinite;
}

@keyframes aurora-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Radio play button always visible (no hover needed) */
.radio-card .card-play {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  width: 28px;
  height: 28px;
}
.radio-card .card-play svg {
  width: 12px;
  height: 12px;
}

/* ── Simplified Sidebar Navigation ── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.sidebar-link:hover {
  background: rgba(15,23,42,0.04);
  color: var(--text-primary);
}
.sidebar-link.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-link-icon {
  font-size: 18px;
  line-height: 1;
  width: 24px;
  text-align: center;
}
.sidebar-link-text {
  line-height: 1;
}

/* ── Add to Queue button on cards ── */
.card-img {
  position: relative;
}
.card-queue-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 4;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.card:hover .card-queue-btn {
  opacity: 1;
  transform: scale(1);
}
.card-queue-btn:hover {
  background: var(--accent);
  transform: scale(1.1);
}
.card-queue-btn.added {
  opacity: 1 !important;
  transform: scale(1) !important;
  background: var(--accent-emerald);
}

/* ── Queue panel items ── */
.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.queue-item:hover {
  background: rgba(15,23,42,0.04);
}
.queue-item.active {
  background: var(--accent-glow);
}
.queue-item-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.queue-item-info {
  flex: 1;
  min-width: 0;
}
.queue-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.queue-item-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.15s;
}
.queue-item:hover .queue-item-remove {
  opacity: 1;
}
.queue-item-remove:hover {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}
.queue-clear-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.queue-clear-btn:hover {
  color: #ef4444;
  background: rgba(239,68,68,0.06);
}

/* Queue badge on button */
#btn-queue {
  position: relative;
}
.queue-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}
