/* ============================================================
   MediaNet 2026 — modern design layer.
   Loaded AFTER styles.css. Override-only, doesn't fight legacy.
   Design philosophy:
   - Bold display type (Inter Tight)
   - Gradient accent (red→magenta) — reserved for primary CTAs only
   - Glass surfaces with subtle borders, NOT chaos
   - Dense info layout, generous breathing room
   - Subtle motion, no cinema theater
   ============================================================ */

:root {
  --mn-bg: #0a0a0f;
  --mn-bg-2: #11111a;
  --mn-surface: #16161f;
  --mn-surface-2: #1c1c28;
  --mn-border: #25253a;
  --mn-text: #f5f5fa;
  --mn-text-dim: #a3a3b8;
  --mn-text-muted: #6b6b80;
  --mn-accent: #e50914;
  --mn-accent-2: #ff2d6f;
  --mn-accent-grad: linear-gradient(135deg, #ff2d6f 0%, #e50914 50%, #c10aff 100%);
  --mn-accent-soft: rgba(229, 9, 20, 0.12);
  --mn-success: #46d369;
  --mn-warn: #ffb340;
  --mn-r-sm: 6px;
  --mn-r-md: 10px;
  --mn-r-lg: 16px;
  --mn-r-pill: 999px;
  --mn-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --mn-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
}

/* ---------- Typography ---------- */
html, body {
  font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  background: var(--mn-bg);
  color: var(--mn-text);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Logo ---------- */
.logo {
  font-weight: 900 !important;
  font-size: 1.55rem !important;
  letter-spacing: -0.04em !important;
  background: var(--mn-accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  text-shadow: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.logo-mark {
  background: var(--mn-accent-grad);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900;
  margin-right: 6px;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}
.logo-text { font-weight: 800; }

/* ============================================================
   NAVBAR — Unified Tool System
   Three semantic groups: Discover · Media · Account
   ============================================================ */
.nav-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.nav-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-divider {
  display: inline-block;
  width: 1px; height: 22px;
  background: var(--mn-border);
  margin: 0 4px;
  flex-shrink: 0;
}
.nav-tool {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--mn-text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  position: relative;
}
.nav-tool:hover {
  background: rgba(255,255,255,0.08);
  color: var(--mn-text);
  border-color: var(--mn-border);
}
.nav-tool:active { transform: scale(0.95); }
.nav-tool.is-active {
  background: rgba(255, 45, 111, 0.16);
  color: var(--mn-accent-2);
  border-color: rgba(255, 45, 111, 0.32);
}
.nav-tool-kbd {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.nav-tool-label {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}
/* Refined avatar in account group */
.avatar {
  width: 32px !important; height: 32px !important;
  border-radius: 50% !important;
  background: var(--mn-accent-grad) !important;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}
.avatar:hover {
  border-color: var(--mn-text);
  transform: scale(1.05);
}

/* Refined search-box — smaller, plays nicely with tools */
.search-box {
  height: 36px !important;
  padding: 0 12px !important;
  gap: 8px !important;
  border-radius: 8px !important;
  border: 1px solid var(--mn-border) !important;
  background: rgba(255,255,255,0.04) !important;
  transition: width 0.2s ease, background 0.15s, border-color 0.15s;
  width: 220px;
}
.search-box:focus-within {
  width: 280px;
  background: rgba(255,255,255,0.08) !important;
  border-color: var(--mn-accent-2) !important;
}
.search-box svg { color: var(--mn-text-dim); flex-shrink: 0; }
.search-box input {
  font-size: 0.88rem;
  width: 100% !important;
  background: transparent !important;
  color: var(--mn-text);
}

/* Hide AUTO-injected legacy buttons (search-ui, music, radio, browse, command-palette) — replaced by .nav-tool */
.open-search-btn,
.open-music-btn,
.open-radio-btn,
.open-browse-btn,
.cp-trigger,
.nav-bell + button:not(.nav-tool):not(.avatar) {
  display: none !important;
}

/* Mobile collapse */
@media (max-width: 900px) {
  .nav-tools { gap: 2px; }
  .nav-divider { display: none; }
  .nav-tool { height: 30px; padding: 0 8px; }
  .nav-tool-label { display: none; }
  .search-box { width: 36px !important; padding: 0 8px !important; }
  .search-box input { display: none; }
  .search-box.expanded { width: 200px !important; padding: 0 12px !important; }
  .search-box.expanded input { display: block; }
}
@media (max-width: 600px) {
  .navbar-row-secondary {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .navbar-row-secondary::-webkit-scrollbar { display: none; }
  .nav-tool-spacer { display: none; }
}

/* ---------- Navbar glass ---------- */
.navbar {
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.92) 10%, rgba(10, 10, 15, 0.4) 70%, transparent) !important;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* ============================================================
   OLED DESIGN TOKENS — Pitch Black + Surgical Glassmorphism
   Per 2026 mobile UX best practices:
   - True #000 only on OLED-aware media query
   - Glass on TRANSIENT layers only (sheets, mini-player), not chrome
   - backdrop-filter capped at 20px (mobile GPU budget)
   - Reduced-motion swaps blur for solid surface
   ============================================================ */
:root {
  --oled-bg: #000000;
  --oled-surface-1: #0A0A0F;
  --oled-surface-2: #14141A;
  --oled-glass: rgba(15, 15, 20, 0.65);
  --oled-glass-strong: rgba(20, 20, 26, 0.85);
  --oled-border: rgba(255, 255, 255, 0.08);
  --oled-border-bright: rgba(255, 255, 255, 0.14);
  --neon-cyan: #00E5FF;
  --neon-magenta: #FF003C;
  --neon-crimson: #FF003C;
  --text-pure: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.62);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --tap-min: 44px; /* iOS HIG / Material 48dp ≈ 44pt */
}

/* Glass component — applied SELECTIVELY, not on every panel */
.oled-glass {
  background: var(--oled-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--oled-border);
}
@media (prefers-reduced-motion: reduce) {
  .oled-glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 10, 15, 0.95);
  }
}
/* Skip glass on low-end Android (no hover, low DPI) — solid fallback */
@supports not (backdrop-filter: blur(1px)) {
  .oled-glass { background: rgba(10, 10, 15, 0.95); }
}

/* Neon focus ring — replaces default outline for keyboard/D-pad */
.oled-focus:focus-visible,
.oled-focus button:focus-visible,
.oled-focus a:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
}

/* Mobile thumb-zone safe nav — bottom 1/3 reserved for primary actions */
@media (max-width: 720px) {
  .thumb-zone-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 10px 12px calc(10px + var(--safe-bottom));
    z-index: 80;
    display: flex; gap: 8px; justify-content: space-around;
    background: var(--oled-glass-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid var(--oled-border);
  }
  .thumb-zone-bar button {
    min-width: var(--tap-min);
    min-height: var(--tap-min);
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
  }
  .thumb-zone-bar button.active { color: var(--neon-cyan); }
}

/* OLED-aware body — only when device reports HDR/wide-gamut OLED screen */
@media (dynamic-range: high), (color-gamut: p3) {
  body { background: var(--oled-bg); }
}

/* ---------- Nav Filters Row (Row 3) — aliniat cu Row 2 (4% from edge) ---------- */
.navbar-row-filters {
  padding: 4px 4% 8px !important;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.navbar-row-filters button {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--mn-text-dim, #cbd0d8);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.navbar-row-filters button:hover {
  background: rgba(255,255,255,0.08);
  color: var(--mn-text, #fff);
  border-color: rgba(255,255,255,0.16);
}
.navbar-row-filters button.active {
  background: rgba(229, 9, 20, 0.16);
  color: #fff;
  border-color: rgba(229, 9, 20, 0.45);
}
@media (max-width: 1100px) {
  .navbar-row-filters { padding-left: calc(4% + 80px) !important; }
}
@media (max-width: 720px) {
  .navbar-row-filters {
    padding-left: 4% !important;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .navbar-row-filters::-webkit-scrollbar { display: none; }
  .navbar-row-filters button { white-space: nowrap; }
}

/* ---------- Nav Prime — 5 prominent buttons ---------- */
.nav-prime {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
  padding: 0;
}
.nav-prime .np-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--mn-text-dim, #cbd0d8);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.12s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.nav-prime .np-btn:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.nav-prime .np-btn.active {
  background: rgba(229, 9, 20, 0.18);
  color: #fff;
  border-color: rgba(229, 9, 20, 0.5);
}
.nav-prime .np-icon {
  font-size: 1.05rem;
  line-height: 1;
}
.nav-prime .np-jarvis {
  background: linear-gradient(135deg, #ff2d6f 0%, #e50914 50%, #c10aff 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.35);
  font-weight: 700;
}
.nav-prime .np-jarvis:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(229, 9, 20, 0.55);
  filter: brightness(1.1);
}
.nav-prime .np-jarvis .np-icon {
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.6));
}

/* Responsive: collapse labels on small screens */
@media (max-width: 1100px) {
  .nav-prime .np-btn:not(.np-jarvis) .np-label { display: none; }
  .nav-prime .np-btn:not(.np-jarvis) { padding: 9px 12px; }
}
@media (max-width: 720px) {
  .nav-prime { gap: 4px; margin-left: 8px; }
  .nav-prime .np-btn { padding: 7px 10px; font-size: 0.85rem; }
  .nav-prime .np-jarvis .np-label { display: none; }
}
@media (max-width: 520px) {
  .nav-prime .np-btn { padding: 6px 8px; }
  .nav-prime .np-icon { font-size: 1.2rem; }
}
.navbar.scrolled, .navbar.glass {
  background: rgba(12, 12, 18, 0.78) !important;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--mn-border);
}

