/* StreamVault App CSS - V2.0 */
:root {
  --bg: #08080f;
  --surface: #0f0f1a;
  --card: #141420;
  --card2: #1a1a28;
  --border: #222235;
  --accent: #e8572a;
  --accent2: #f0a500;
  --text: #eeeef8;
  --muted: #6060a0;
  --success: #2ecc71;
  --danger: #e74c3c;
  --nav-h: 60px;
  --player-h: 0px;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── LOGIN ── */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 9999;
}
.login-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px 44px; width: 380px;
  max-width: calc(100vw - 32px);
  text-align: center;
  box-sizing: border-box;
}
.login-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px; letter-spacing: 3px; margin-bottom: 4px;
}
.login-logo span { color: var(--accent); }
.login-sub { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.l-input {
  width: 100%; background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px;
  padding: 12px 14px; border-radius: 8px; outline: none;
  margin-bottom: 12px; transition: border-color 0.2s;
}
.l-input:focus { border-color: var(--accent); }
.l-error { font-size: 13px; color: var(--danger); min-height: 20px; margin-bottom: 8px; }
.l-btn {
  width: 100%; background: var(--accent); border: none;
  color: white; font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600; padding: 13px;
  border-radius: 8px; cursor: pointer; transition: background 0.2s;
}
.l-btn:hover { background: #ff6535; }

/* ── SIDEBAR ── */
#main-app { display: flex !important; height: 100vh; overflow: hidden; }

#sidebar {
  width: 220px; min-width: 220px;
  background: #0e0e16;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: 100vh; position: fixed;
  left: 0; top: 0; z-index: 100;
  overflow-y: auto;
}
.sb-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 3px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; cursor: pointer;
}
.sb-logo span { color: var(--accent); }
.sb-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.sb-sep {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--muted); padding: 14px 18px 4px; opacity: 0.5;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; cursor: pointer;
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.sb-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sb-item.active { color: var(--text); background: rgba(232,87,42,0.1); border-left-color: var(--accent); }
.sb-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.sb-user {
  padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; color: var(--muted); font-size: 13px;
  position: relative; flex-shrink: 0;
}
.sb-user:hover { color: var(--text); }
.sb-user .user-menu {
  position: absolute; bottom: 56px; left: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; min-width: 180px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4); z-index: 200;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.um-item {
  padding: 12px 16px; font-size: 14px; cursor: pointer;
  transition: background 0.15s;
}
.um-item:hover { background: var(--card); }

/* ── TOPBAR ── */
#topbar {
  position: fixed;
  top: 0; left: 220px; right: 0;
  height: 52px; z-index: 90;
  background: rgba(8,8,15,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
}
.topbar-search {
  width: 320px;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px;
  padding: 8px 16px; border-radius: 20px; outline: none;
  transition: border-color 0.2s, width 0.3s;
}
.topbar-search:focus {
  border-color: var(--accent); width: 420px;
}
.topbar-search::placeholder { color: var(--muted); }

/* ── MAIN ── */
main#appMain {
  margin-left: 220px;
  margin-top: 52px;
  flex: 1; overflow-y: auto;
  min-height: calc(100vh - 52px);
  height: calc(100vh - 52px);
  padding-bottom: var(--player-h);
}
.section { display: none; }
.section.active { display: block; }

/* ── HERO ── */
.hero {
  position: relative; height: 440px;
  overflow: hidden; display: flex; align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(8,8,15,0.98) 0%,
    rgba(8,8,15,0.7) 50%,
    rgba(8,8,15,0.2) 100%
  ), linear-gradient(to top, rgba(8,8,15,1) 0%, transparent 40%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 44px 44px; max-width: 560px;
}
.hero-badge {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 10px;
}
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 60px; line-height: 1; letter-spacing: 1px;
  margin-bottom: 12px;
}
.hero-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; color: var(--muted); margin-bottom: 14px;
}
.hero-rating { color: var(--accent2); font-weight: 600; }
.hero-overview {
  font-size: 14px; color: #a0a0c8; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 22px;
}
.hero-actions { display: flex; gap: 12px; }
.btn-play {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: white; border: none;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600;
  padding: 13px 28px; border-radius: 8px; cursor: pointer;
  transition: all 0.2s;
}
.btn-play:hover { background: #ff6535; transform: translateY(-1px); }
.btn-info {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); color: var(--text); border: none;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  padding: 13px 24px; border-radius: 8px; cursor: pointer;
  backdrop-filter: blur(8px); transition: all 0.2s;
}
.btn-info:hover { background: rgba(255,255,255,0.18); }