.nav-links button, .nav-links a {
  font-weight: 500;
  color: var(--mn-text-dim);
  font-size: 0.95rem;
  transition: color 0.15s;
}
.nav-links button:hover, .nav-links a:hover { color: var(--mn-text); }
.nav-links button.active, .nav-links a.active {
  color: var(--mn-text);
  font-weight: 600;
}

.search-box {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--mn-border) !important;
  border-radius: var(--mn-r-md) !important;
  transition: border-color 0.15s, background 0.15s;
}
.search-box:focus-within {
  border-color: var(--mn-accent-2) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}
.search-box input { font-size: 0.9rem; }

/* ---------- Hero refined ---------- */
.hero { min-height: 80vh; }
.hero-fade {
  background:
    linear-gradient(to right, rgba(10, 10, 15, 0.9) 0%, rgba(10, 10, 15, 0.5) 35%, transparent 65%),
    linear-gradient(to top, var(--mn-bg) 0%, transparent 35%) !important;
}
.hero-badge {
  background: var(--mn-accent-soft) !important;
  color: var(--mn-accent-2) !important;
  border: 1px solid rgba(255, 45, 111, 0.3) !important;
  border-radius: var(--mn-r-pill) !important;
  padding: 5px 12px !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}
.hero-title {
  font-size: 3.8rem !important;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.98 !important;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.55) !important;
}
.hero-desc { font-size: 1.05rem; line-height: 1.5; color: var(--mn-text-dim); max-width: 540px; }
.hero-meta { color: var(--mn-text-dim); font-size: 0.9rem; }
.hero-meta .match { color: var(--mn-success) !important; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--mn-r-md) !important;
  padding: 12px 26px !important;
  font-weight: 600 !important;
  font-size: 0.98rem !important;
  letter-spacing: -0.01em;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-play {
  background: #fff !important;
  color: #0a0a0f !important;
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.15);
}
.btn-play:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255, 255, 255, 0.22); }
.btn-info {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid var(--mn-border);
  color: var(--mn-text) !important;
  backdrop-filter: blur(10px);
}
.btn-info:hover { background: rgba(255, 255, 255, 0.18) !important; }

.btn-icon {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--mn-border) !important;
  color: var(--mn-text);
  transition: border-color 0.15s, background 0.15s;
}
.btn-icon:hover {
  border-color: var(--mn-accent-2) !important;
  background: var(--mn-accent-soft) !important;
}

/* ---------- Cards refined ---------- */
.card {
  border-radius: var(--mn-r-md) !important;
  background: var(--mn-surface);
  transition: transform 0.22s cubic-bezier(.21,.86,.5,1), box-shadow 0.22s, z-index 0s 0s;
}
.card:hover, .card:focus-visible {
  transform: scale(1.18) translateY(-14px) !important;
  box-shadow: var(--mn-shadow-lg) !important;
  outline: none;
  z-index: 10;
}
.card.nfx-placeholder {
  background: linear-gradient(135deg, var(--mn-surface) 0%, var(--mn-surface-2) 50%, var(--mn-surface) 100%) !important;
}
.card-overlay {
  background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 15, 0.92) 88%) !important;
  padding: 14px !important;
}
.card-title {
  font-size: 0.92rem !important;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-actions button {
  background: #fff;
  color: #0a0a0f;
  font-weight: 700;
}
.card-actions button.ghost {
  background: rgba(0, 0, 0, 0.5);
  color: var(--mn-text);
  border-color: var(--mn-border);
}

/* ---------- Row titles ---------- */
.row-title {
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  color: var(--mn-text);
  letter-spacing: -0.02em;
  margin-bottom: 8px !important;
}

/* Detail + player modals must layer above ALL overlays (browse, search,
   music, radio, TV, command palette) so clicking a card inside an
   overlay surfaces the detail popup ABOVE, not below. */
.modal, .player-modal { z-index: 250 !important; }

/* ---------- Modal refined ---------- */
.modal-content {
  background: var(--mn-surface) !important;
  border: 1px solid var(--mn-border);
  border-radius: var(--mn-r-lg) !important;
  box-shadow: var(--mn-shadow-lg) !important;
}
.modal-hero-fade {
  background: linear-gradient(to top, var(--mn-surface) 5%, transparent 60%) !important;
}
.modal-hero-info h2 {
  font-size: 2.4rem !important;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.modal-meta .match { color: var(--mn-success) !important; font-weight: 700; }

/* ---------- AI section ---------- */
/* 2-row navbar ≈ 110px tall, so we push content down generously. */
.ai-section {
  padding: 28px 4% 8px !important;
  background: linear-gradient(180deg, rgba(255, 45, 111, 0.04), transparent);
  position: relative;
  z-index: 4;
}
.ai-bar { padding-top: 4px; }
#aiMoodChips {
  margin-top: 12px;
  min-height: 44px;
  padding: 6px 0;
}
@media (max-width: 720px) {
  #aiMoodChips { gap: 6px; }
}
.ai-title {
  color: var(--mn-text-dim) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.14em !important;
}
.ai-ask-wrap input {
  background: var(--mn-surface) !important;
  border-color: var(--mn-border) !important;
  border-radius: var(--mn-r-md) !important;
}
.ai-ask-wrap input:focus { border-color: var(--mn-accent-2) !important; }
.ai-chip {
  background: var(--mn-surface) !important;
  border-color: var(--mn-border) !important;
  color: var(--mn-text-dim) !important;
  border-radius: var(--mn-r-pill) !important;
  font-weight: 500;
  transition: all 0.15s;
}
.ai-chip:hover, .ai-chip.active {
  background: var(--mn-accent-grad) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* ---------- Footer refined ---------- */
.footer { color: var(--mn-text-muted) !important; }
.footer-links a { color: var(--mn-text-muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--mn-text-dim); }

/* ---------- Provider switcher (NEW) ---------- */
.provider-switcher {
  position: absolute; top: 18px; left: 18px;
  display: flex; gap: 6px; flex-wrap: wrap;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--mn-border);
  border-radius: var(--mn-r-md);
  padding: 8px;
  z-index: 5;
  max-width: 70%;
}
.provider-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--mn-text-dim);
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: var(--mn-r-sm);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.provider-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--mn-text);
}
.provider-pill.active {
  background: var(--mn-accent-grad);
  color: #fff;
  font-weight: 600;
}

/* ---------- Scrollbar refinement ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--mn-border);
  border-radius: 10px;
  border: 2px solid var(--mn-bg);
}
::-webkit-scrollbar-thumb:hover { background: #404060; }

/* ---------- Focus ring matches accent ---------- */
:focus-visible {
  outline: 2px solid var(--mn-accent-2) !important;
  outline-offset: 3px !important;
  border-radius: var(--mn-r-sm);
}

/* ---------- Reduce-motion respected ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .card:hover { transform: none !important; }
}

/* ============================================================
   📱 TINY MOBILE (≤380px) — minimum viable layout
   ============================================================ */
@media (max-width: 380px) {
  .navbar { padding: 8px 3% !important; gap: 6px; }
  .logo { font-size: 1.1rem !important; }
  .logo-mark { width: 22px; height: 22px; font-size: 0.85rem; margin-right: 4px; }
  .nav-tool { width: 28px !important; height: 28px !important; }
  .nav-tool svg { width: 14px; height: 14px; }
  .search-box { width: 28px !important; padding: 0 6px !important; }
  /* Show only essential tools: browse + music + avatar */
  .nav-tool[data-tool="cmdk"],
  .nav-tool[data-tool="ai"],
  .nav-tool[data-tool="theme"],
  .nav-tool[data-tool="tv"],
  .nav-tool[data-tool="radio"],
  .nav-tool.nav-bell { display: none !important; }
  .hero-title { font-size: 1.4rem !important; }
  .hero-buttons .btn { padding: 7px 14px !important; font-size: 0.82rem !important; gap: 4px; }
  .card { flex: 0 0 120px !important; }
  .row-title { font-size: 0.92rem !important; }
  .ai-section { padding: 10px 3% 2px !important; }
  .ai-title { font-size: 0.78rem !important; }
}

/* ============================================================
   📱 MOBILE LAYOUT (≤480px)
   - Tighter spacing, single-col grids, larger tap targets
   ============================================================ */