/* ── ROWS ── */
.row-section { padding: 28px 28px 0; }
.row-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.row-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: 1.5px;
}
.row-count { font-size: 13px; color: var(--muted); }
.row-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding-bottom: 8px;
}

/* ── MEDIA CARD ── */
.mcard {
  cursor: pointer;
  transition: transform 0.25s;
  border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid transparent;
}
.mcard:hover { transform: translateY(-6px) scale(1.02); border-color: var(--border); }
.mcard:hover .mcard-overlay { opacity: 1; }
.mcard-poster {
  width: 100%; aspect-ratio: 2/3; object-fit: cover;
  display: block; background: var(--card2);
}
.mcard-poster-ph {
  width: 100%; aspect-ratio: 2/3; background: var(--card2);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; color: var(--muted); font-size: 11px;
}
.mcard-poster-ph span:first-child { font-size: 32px; }
.mcard-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.mcard-play { font-size: 44px; }
.mcard { position: relative; }
.mcard-info { padding: 8px 10px 10px; }
.mcard-title {
  font-size: 12px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mcard-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.mcard-rating { color: var(--accent2); font-weight: 600; }

/* ── MUSIC ROW ── */
.music-track {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; border-radius: 8px;
  cursor: pointer; transition: background 0.15s;
}
.music-track:hover { background: var(--card2); }
.music-track.now-playing { background: var(--card2); border: 1px solid rgba(232,87,42,0.3); }
.mt-icon { font-size: 18px; color: var(--muted); width: 28px; text-align: center; flex-shrink: 0; }
.music-track.now-playing .mt-icon { color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }
.mt-info { flex: 1; overflow: hidden; }
.mt-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-artist { font-size: 12px; color: var(--muted); }
.mt-album { font-size: 12px; color: var(--muted); flex-shrink: 0; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── GRID VIEW ── */
.grid-wrap { padding: 28px; }
.filter-bar {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap;
}
.filter-input {
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px;
  padding: 9px 14px; border-radius: 8px; outline: none; width: 260px;
  transition: border-color 0.2s;
}
.filter-input:focus { border-color: var(--accent); }
.filter-select {
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px;
  padding: 9px 14px; border-radius: 8px; outline: none; cursor: pointer;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

/* ── DETAIL PAGE ── */
.detail-page { min-height: 100vh; }
.detail-hero {
  height: 420px;
  background-size: cover;
  background-position: center top;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,15,0.2) 0%, rgba(8,8,15,0.95) 100%);
}
.detail-back {
  position: absolute; top: 20px; left: 20px;
  background: rgba(0,0,0,0.6); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  transition: background 0.2s; z-index: 2;
}
.detail-back:hover { background: rgba(255,255,255,0.1); }
.detail-content { padding: 0 40px 60px; }
.detail-main {
  display: flex; gap: 36px;
  margin-top: -80px; position: relative; z-index: 2;
}
.detail-poster-col { flex-shrink: 0; }
.detail-poster {
  width: 200px; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.detail-poster-ph {
  width: 200px; height: 300px; border-radius: 12px;
  background: var(--card); display: flex;
  align-items: center; justify-content: center;
  font-size: 48px;
}
.detail-info-col { flex: 1; padding-top: 80px; }
.detail-page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 42px; letter-spacing: 1px;
  margin: 0 0 10px; color: var(--text);
}
.detail-meta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; margin-bottom: 10px;
}
.detail-rating { color: #f5c518; font-weight: 700; font-size: 16px; }
.detail-meta-item { color: var(--muted); font-size: 14px; }
.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.detail-genre {
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px; font-size: 12px; color: var(--muted);
}
.detail-page-overview {
  font-size: 15px; line-height: 1.7; color: var(--muted);
  max-width: 680px; margin: 0 0 20px;
}
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

/* Cast */
.detail-section { margin-top: 40px; }
.detail-section-title {
  font-size: 18px; font-weight: 700; margin-bottom: 16px;
  color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.cast-scroll-wrap { position: relative; }
.cast-scroll {
  display: flex; gap: 16px; overflow-x: auto;
  padding-bottom: 12px; scrollbar-width: none;
  scroll-behavior: smooth;
}
.cast-scroll::-webkit-scrollbar { display: none; }
.cast-scroll-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(20,20,32,0.9); border: 1px solid var(--border);
  color: var(--text); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: background 0.2s;
}
.cast-scroll-btn:hover { background: var(--accent); }
.cast-scroll-btn.left { left: -16px; }
.cast-scroll-btn.right { right: -16px; }
.cast-card {
  flex-shrink: 0; width: 100px; cursor: pointer;
  transition: transform 0.2s;
}
.cast-card:hover { transform: scale(1.05); }
.cast-photo {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover; background: var(--card);
  display: block; margin-bottom: 8px;
}
.cast-photo-ph {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--card); display: flex;
  align-items: center; justify-content: center;
  font-size: 32px; margin-bottom: 8px;
}
.cast-name { font-size: 12px; font-weight: 600; text-align: center; color: var(--text); }
.cast-char { font-size: 11px; color: var(--muted); text-align: center; margin-top: 2px; }