@media (max-width: 480px) {
  .navbar { padding: 12px 4% !important; }
  .logo { font-size: 1.3rem !important; }
  .logo-mark { width: 26px; height: 26px; font-size: 0.95rem; }
  .nav-categories, .nav-links { display: none !important; }
  .nav-divider { display: none; }
  .search-box { width: 36px !important; }
  .nav-tool { width: 32px; height: 32px; }

  .hero { min-height: 70vh !important; padding: 0 4% 5vh !important; }
  .hero-title { font-size: 1.7rem !important; }
  .hero-desc { font-size: 0.85rem !important; max-width: 100%; }
  .hero-buttons { gap: 8px; }
  .hero-buttons .btn { padding: 9px 18px !important; font-size: 0.88rem !important; }

  .card {
    flex: 0 0 140px !important;
    border-radius: 8px !important;
  }
  .card:hover, .card:focus-visible {
    transform: scale(1.08) translateY(-6px) !important;
  }
  .row-title { font-size: 1rem !important; padding: 0 4% !important; }

  .ai-section { padding: 14px 4% 2px !important; }
  .ai-ask-wrap { flex-direction: column; }
  .ai-ask-wrap .btn { width: 100%; }

  /* Modal full-screen on mobile */
  .modal-content { width: 100% !important; min-height: 100vh; border-radius: 0 !important; }
  .modal-hero { min-height: 220px !important; }
  .modal-hero-info h2 { font-size: 1.5rem !important; }
  .modal-body { padding: 16px 4% !important; }
  .modal-grid { grid-template-columns: 1fr !important; gap: 14px !important; }

  /* Overlay sections (search/browse/music/radio/tv) — stack vertical */
  .bui-body, .tui-body, .rui-body { grid-template-columns: 1fr !important; }
  .bui-sidebar, .tui-side, .rui-side { padding: 8px !important; }

  /* Hide tertiary nav tools on tiny screens */
  .nav-tool[data-tool="ai"], .nav-tool[data-tool="theme"] { display: none !important; }
}

/* ============================================================
   📺 SMART TV LAYOUT (≥1920px)
   - Larger fonts, wider focus rings for remote nav, generous tap targets
   ============================================================ */
@media (min-width: 1920px) {
  html { font-size: 18px; }
  .navbar { padding: 22px 5%; }
  .logo { font-size: 2rem !important; }
  .nav-tool { width: 48px; height: 48px; }
  .nav-tool svg { width: 24px; height: 24px; }

  .hero { min-height: 90vh; }
  .hero-title { font-size: 5rem !important; letter-spacing: -0.05em; }
  .hero-desc { font-size: 1.3rem !important; max-width: 720px; line-height: 1.5; }
  .hero-buttons .btn { padding: 16px 36px !important; font-size: 1.25rem !important; }

  .card { flex: 0 0 320px !important; border-radius: 14px !important; }
  .card:hover, .card:focus-visible {
    transform: scale(1.25) translateY(-30px) !important;
  }
  .row-title { font-size: 1.6rem !important; }

  /* HUGE focus ring for remote-navigation visibility */
  :focus-visible {
    outline: 5px solid var(--mn-accent-2) !important;
    outline-offset: 6px !important;
    box-shadow: 0 0 30px rgba(255, 45, 111, 0.4) !important;
  }

  .modal-content { width: min(1400px, 90%) !important; }
  .modal-hero-info h2 { font-size: 3.6rem !important; }
  .modal-desc { font-size: 1.2rem !important; line-height: 1.6 !important; }

  /* Hide mouse-hover-only quick preview on TV (use modal) */
  .card .quick-preview { display: none !important; }
}

/* Smart TV remote D-pad navigation: scroll items into view on focus */
.card:focus-visible {
  scroll-margin: 100px;
}

/* ============================================================
   MOBILE-RESPONSIVE NAVBAR (≤900px)
   Collapses links into a burger menu, search shrinks to icon.
   ============================================================ */
.mn-burger {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--mn-border);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--mn-text);
  font-size: 1.2rem;
  align-items: center; justify-content: center;
}
.mn-burger:hover { background: rgba(255,255,255,0.12); }

@media (max-width: 900px) {
  .mn-burger { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--mn-border);
    padding: 12px 4%;
    gap: 4px;
    transform: translateY(-100%);
    transition: transform 0.25s ease;
    z-index: 99;
  }
  .nav-links.is-open {
    transform: translateY(0);
  }
  .nav-links button, .nav-links a {
    padding: 10px 14px;
    border-radius: 8px;
    text-align: left;
  }
  .nav-links button:hover, .nav-links button.active {
    background: rgba(255,255,255,0.06);
  }
  .search-box {
    width: 36px; padding: 6px;
    overflow: hidden;
    transition: width 0.2s ease;
  }
  .search-box.expanded { width: 200px; padding: 6px 10px; }
  .search-box input { display: none; }
  .search-box.expanded input { display: block; }
  /* Nav extras (Music/Radio/Browse buttons) collapse to icons */
  .open-music-btn, .open-radio-btn, .open-browse-btn, .open-search-btn, .cp-trigger {
    font-size: 0 !important;
    padding: 8px !important;
  }
  .open-music-btn::before { content: "🎵"; font-size: .9rem; }
  .open-radio-btn::before { content: "📻"; font-size: .9rem; }
  .open-browse-btn::before { content: "🗂️"; font-size: .9rem; }
  .cp-trigger::before { content: "⌘"; font-size: .9rem; }
  .hero-title { font-size: 2.2rem !important; }
  .hero-desc { font-size: .92rem; }
  .ai-section { padding: 16px 4% 4px !important; }
}

/* ============================================================
   GREEN DOT — universal playable indicator
   Applied via CSS to:
   - Movie/TV cards (.card.is-playable)
   - Music cards (.mui-card with preview/stream URL)
   - Radio rows (.rui-row — they're all live streams)
   - TV rows (.tui-row — already dotted; here for consistency)
   ============================================================ */
@keyframes mn-pulse-green {
  0%, 100% { box-shadow: 0 0 0 2px rgba(0,0,0,0.6), 0 0 8px rgba(46,204,113,0.5); }
  50%      { box-shadow: 0 0 0 2px rgba(0,0,0,0.6), 0 0 16px rgba(46,204,113,0.9); }
}

/* Music cards — green dot for tracks with full streams (Audius/Piped),
   muted for preview-only (iTunes/Deezer 30s). */
.mui-card { position: relative; }
.mui-card::after {
  content: ""; position: absolute;
  top: 8px; right: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(180,180,180,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 3;
}
.mui-card.is-full-stream::after {
  background: #2ecc71;
  border: 0;
  animation: mn-pulse-green 2.4s ease-in-out infinite;
}

/* Radio rows — always live (green dot, always pulsing) */
.rui-row { position: relative; }
.rui-row::after {
  content: ""; position: absolute;
  top: 12px; right: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 2px #161616, 0 0 8px rgba(46,204,113,0.5);
  animation: mn-pulse-green 2.4s ease-in-out infinite;
}

/* ============================================================
   PLAYABLE INDICATOR — green dot top-right on cards.
   Marks items that the embed providers can play (have TMDB ID).
   ============================================================ */
.card.is-playable::before {
  content: "";
  position: absolute;
  top: 8px; right: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.6),
    0 0 12px rgba(46, 204, 113, 0.6);
  z-index: 3;
  animation: mn-pulse-green 2.4s ease-in-out infinite;
}
@keyframes mn-pulse-green {
  0%, 100% { box-shadow: 0 0 0 2px rgba(0,0,0,0.6), 0 0 8px rgba(46,204,113,0.5); }
  50%      { box-shadow: 0 0 0 2px rgba(0,0,0,0.6), 0 0 16px rgba(46,204,113,0.9); }
}
.card:not(.is-playable)::before {
  content: "";
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(180, 180, 180, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 3;
}

/* ============================================================
   NETFLIX-LIKE PRE-PLAY POPUP (existing detail modal, refined)
   ============================================================ */
.modal-content {
  border-radius: 14px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.modal-hero {
  aspect-ratio: 16/9;
  position: relative;
  min-height: 360px;
}
.modal-hero-bg {
  filter: brightness(1.1) saturate(1.1);
}
.modal-hero-info {
  bottom: 30px !important;
  left: 36px !important;
  right: 36px !important;
}
.modal-hero-info h2 {
  font-size: 2.6rem !important;
  font-weight: 900 !important;
  margin-bottom: 18px !important;
  text-shadow: 0 6px 24px rgba(0,0,0,0.7) !important;
  background: linear-gradient(180deg, #fff 0%, #e0e0e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}
.modal-actions .btn-play {
  font-size: 1.05rem !important;
  padding: 14px 30px !important;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}
.modal-actions .btn-play::before {
  content: "🔗";
  font-size: 0.85rem;
  position: absolute;
  top: 4px; right: 6px;
  opacity: 0.6;
}
.modal-actions .btn-play::after {
  content: "Filă nouă";
  position: absolute;
  bottom: -22px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.modal-body { padding: 28px 36px 32px !important; }
.modal-meta {
  font-size: 1rem !important;
  margin-bottom: 16px !important;
}
.modal-desc {
  font-size: 1rem !important;
  line-height: 1.55 !important;
  color: var(--mn-text) !important;
}
.modal-side p { font-size: 0.95rem !important; }

/* ============================================================
   QUICK PREVIEW ON HOVER (sustained)
   When user hovers a card for >400ms, an info panel slides in
   with title + desc + year + match + source badge.
   ============================================================ */
.card .quick-preview {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.92) 60%);
  padding: 12px 14px 14px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
.card.previewing .quick-preview {
  transform: translateY(0);
  opacity: 1;
}
.qp-title {
  font-size: 0.95rem; font-weight: 700; color: #fff;
  margin-bottom: 4px; letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.qp-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.74rem; color: var(--mn-text-dim);
  margin-bottom: 6px;
}
.qp-match { color: var(--mn-success); font-weight: 700; }
.qp-source-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 1px 6px; border-radius: 999px;
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.qp-desc {
  font-size: 0.78rem; color: var(--mn-text-dim);
  line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
@media (max-width: 800px) {
  .card .quick-preview { display: none; }
}

/* ============================================================
   IMAGE TRANSITIONS — cards fade in when backdrop loads.
   app.js toggles .nfx-placeholder off when image probe succeeds.
   ============================================================ */
.card {
  background-color: var(--mn-surface);
  transition: background-color 0.3s ease;
}
/* Polished shimmer for cards waiting on their image. */
@keyframes mn-shimmer {
  0%   { background-position: -300px 0; }
  100% { background-position: 300px 0; }
}
.card.nfx-placeholder {
  background: linear-gradient(
    90deg,
    var(--mn-surface) 0%,
    var(--mn-surface-2) 50%,
    var(--mn-surface) 100%
  ) !important;
  background-size: 600px 100% !important;
  animation: mn-shimmer 2.2s linear infinite;
}

/* Reveal animation when backdrop loads (app.js adds .loaded class). */
@keyframes mn-card-reveal {
  0%   { opacity: 0.55; filter: blur(6px) saturate(0.7); }
  60%  { opacity: 0.92; filter: blur(1px) saturate(1); }
  100% { opacity: 1;    filter: blur(0) saturate(1); }
}
.card.loaded {
  animation: mn-card-reveal 0.45s ease-out;
  /* Counter the medianet-2026 .card { background: ... } shorthand which
     resets background-size to auto and background-repeat to repeat. We need
     cover/center/no-repeat or images tile and crop to top-left. */
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
.card.loaded .card-fallback { display: none; }

/* ============================================================
   POLISHED NO-POSTER FALLBACK
   Items from imdb-dataset / tmdb-dump don't have posters.
   Make the fallback look intentional (gradient by source) with
   a bold legible title + a small source badge.
   ============================================================ */
.card.nfx-placeholder .card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #1f1f2e 0%, #2a1a3a 50%, #1f1f2e 100%);
  color: var(--mn-text);
  border-radius: var(--mn-r-md);
}
/* Color-code by source via parent data-attribute. */
.card[data-source="imdb-dataset"].nfx-placeholder .card-fallback {
  background: linear-gradient(135deg, #2a1f0e 0%, #4a3220 50%, #2a1f0e 100%);
}
.card[data-source="tmdb-dump"].nfx-placeholder .card-fallback {
  background: linear-gradient(135deg, #0e1f2a 0%, #1a3548 50%, #0e1f2a 100%);
}
.card[data-source="anilist"].nfx-placeholder .card-fallback,
.card[data-source="jikan"].nfx-placeholder .card-fallback {
  background: linear-gradient(135deg, #2a0e1f 0%, #4a1a3a 50%, #2a0e1f 100%);
}
.card.nfx-placeholder .card-fallback::before {
  content: attr(data-source);
  display: inline-block;
  align-self: flex-start;
  text-transform: uppercase;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--mn-text-dim);
}
.card.nfx-placeholder .card-fallback {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
/* Once the real backdrop is loaded, the fallback hides via JS;
   no rule change here. */


/* ============================================================
   DESIGN-SYSTEM OVERHAUL (2026-05) — applied to ALL sections.
   - 8px spatial grid
   - Row tail padding so last card never clips at viewport edge
   - Card hover overlay refined: text bottom, play action TOP-RIGHT,
     gradient does not stomp readability
   - Mobile tuning: ≤480 phone, 481-768 tablet, 769-1024 small desktop
   - Cohesive overlay-section header pattern (TV / Radio / Music match)
   ============================================================ */

/* ---- 8px spatial system + safe row gutters ---- */
.row { padding: 0 clamp(16px, 4vw, 56px) !important; margin-bottom: 40px !important; }
.row-track {
  padding: 8px clamp(16px, 4vw, 56px) 48px 0 !important;
  scroll-padding: 0 16px;
  scroll-snap-type: x proximity;
}
.row-track > .card { scroll-snap-align: start; }
.row-title {
  font-size: clamp(1.05rem, 1.6vw, 1.4rem) !important;
  letter-spacing: -0.015em;
  margin: 0 0 12px !important;
}

/* ---- Card hover overlay: keep text legible, action TOP-RIGHT ---- */
.card-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.92) 92%) !important;
  padding: 16px 14px 12px !important;
  pointer-events: none;
}
.card:hover .card-overlay { pointer-events: auto; }
.card-actions { gap: 8px !important; }
/* Move primary actions row to BOTTOM-LEFT, give them breathing room.
   The big play ripple already lives at top-right via .card-play-ripple. */
.card-actions button {
  width: 30px !important; height: 30px !important;
  font-size: 0.78rem !important;
  background: #fff; color: #000;
  border: 0 !important;
  transition: transform 0.12s, background 0.12s;
}
.card-actions button:hover { transform: scale(1.08); background: #f5f5f5; }
.card-actions button.ghost {
  background: rgba(40, 40, 50, 0.85) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
}
.card-actions button.ghost:hover { background: rgba(60, 60, 75, 0.95) !important; }

/* ---- Hero polish ---- */
.hero { padding-bottom: 64px; }
.hero h1 { letter-spacing: -0.025em; line-height: 1.05; }
.hero-meta { gap: 14px !important; }

/* ---- Section overlay headers: unified across TV / Radio / Music ---- */
#tv-ui-overlay .tui-top,
#radio-ui-overlay .rui-top,
#music-ui-overlay .mui-top {
  padding: 14px clamp(16px, 4vw, 32px) !important;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  background: rgba(10, 10, 18, 0.92) !important;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
#tv-ui-overlay .tui-input,
#radio-ui-overlay .rui-input,
#music-ui-overlay .mui-input {
  height: 40px;
  font-size: 0.95rem;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  transition: background 0.15s, border-color 0.15s;
}
#tv-ui-overlay .tui-input:focus,
#radio-ui-overlay .rui-input:focus,
#music-ui-overlay .mui-input:focus {
  background: rgba(255,255,255,0.1) !important;
  border-color: var(--mn-accent-2, #ff2d6f) !important;
  outline: none;
}

/* ---- Music discovery home: tighter mood/decade alignment ---- */
.mui-mood-grid {
  gap: 14px !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
}
.mui-mood-tile { aspect-ratio: 1.7/1 !important; padding: 16px !important; font-size: 0.95rem !important; }
.mui-decade-row { gap: 8px !important; }

/* ---- Mini-player — more refined chrome ---- */
.mui-bottom {
  padding: 10px 18px !important;
  height: 72px;
  gap: 14px !important;
}
.mui-now-art { width: 52px !important; height: 52px !important; border-radius: 6px !important; }
.mui-now-title { font-size: 0.95rem !important; letter-spacing: -0.01em; }
.mui-now-artist { font-size: 0.78rem !important; }

/* ============================================================
   TV + RADIO ROW POLISH — consistent feel with music section
   - Compact rows with elegant hover (Netflix-like list, not tile grid)
   - Thumbnail/logo gets soft border + subtle scale on hover
   - Live "playing" state has accent glow
   - Country badge + bitrate/quality chips
   ============================================================ */
#tv-ui-overlay .tui-list,
#radio-ui-overlay .rui-list {
  display: flex; flex-direction: column;
  padding: 8px clamp(16px, 4vw, 32px) 80px;
  gap: 6px;
}
#tv-ui-overlay .tui-row,
#radio-ui-overlay .rui-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px !important;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
#tv-ui-overlay .tui-row:hover,
#radio-ui-overlay .rui-row:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
#tv-ui-overlay .tui-row.playing,
#radio-ui-overlay .rui-row.playing {
  background: linear-gradient(90deg, rgba(229,9,20,0.18) 0%, rgba(229,9,20,0.04) 100%);
  border-color: rgba(229,9,20,0.45);
  box-shadow: 0 0 24px rgba(229,9,20,0.18);
}
#tv-ui-overlay .tui-logo,
#radio-ui-overlay .rui-fav {
  width: 56px !important; height: 56px !important;
  border-radius: 8px !important;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.15s;
}
#tv-ui-overlay .tui-row:hover .tui-logo,
#radio-ui-overlay .rui-row:hover .rui-fav {
  transform: scale(1.06);
}
#tv-ui-overlay .tui-row-info,
#radio-ui-overlay .rui-row-info {
  flex: 1; min-width: 0;
}
#tv-ui-overlay .tui-row-name,
#radio-ui-overlay .rui-row-name {
  font-weight: 700; font-size: 0.98rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