.lib-film-card { flex-shrink: 0; width: 120px; cursor: default; }
.lib-film-poster {
  width: 120px; height: 180px; border-radius: 8px;
  object-fit: cover; background: var(--card);
  display: block; margin-bottom: 8px;
}

/* Person page */
.person-hero {
  padding: 80px 40px 40px;
  background: linear-gradient(to bottom, var(--card2), var(--bg));
}
.person-info { display: flex; gap: 32px; align-items: flex-start; }
.person-photo {
  width: 160px; height: 160px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.person-photo-ph {
  width: 160px; height: 160px; border-radius: 50%;
  background: var(--card); display: flex;
  align-items: center; justify-content: center;
  font-size: 48px; flex-shrink: 0;
}
.person-bio {
  font-size: 14px; line-height: 1.7; color: var(--muted);
  margin: 12px 0 0; max-width: 600px;
}

/* ── WTW ── */
.wtw-section { margin-top: 20px; }
.wtw-title { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; letter-spacing: 0.5px; text-transform: uppercase; }
.wtw-providers { display: flex; gap: 10px; flex-wrap: wrap; }
.wtw-pill {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
  background: var(--card2); border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.wtw-pill:hover { border-color: var(--accent); color: var(--text); }
.wtw-pill.stream { background: #0d3d24; border-color: #1a6640; color: var(--success); }
.wtw-pill.rent { background: #3a2d0a; border-color: #6a500f; color: var(--accent2); }

/* ── EPISODES ── */
.episode-list { display: flex; flex-direction: column; gap: 6px; }
.ep-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 8px; background: var(--card2);
  cursor: pointer; transition: background 0.15s; font-size: 13px;
}
.ep-item:hover { background: var(--card); }
.ep-num { color: var(--accent); font-weight: 600; min-width: 64px; }
.ep-name { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── SEARCH ── */
.search-wrap { padding: 40px 44px; }
.search-big { font-family: 'Bebas Neue', sans-serif; font-size: 32px; letter-spacing: 2px; margin-bottom: 20px; }
.search-input-wrap { position: relative; margin-bottom: 32px; }
.search-big-input {
  width: 100%; background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 16px;
  padding: 14px 18px 14px 48px; border-radius: 10px; outline: none; transition: border-color 0.2s;
}
.search-big-input:focus { border-color: var(--accent); }
.search-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--muted); }
.search-results-title { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── SETTINGS ── */
.settings-wrap { padding: 36px 44px; max-width: 720px; }
.settings-title { font-family: 'Bebas Neue', sans-serif; font-size: 32px; letter-spacing: 2px; margin-bottom: 28px; }
.settings-section { margin-bottom: 36px; }
.settings-section-title { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; font-weight: 500; }
.setting-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.setting-action { flex-shrink: 0; }
.s-input {
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 13px;
  padding: 8px 12px; border-radius: 6px; outline: none; width: 240px;
}
.s-btn {
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 13px;
  padding: 8px 16px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.s-btn:hover { border-color: var(--accent); color: var(--accent); }
.s-btn.danger { border-color: #5a1515; color: var(--danger); }
.s-btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 8px; background: var(--card2); border: 1px solid var(--border);
}
.user-av {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.user-info { flex: 1; }
.user-name { font-size: 14px; font-weight: 500; }
.user-role { font-size: 12px; color: var(--muted); }
.user-badge { font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.badge-admin { background: rgba(232,87,42,0.15); color: var(--accent); }
.badge-user { background: var(--card); color: var(--muted); }

/* ── BTN-FAV ── */
.btn-fav {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--muted); font-family: 'DM Sans', sans-serif; font-size: 14px;
  padding: 11px 20px; border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.btn-fav:hover { border-color: var(--accent2); color: var(--accent2); }

.info-section-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 80px; right: 24px; z-index: 999;
  padding: 12px 18px; border-radius: 8px; font-size: 14px;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: all 0.3s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #0d3d24; border: 1px solid var(--success); color: var(--success); }
.toast.error { background: #3a1010; border: 1px solid var(--danger); color: var(--danger); }
.toast.info { background: var(--card); border: 1px solid var(--border); color: var(--text); }

/* ── EMPTY STATE ── */
.empty { text-align: center; padding: 80px 32px; color: var(--muted); }
.empty-icon { font-size: 52px; margin-bottom: 14px; }
.empty h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.empty p { font-size: 14px; line-height: 1.6; }

/* ── LOADING ── */
.spinner-wrap { display: flex; align-items: center; justify-content: center; padding: 60px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── WATCHED BADGE & PROGRESS BAR ── */
.mcard-watched-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 10; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.mcard-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,0.15); z-index: 10;
}
.mcard-progress-fill {
  height: 100%; background: var(--accent);
  border-radius: 0 2px 2px 0; transition: width 0.3s;
}

/* ── FOLDER BROWSER ── */
.fb-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.fb-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; width: 580px; max-height: 80vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.fb-header {
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.fb-title { font-size: 16px; font-weight: 600; flex: 1; }
.fb-close {
  background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; transition: color 0.2s;
}
.fb-close:hover { color: var(--text); }
.fb-path {
  padding: 10px 20px; background: var(--card2);
  border-bottom: 1px solid var(--border);
  font-family: monospace; font-size: 13px;
  color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.fb-body { flex: 1; overflow-y: auto; padding: 8px; }
.fb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 7px;
  cursor: pointer; transition: background 0.15s; font-size: 14px;
}
.fb-item:hover { background: var(--card2); }
.fb-item.selected { background: rgba(232,87,42,0.12); color: var(--accent); }
.fb-icon { font-size: 16px; flex-shrink: 0; }
.fb-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-arrow { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.fb-up {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 7px;
  cursor: pointer; transition: background 0.15s;
  font-size: 14px; color: var(--muted);
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.fb-up:hover { background: var(--card2); color: var(--text); }
.fb-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center; justify-content: flex-end;
}
.fb-selected-path {
  flex: 1; font-size: 12px; color: var(--muted);
  font-family: monospace; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* ── VIDEO PLAYER ── */
#player-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #000; z-index: 1000;
  display: flex; flex-direction: column;
}
#player-bar:fullscreen,
#player-bar:-webkit-full-screen,
#player-bar:-moz-full-screen {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  display: block;
}
#player-bar:fullscreen #main-video,
#player-bar:-webkit-full-screen #main-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-height: none;
  object-fit: contain; background: #000;
}
#player-bar:fullscreen .custom-controls,
#player-bar:-webkit-full-screen .custom-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  z-index: 2;
}
#main-video { width: 100%; max-height: 60vh; background: #000; display: block; }
.custom-controls { padding: 8px 12px; background: #111; }
.ctrl-progress-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ctrl-progress-bg {
  flex: 1; position: relative; height: 6px; background: #333; border-radius: 3px; cursor: pointer;
}
.ctrl-buffer-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  background: rgba(255,255,255,0.25); border-radius: 3px; pointer-events: none; transition: width 1s linear;
}
.ctrl-progress-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--accent); border-radius: 3px; pointer-events: none;
}
.ctrl-seek {
  position: absolute; left: 0; top: -5px; width: 100%; height: 16px;
  opacity: 0; cursor: pointer; margin: 0;
}
.ctrl-hover-time {
  position: absolute; bottom: 14px; transform: translateX(-50%);
  background: rgba(0,0,0,0.85); color: #fff; font-size: 11px;
  padding: 2px 6px; border-radius: 4px; pointer-events: none;
  white-space: nowrap; display: none;
}
.ctrl-time { font-size: 12px; color: #aaa; white-space: nowrap; min-width: 100px; }
.ctrl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctrl-btn { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.ctrl-btn:hover { background: #333; }
.ctrl-close { margin-left: auto; color: #aaa; }
.ctrl-vol { display: flex; align-items: center; gap: 4px; }
#ctrl-volume { width: 80px; height: 4px; cursor: pointer; }
.pb-info { margin-left: 8px; }
.pb-title { font-size: 13px; font-weight: 600; color: #fff; }
.pb-sub { font-size: 11px; color: #aaa; }

/* ── ABC NAV ── */
.abc-nav {
  position: fixed; right: 0; top: 52px; bottom: 0;
  width: 32px; z-index: 80;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  background: rgba(14,14,22,0.92);
  border-left: 1px solid var(--border);
}
.abc-nav a {
  font-size: 11px; font-weight: 700; color: #5050a0;
  cursor: pointer; line-height: 1;
  transition: color 0.15s; text-align: center; width: 100%;
  text-decoration: none; display: block;
}
.abc-nav a:hover { color: var(--accent); }
.abc-nav a.has-items { color: #9090d0; }

/* ── SHOW HERO (content on backdrop) ── */
.show-hero {
  position: relative;
  min-height: 420px;
  background-size: cover; background-position: center top;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.show-hero-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(8,8,15,0.97) 0%,
    rgba(8,8,15,0.75) 60%,
    rgba(8,8,15,0.3) 100%
  ), linear-gradient(to top, rgba(8,8,15,1) 0%, transparent 60%);
}
.show-hero-content {
  position: relative; z-index: 2;
  display: flex; gap: 36px;
  padding: 80px 40px 40px;
  align-items: flex-end;
  pointer-events: none;
}
.show-hero-content * { pointer-events: auto; }
.show-hero-content .detail-poster {
  width: 180px; flex-shrink: 0;
}
.show-hero-content .detail-info-col {
  flex: 1; padding-top: 0;
}

/* ── EPISODE CARD ── */
.ep-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px; border-radius: 8px; background: var(--card2);
  cursor: pointer; transition: background 0.15s; margin-bottom: 8px;
}
.ep-card:hover { background: var(--card); }
.ep-thumb {
  flex-shrink: 0; width: 160px; height: 90px;
  border-radius: 6px; object-fit: cover; background: var(--card);
}
.ep-thumb-ph {
  flex-shrink: 0; width: 160px; height: 90px;
  border-radius: 6px; background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--muted);
}
.ep-card-info { flex: 1; overflow: hidden; }
.ep-card-num { font-size: 11px; color: var(--accent); font-weight: 700; margin-bottom: 4px; }
.ep-card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.ep-card-overview {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ── MUSIC ARTIST SECTION ── */
.music-artist-section { margin-bottom: 32px; }

/* Responsive */
@media (max-width: 600px) {
  .hero { height: 300px; }
  .hero-title { font-size: 38px; }
  #sidebar { width: 180px; min-width: 180px; }
  main#appMain { margin-left: 180px; }
  #player-bar { left: 0; }
  .sb-logo { font-size: 18px; padding: 16px 14px 12px; }
  .sb-item { padding: 8px 14px; font-size: 13px; }
  .grid-wrap, .search-wrap, .settings-wrap { padding: 16px; }
}