#tv-ui-overlay .tui-row-meta,
#radio-ui-overlay .rui-row-meta {
  font-size: 0.78rem; color: rgba(255,255,255,0.55);
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; gap: 8px; align-items: center;
}
/* Country flag chips look like proper meta */
#tv-ui-overlay .tui-row-meta .flag,
#radio-ui-overlay .rui-row-meta .flag {
  font-size: 1.1em; line-height: 1;
}
/* Local-country prioritized rows get a subtle left bar */
#tv-ui-overlay .tui-row[data-local="1"],
#radio-ui-overlay .rui-row[data-local="1"] {
  border-left: 3px solid var(--mn-accent-2, #ff2d6f);
  padding-left: 11px !important;
}
/* Play button on the right for clarity */
#tv-ui-overlay .tui-play,
#radio-ui-overlay .rui-play {
  width: 36px !important; height: 36px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.12s;
}
#tv-ui-overlay .tui-row:hover .tui-play,
#radio-ui-overlay .rui-row:hover .rui-play {
  background: #1db954;
  border-color: #1db954 !important;
  color: #000;
  transform: scale(1.08);
}
#tv-ui-overlay .tui-row.playing .tui-play,
#radio-ui-overlay .rui-row.playing .rui-play {
  background: #e50914;
  border-color: #e50914 !important;
  color: #fff;
}

/* ============================================================
   MOBILE FRIENDLY (≤768px and ≤480px breakpoints)
   ============================================================ */
@media (max-width: 1024px) {
  .card { flex: 0 0 200px !important; }
  .card:hover, .card:focus-visible { transform: scale(1.06) translateY(-6px) !important; }
}
@media (max-width: 768px) {
  .row { padding: 0 14px !important; margin-bottom: 28px !important; }
  .row-track { padding: 6px 14px 36px 0 !important; }
  .card { flex: 0 0 168px !important; }
  .row-title { font-size: 1.05rem !important; }
  /* Slimmer mini-player on mobile */
  .mui-bottom {
    height: 64px !important;
    padding: 8px 12px !important;
    gap: 10px !important;
  }
  .mui-now-art { width: 44px !important; height: 44px !important; }
  .mui-now-title { font-size: 0.85rem !important; }
  .mui-now-artist { font-size: 0.7rem !important; }
  /* Hide secondary controls on small screens */
  .mui-now-prev, .mui-now-next { display: none !important; }
  /* Section overlays go full-bleed bottom-sheet style on phones */
  #music-ui-overlay, #tv-ui-overlay, #radio-ui-overlay {
    padding: 0 !important;
  }
  /* Bigger touch targets for play button */
  .card .card-play-ripple { top: 8px; right: 8px; width: 34px; height: 34px; }
  /* Thumbnail-first card layout — text under, not overlapped */
  .card-overlay { padding: 10px 10px 8px !important; }
  .card-actions button { width: 36px !important; height: 36px !important; } /* iOS 44px target close */
  /* Prevent horizontal scroll spillover on phones */
  body { overflow-x: hidden; }
}
@media (max-width: 480px) {
  .row { padding: 0 10px !important; margin-bottom: 22px !important; }
  .card { flex: 0 0 144px !important; }
  .row-title { font-size: 0.95rem !important; }
  /* Mood tiles 2-up on phone */
  .mui-mood-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .mui-mood-tile { aspect-ratio: 1.5/1 !important; font-size: 0.85rem !important; padding: 12px !important; }
  /* Profile dropdown narrower */
  .pd-menu { min-width: 220px !important; right: -8px !important; }
}

/* ============================================================
   TOUCH-FRIENDLY: hover styles disabled on coarse pointers
   so tapping doesn't get stuck in "previewing" state on mobile.
   ============================================================ */
@media (hover: none) {
  .card:hover, .card:focus-visible {
    transform: scale(1.02) !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.4) !important;
  }
  /* MOBILE FIX: hide the small action-row play button — keep only the
     bigger ripple play button (Netflix-style affordance, top-right).
     Eliminates the duplicate-play-button confusion. */
  .card-overlay .card-actions { display: none !important; }
  .card .card-play-ripple { opacity: 1 !important; transform: scale(1) translateZ(0) !important; }
  .card-overlay {
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.85) 100%) !important;
    opacity: 1 !important;
  }
}

/* ============================================================
   MOBILE UX OVERHAUL — tap targets ≥44px, compact navbar,
   readable modal, less visual chaos.
   ============================================================ */
/* Push Continue Watching (and rest of rows) below the now 3-row navbar.
   The original `.rows { margin-top: -10vh }` pulled rows up over hero
   bottom, which overlaps the taller navbar. Reduce on desktop, kill on mobile. */
.rows { margin-top: -4vh !important; padding-top: 16px !important; }

/* ---------- TV: Recente sticky strip (top 8 channels) ---------- */
.tui-recent-row {
  position: sticky; top: 0; z-index: 5;
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--oled-glass-strong, rgba(20,20,26,0.92)) 0%, var(--oled-glass, rgba(15,15,20,0.65)) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--oled-border, rgba(255,255,255,0.08));
  margin-bottom: 8px;
}
.tui-recent-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon-cyan, #00E5FF);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.tui-recent-strip {
  display: flex; gap: 8px;
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.tui-recent-strip::-webkit-scrollbar { display: none; }
.tui-recent-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s;
  min-height: 36px;
}
.tui-recent-chip:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.35);
  transform: translateY(-1px);
}
.tui-recent-chip img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1a;
}
.tui-recent-chip span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Music sonic globe ---------- */
.mui-view-toggle {
  background: rgba(255, 0, 60, 0.10);
  border: 1px solid rgba(255, 0, 60, 0.32);
  color: var(--neon-magenta);
  width: 38px; height: 38px;
  border-radius: 10px;
  font-size: 1.1rem; cursor: pointer;
  margin-right: 6px;
  transition: background .15s, transform .12s;
}
.mui-view-toggle:hover { background: rgba(255, 0, 60, 0.18); transform: scale(1.06); }
.mui-globe-wrap {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; gap: 14px;
  background: radial-gradient(ellipse at center, rgba(255,0,60,0.06), transparent 60%), var(--oled-bg, #000);
  min-height: 60vh;
}
.mui-globe-canvas {
  display: block; max-width: 100%;
  cursor: grab; touch-action: none;
}
.mui-globe-canvas:active { cursor: grabbing; }
.mui-globe-legend {
  color: var(--text-muted, rgba(255,255,255,0.62));
  font-size: 0.85rem;
  text-align: center;
  padding: 10px 16px;
  background: var(--oled-glass, rgba(15,15,20,0.65));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  border: 1px solid var(--oled-border, rgba(255,255,255,0.08));
}

/* ---------- Radio cobe globe view ---------- */
.rui-view-toggle {
  background: rgba(0, 229, 255, 0.10);
  border: 1px solid rgba(0, 229, 255, 0.32);
  color: var(--neon-cyan);
  width: 38px; height: 38px;
  border-radius: 10px;
  font-size: 1.1rem; cursor: pointer;
  margin-right: 6px;
  transition: background .15s, transform .12s;
}
.rui-view-toggle:hover { background: rgba(0, 229, 255, 0.18); transform: scale(1.06); }
.rui-view-toggle:active { transform: scale(0.95); }
.rui-globe-wrap {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  background:
    radial-gradient(ellipse at center, rgba(0,229,255,0.08), transparent 60%),
    var(--oled-bg, #000);
  min-height: 60vh;
}
.rui-globe-canvas {
  display: block;
  max-width: 100%;
  cursor: grab;
  touch-action: none;
}
.rui-globe-canvas:active { cursor: grabbing; }
.rui-globe-tooltip {
  position: absolute;
  background: var(--oled-glass, rgba(15,15,20,0.85));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff; padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid var(--oled-border, rgba(255,255,255,0.1));
  pointer-events: none;
  z-index: 10;
}

/* Body horizontal overflow guard — agent #4 reported 61px overflow on 390px viewport */
html, body { max-width: 100vw; overflow-x: hidden; }

/* Spring physics easings (Apple-flavored) — apply to interactive transforms */
:root {
  --ease-apple-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-apple-inout: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card { transition: transform .22s var(--ease-apple-out), box-shadow .22s ease !important; }
.card:active { transform: scale(0.97) !important; }
.np-btn:active, .nav-tool:active { transform: scale(0.95); transition: transform .12s var(--ease-apple-out); }
.btn-play:active { transform: scale(0.97); }

/* Native scroll-momentum + rubber-band damping on row tracks */
.row-track { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }

/* WCAG 2.2 SC 2.5.8: minimum 24×24 CSS px tap targets with 8px gap fallback */
@media (hover: none) {
  button, a, [role="button"] { min-height: 24px; min-width: 24px; }
}

/* Reduced transparency (iOS 17+ accessibility setting) — skip glass blur */
@media (prefers-reduced-transparency: reduce) {
  .oled-glass, .glass-panel, [class*="glass"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 10, 15, 0.96) !important;
  }
}

/* OLED upgrade for modal — pitch black surface + neon focus on Play */
.modal { background: rgba(0, 0, 0, 0.92) !important; }
.modal-content {
  background: var(--oled-surface-1) !important;
  border: 1px solid var(--oled-border) !important;
}
.modal-actions .btn-play {
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.45);
  transition: box-shadow .2s, transform .2s;
}
.modal-actions .btn-play:hover,
.modal-actions .btn-play:focus-visible {
  box-shadow: 0 6px 26px rgba(229, 9, 20, 0.7);
  transform: translateY(-1px);
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}
.card:focus-visible {
  outline: 2px solid var(--neon-cyan) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35) !important;
}

@media (max-width: 720px) {
  .rows { margin-top: 0 !important; padding-top: 24px !important; }

  /* Compact navbar: smaller padding, single row priority */
  .navbar-row-primary { padding: 8px 4% 4px !important; }
  .navbar-row-secondary { padding: 4px 4% 8px !important; }
  .navbar-row-filters { padding: 2px 4% 6px !important; }
  .nav-prime { gap: 4px; margin-left: 6px; }
  .logo-text { display: none; }   /* keep just M mark on tight screens */

  /* Hero buttons → 44px tap target (iOS minimum) */
  .hero-buttons .btn {
    min-height: 44px !important;
    padding: 10px 18px !important;
    font-size: 0.95rem !important;
  }

  /* Provider switcher: don't overlap navbar */
  .provider-switcher { top: auto !important; bottom: 12px !important; }

  /* Card chaos reduction */
  .card-rank { font-size: 1.1rem !important; padding: 2px 6px !important; }
  .is-playable::before { display: none; }   /* stop the green-dot stack */

  /* Modal title fits screen */
  .modal-hero { min-height: 200px !important; }
  .modal-hero-info h2 { font-size: 1.4rem !important; line-height: 1.15 !important; }
  .modal-hero-info {
    left: 16px !important; right: 16px !important; bottom: 14px !important;
  }
  .modal-actions .btn-play::after,
  .modal-actions .btn-play::before { display: none !important; }
  .modal-actions .btn { min-height: 44px !important; }
}
@media (max-width: 480px) {
  .modal-hero-info h2 { font-size: 1.25rem !important; }
  .nav-prime .np-btn { padding: 6px 8px !important; font-size: 0.78rem !important; }
}

