/* ═══════════════════════════════════════════
   StreamVault Design System
   ═══════════════════════════════════════════ */

:root {
  --bg-primary: #050507;
  --bg-secondary: #0A0B0E;
  --bg-card: #08090C;
  --bg-elevated: #0D0F13;
  --bg-glass: rgba(8, 9, 12, 0.9);
  --text-primary: #EDEDED;
  --text-secondary: #8B9198;
  --text-muted: #5A6068;
  --accent: #FF6A1A;
  --accent-hover: #FF6A1A;
  --rating: #D9A441;
  --border: #1A1E24;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.3);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mobile-nav-h: 64px;
  --sidebar-w: 72px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2A2F36; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Remove white focus outline on click/tap — keep for keyboard nav only */
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a, button, [role="button"], .mobile-nav-link, .card, .music-card, .track-row {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* ─── Navigation ─── */
/* Top nav bar — hidden everywhere, replaced by sidebar/bottom nav */
.nav { display: none !important; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: white; font-weight: 700;
}
.logo-text { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 0.25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  text-decoration: none; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm); transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--text-primary); background: rgba(232,96,10,0.15); }
.nav-btn {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-secondary);
  width: 40px; height: 40px; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}
.nav-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); border-color: var(--accent); }
.nav-btn.scanning { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Search ─── */
.search-container { position: relative; }
.search-toggle {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-secondary);
  width: 40px; height: 40px; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}
.search-toggle:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }
.search-input {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 0; opacity: 0; padding: 0; border: none;
  background: var(--bg-elevated); color: var(--text-primary);
  font-family: var(--font); font-size: 0.9rem; border-radius: var(--radius-sm);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
}
.search-container.open .search-input {
  width: 320px; opacity: 1; padding: 0.65rem 1rem;
  border: 1px solid var(--accent);
}
.search-container.open .search-toggle { opacity: 0; pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; width: 380px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  max-height: 420px; overflow-y: auto; display: none;
}
.search-results.visible { display: block; }
.search-result-item {
  display: flex; gap: 0.75rem; padding: 0.75rem; cursor: pointer;
  transition: background var(--transition); border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,255,255,0.05); }
.search-result-poster { width: 45px; height: 67px; border-radius: 6px; object-fit: cover; background: var(--bg-card); }
.search-result-info { flex: 1; min-width: 0; }
.search-result-title { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.search-result-type {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 6px; border-radius: 4px; margin-top: 4px; display: inline-block;
  background: rgba(255,106,26,0.12); color: var(--accent);
}
.search-empty { padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ─── Hero Section ─── */
.hero {
  position: relative; width: 100%; height: 75vh; min-height: 500px; max-height: 800px;
  overflow: hidden; margin-bottom: -2rem;
}
.hero-backdrop {
  position: absolute; inset: 0; background-size: cover; background-position: center top;
  transition: opacity 1s ease;
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 30%,
    rgba(0,0,0,0.7) 55%,
    rgba(0,0,0,0.3) 75%,
    rgba(0,0,0,0.05) 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 30%,
    rgba(0,0,0,0.7) 55%,
    rgba(0,0,0,0.3) 75%,
    rgba(0,0,0,0.05) 90%,
    transparent 100%
  );
}
.hero-bottom-fade { display: none; }
.hero-content {
  position: absolute; bottom: 3rem; left: 3rem; max-width: 550px; z-index: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.75rem; border-radius: 20px;
  background: rgba(255,106,26,0.12); border: 1px solid rgba(255,106,26,0.25);
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent); margin-bottom: 1rem;
}
.hero-title {
  font-size: 3rem; font-weight: 900; line-height: 1.1; margin-bottom: 0.75rem;
  letter-spacing: -1px; text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-meta {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;
  font-size: 0.85rem; color: var(--text-secondary);
}
.hero-rating { color: var(--rating); font-weight: 600; }
.hero-dot { color: var(--text-muted); }
.hero-overview {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 1.5rem;
}
.hero-actions { display: flex; gap: 0.75rem; }
.btn-play {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; border-radius: var(--radius-sm);
  background: var(--accent); color: white; border: none; cursor: pointer;
  font-family: var(--font); font-size: 1rem; font-weight: 700;
  transition: all var(--transition);
}
.btn-play:hover { background: #e55e15; transform: translateY(-2px); }
.btn-info {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border);
  cursor: pointer; font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-info:hover { background: var(--bg-elevated); }

/* Hero Carousel */
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1s ease;
  pointer-events: none; z-index: 0;
}
.hero-slide.active {
  opacity: 1; pointer-events: all; z-index: 1;
}
.hero-slide .hero-content {
  transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
  opacity: 0; transform: translateY(12px);
}
.hero-slide.active .hero-content {
  opacity: 1; transform: translateY(0);
}
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
  color: white; font-size: 2rem; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all 0.3s ease; backdrop-filter: blur(8px);
  font-family: var(--font);
}
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(255,106,26,0.6); border-color: var(--accent); }
.hero-arrow-left { left: 1.5rem; }
.hero-arrow-right { right: 1.5rem; }
.hero-dots {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 5; display: flex; gap: 6px;
}
.hero-dot-btn {
  width: 6px; height: 6px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.25); cursor: pointer;
  transition: all 0.3s ease; padding: 0;
}
.hero-dot-btn.active {
  background: rgba(255,255,255,0.7); width: 18px; border-radius: 3px;
}
.hero-dot-btn:hover { background: rgba(255,255,255,0.45); }

/* ─── Content Rows ─── */
.content-section { padding: 0 2rem; margin-bottom: 2.5rem; position: relative; z-index: 2; }
.hero + .content-section { padding-top: 2rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.3px; }
.section-link { font-size: 0.8rem; color: var(--accent-hover); text-decoration: none; font-weight: 500; }
.section-link:hover { text-decoration: underline; }

/* ─── Media Grid & Cards ─── */
.media-row {
  display: flex; gap: 0.75rem; overflow-x: auto; padding: 8px 0 1rem;
  scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none;
}
.media-row::-webkit-scrollbar { display: none; }
.media-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem; padding-bottom: 2rem;
}
.media-card {
  flex-shrink: 0; width: 160px; cursor: pointer;
  scroll-snap-align: start; transition: transform var(--transition);
}
.media-grid .media-card { width: auto; }
.media-card:hover { transform: translateY(-8px); }
.media-card:active { transform: scale(0.96); }
.card-poster-wrap {
  position: relative; width: 100%; aspect-ratio: 2/3; border-radius: var(--radius-md);
  overflow: hidden; background: var(--bg-card); margin-bottom: 0.6rem;
  box-shadow: var(--shadow-card); border: 1px solid var(--border);
}
.card-poster {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.media-card:hover .card-poster { transform: scale(1.08); }
.card-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.media-card:hover .card-overlay { opacity: 1; }
.card-play-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  transform: scale(0.7); transition: transform var(--transition);
}
.media-card:hover .card-play-icon { transform: scale(1); }
.card-rating {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: rgba(0,0,0,0.75);
  padding: 0.2rem 0.5rem; border-radius: 6px; font-size: 0.75rem; font-weight: 600; color: var(--rating);
}
.card-progress-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.15);
}
.card-progress-fill { height: 100%; background: var(--accent); }
.card-title {
  font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.card-meta { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.card-no-poster {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
  font-size: 2.5rem; color: var(--text-muted);
}

/* ─── Watched Badge ─── */
.card-watched-badge {
  position: absolute; top: 0.5rem; left: 0.5rem;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(34, 197, 94, 0.85);
  color: white; font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.media-card.watched .card-poster-wrap { opacity: 0.7; }
.media-card.watched:hover .card-poster-wrap { opacity: 1; }

/* ─── Detail Page ─── */
.detail-page { padding-top: 0; overflow-x: hidden; width: 100%; }
.detail-backdrop {
  position: relative; width: 100%; height: 35vh; min-height: 240px;
  background-size: cover; background-position: center top;
  z-index: 1;
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 15%,
    rgba(0,0,0,0.8) 30%,
    rgba(0,0,0,0.5) 45%,
    rgba(0,0,0,0.3) 55%,
    rgba(0,0,0,0.15) 65%,
    rgba(0,0,0,0.05) 75%,
    transparent 85%
  );
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 15%,
    rgba(0,0,0,0.8) 30%,
    rgba(0,0,0,0.5) 45%,
    rgba(0,0,0,0.3) 55%,
    rgba(0,0,0,0.15) 65%,
    rgba(0,0,0,0.05) 75%,
    transparent 85%
  );
}
.detail-content {
  position: relative; z-index: 2; max-width: calc(100vw - var(--sidebar-w) - 4rem); margin: -12rem auto 0; padding: 0 2rem 0.5rem;
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2rem; align-items: start;
}
.detail-poster {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  border: 1px solid var(--border); aspect-ratio: 2/3; object-fit: cover;
  background: var(--bg-card);
}
.detail-info { padding-top: 1rem; min-width: 0; overflow-x: clip; text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 4px 30px rgba(0,0,0,0.7), 0 0 60px rgba(0,0,0,0.5); }
.detail-title { font-size: 3rem; font-weight: 900; letter-spacing: -1px; line-height: 1.1; margin-bottom: 0.5rem; }
.detail-tagline { font-size: 1rem; color: var(--text-muted); font-style: italic; margin-bottom: 1rem; }
.detail-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  margin-bottom: 1.25rem; font-size: 0.9rem; color: var(--text-secondary);
}
.detail-genres { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.genre-tag {
  padding: 0.35rem 0.85rem; border-radius: 20px; font-size: 0.78rem; font-weight: 500;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-secondary);
}
.detail-overview { font-size: 0.95rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 1rem; max-width: 100%; }
.detail-actions { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.detail-section-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }

/* Collapsible More Info section */
.detail-extra {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
.detail-extra.open {
  max-height: 2000px;
  opacity: 1;
}
@media (min-width: 769px) {
  .detail-extra { max-height: none; opacity: 1; }
  .detail-more-toggle { display: none; }
}
.detail-more-toggle {
  transition: all 0.2s;
}
/* Cast */
.cast-row { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; flex-wrap: nowrap; }
.cast-row::-webkit-scrollbar { display: none; }
.cast-card { flex-shrink: 0; width: 100px; text-align: center; }
.cast-photo {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  background: var(--bg-card); margin: 0 auto 0.5rem; border: 2px solid var(--border);
}
.cast-name { font-size: 0.78rem; font-weight: 600; }
.cast-character { font-size: 0.7rem; color: var(--text-muted); }

/* ─── Community Reviews ─── */
.reviews-section { margin-top: 0.5rem; }
.review-form {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.rating-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.rating-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.35);
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
  font-family: var(--font);
}
.rating-dot:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.1);
}
.rating-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.review-textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.82rem;
  resize: vertical;
  outline: none;
}
.review-textarea:focus { border-color: var(--accent); }
.review-textarea::placeholder { color: rgba(255,255,255,0.2); }
.review-submit-btn {
  padding: 7px 18px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #e8600a, #ff8c33);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s;
}
.review-submit-btn:hover { opacity: 0.85; }
.review-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.review-delete-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(231,76,60,0.3);
  background: rgba(231,76,60,0.08);
  color: #e74c3c;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
}
.review-delete-btn:hover { background: rgba(231,76,60,0.2); }
.review-list { display: flex; flex-direction: column; gap: 8px; }
.review-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 12px 14px;
}
.review-card.own {
  border-color: rgba(232,96,10,0.2);
  background: rgba(232,96,10,0.04);
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.review-user { font-weight: 600; font-size: 0.82rem; }
.review-rating { font-size: 0.78rem; color: #D9A441; }
.review-text { font-size: 0.8rem; color: rgba(255,255,255,0.65); line-height: 1.5; margin-top: 4px; }
.review-date { font-size: 0.65rem; color: rgba(255,255,255,0.2); margin-top: 6px; }

/* ─── Season / Episode Picker ─── */
.season-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.season-tab {
  padding: 0.5rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font-family: var(--font); font-size: 0.85rem; font-weight: 500; transition: all var(--transition);
}
.season-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.season-tab.active { background: var(--accent); border-color: var(--accent); color: white; }
.episode-list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0 20px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.episode-list::-webkit-scrollbar { display: none; }
.episode-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.episode-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.episode-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-elevated);
}
.episode-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.episode-card:hover .episode-card-thumb img { transform: scale(1.06); }
.episode-card-thumb .ep-play-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.episode-card:hover .ep-play-overlay { opacity: 1; }
.ep-play-circle {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  transform: scale(0.7); transition: transform var(--transition);
}
.episode-card:hover .ep-play-circle { transform: scale(1); }
.ep-number-badge {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.75); padding: 2px 8px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 700; color: var(--accent);
}
.ep-watched-badge {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(34,197,94,0.85); color: #fff; font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ep-progress-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.15);
}
.ep-progress-fill { height: 100%; background: var(--accent); border-radius: 0 0 0 0; }
.episode-card-body { padding: 10px 12px 12px; }
.episode-card-title {
  font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.episode-card-meta {
  font-size: 0.72rem; color: var(--text-muted);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.episode-card-actions {
  display: flex; gap: 4px; margin-top: 6px;
}
.ep-action-btn {
  font-size: 0.65rem; color: var(--text-muted); cursor: pointer;
  padding: 2px 8px; border: 1px solid var(--border); border-radius: 4px;
  transition: all 0.15s; background: none; font-family: var(--font);
}
.ep-action-btn:hover { color: var(--accent); border-color: var(--accent); }
.ep-action-btn.sub:hover { color: #3498db; border-color: #3498db; }
.episode-card.not-available { opacity: 0.5; }
.episode-card.not-available:hover { opacity: 0.8; }
.ep-missing-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.75); padding: 2px 8px; border-radius: 4px;
  font-size: 0.65rem; font-weight: 600; color: var(--accent);
}

/* Continue Watching highlight */
.episode-card.ep-highlight {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 106, 26, 0.4), 0 0 40px rgba(255, 106, 26, 0.15);
  transform: translateY(-4px);
  z-index: 2;
}
.ep-continue-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--accent); color: #fff;
  padding: 6px 16px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(255, 106, 26, 0.5);
  animation: ep-pulse 2s ease-in-out infinite;
  z-index: 3;
}
@keyframes ep-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 4px 12px rgba(255, 106, 26, 0.5); }
  50% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 4px 20px rgba(255, 106, 26, 0.7); }
}

/* Episode row navigation */
.episode-nav {
  display: flex; justify-content: center; gap: 8px;
  padding: 8px 0 12px;
}
.episode-nav button {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
  font-family: var(--font); font-size: 0.8rem; font-weight: 600;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 4px;
}
.episode-nav button:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,106,26,0.08); }

/* ─── Filter Pills ─── */
.filter-bar {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem;
  padding: 0 2rem; padding-top: 12px;
  align-items: center;
}
.filter-pill {
  padding: 0.45rem 1.1rem; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font-family: var(--font); font-size: 0.8rem; font-weight: 500; transition: all var(--transition);
}
.filter-pill:hover { border-color: var(--accent); color: var(--text-primary); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: white; }
.genre-select {
  padding: 0.45rem 1rem; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  font-family: var(--font); font-size: 0.8rem; cursor: pointer; outline: none;
}
.genre-select option { background: var(--bg); color: var(--text-primary); }
.sort-select {
  margin-left: auto; padding: 0.45rem 1rem; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary);
  font-family: var(--font); font-size: 0.8rem; cursor: pointer; outline: none;
}
.browse-search {
  flex: 1; min-width: 120px; max-width: 300px;
  padding: 0.45rem 1rem; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-primary); font-family: var(--font); font-size: 0.8rem;
  outline: none; transition: border-color var(--transition);
}
.browse-search::placeholder { color: var(--text-muted); }
.browse-search:focus { border-color: var(--accent); }
/* Announcement banner */
.announcement-banner {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem; margin: 0 2rem 1rem;
  font-size: 0.88rem; line-height: 1.5; color: var(--text-primary);
  display: flex; align-items: flex-start; gap: 0.6rem;
}
.announcement-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ─── Player Overlay ─── */
.player-overlay {
  --sub-scale: 1;
  position: fixed; inset: 0; z-index: 1000; background: #000;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Subtitle sizing via --sub-scale */
.player-overlay .plyr__captions .plyr__caption {
  font-size: calc(var(--plyr-font-size-captions-large, 21px) * var(--sub-scale)) !important;
}
.player-back {
  position: absolute; top: calc(1rem + env(safe-area-inset-top, 0px)); left: 1rem; z-index: 10;
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  border: none; color: white; padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font); font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition); opacity: 0; pointer-events: none;
}
.player-overlay:hover .player-back { opacity: 1; pointer-events: all; }
.player-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; position: relative; }
.player-wrapper video { width: 100%; height: 100%; object-fit: contain; }
.player-wrapper .plyr { width: 100%; height: 100%; }
.player-wrapper .plyr--video { height: 100%; }
.player-wrapper .plyr__video-wrapper { height: 100%; padding-bottom: 0 !important; }
.plyr__controls { padding-bottom: env(safe-area-inset-bottom, 0px) !important; }
.player-zoom-toggle {
  position: absolute; bottom: 4.5rem; left: 1rem; z-index: 10;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
  color: white; padding: 0.5rem; cursor: pointer;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.player-zoom-toggle.active { color: var(--accent); border-color: var(--accent); }
.player-overlay:hover .player-zoom-toggle { opacity: 1; pointer-events: all; }
@media (max-width: 768px) { .player-zoom-toggle { opacity: 1; pointer-events: all; bottom: 5rem; } }

/* Subtitle offset controls */
.sub-offset-controls {
  position: absolute; top: 1rem; right: 1rem; z-index: 100;
  display: flex; align-items: center; gap: 0.35rem;
  background: rgba(0,0,0,0.7); border-radius: 8px; padding: 0.3rem 0.5rem;
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.75rem; color: #ddd; opacity: 0; transition: opacity 0.3s;
}
.player-overlay:hover .sub-offset-controls { opacity: 1; }
.sub-offset-controls button {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08); color: white; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
  font-family: var(--font);
}
.sub-offset-controls button:hover { background: var(--accent); border-color: var(--accent); }
#sub-offset-display, #sub-size-display { min-width: 50px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.sub-size-divider { color: rgba(255,255,255,0.2); margin: 0 0.15rem; user-select: none; }

/* Next Episode Pill */
.next-episode-pill {
  position: absolute; bottom: 5.5rem; right: 1.25rem; z-index: 60;
  display: none; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px; padding: 12px 20px 12px 16px;
  cursor: pointer; user-select: none;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1), transform 0.5s cubic-bezier(0.4,0,0.2,1),
              background 0.2s, border-color 0.2s;
}
.next-episode-pill.visible { display: flex; opacity: 1; transform: translateY(0); }
.next-episode-pill:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.3); }
.next-ep-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.next-ep-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.next-ep-label { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.5); }
.next-ep-title { font-size: 0.85rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }

/* Skip Segment Button (intro/outro) */
.skip-segment-btn {
  position: absolute; bottom: 5.5rem; left: 1.25rem; z-index: 60;
  display: none; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px; padding: 10px 20px;
  color: #fff; font-family: var(--font); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; user-select: none;
  opacity: 0; transform: translateX(-12px);
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1),
              background 0.2s, border-color 0.2s;
}
.skip-segment-btn.visible { display: flex; opacity: 1; transform: translateX(0); }
.skip-segment-btn:hover { background: rgba(255,255,255,0.2); border-color: var(--accent); }

@media (max-width: 768px) {
  .next-episode-pill { bottom: 5rem; right: 0.75rem; padding: 10px 14px 10px 12px; border-radius: 12px; }
  .next-ep-icon { width: 30px; height: 30px; font-size: 0.75rem; }
  .next-ep-title { font-size: 0.75rem; max-width: 160px; }
  .next-ep-label { font-size: 0.58rem; }
  .skip-segment-btn { bottom: 5rem; left: 0.75rem; font-size: 0.78rem; padding: 8px 14px; }
}

/* ─── Plyr Caption Overrides ─── */
/* Ensure captions render OVER the video, not in black bars */
.plyr__captions {
  bottom: var(--sub-bottom, 10%) !important;
  font-size: 1.1rem !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8) !important;
}
.plyr__caption {
  background: var(--sub-bg, rgba(0,0,0,0.7)) !important;
  padding: 0.3em 0.6em !important;
  border-radius: 4px !important;
  font-size: inherit !important;
  color: var(--sub-color, #fff) !important;
  font-family: var(--sub-font, inherit) !important;
}
.player-overlay video::cue {
  color: var(--sub-color, #fff);
  background: var(--sub-bg, rgba(0,0,0,0.7));
  font-family: var(--sub-font, inherit);
  font-size: calc(1.2em * var(--sub-scale));
}
/* Mobile caption sizing */
@media (max-width: 768px) {
  .plyr__captions { font-size: 0.85rem !important; bottom: 12% !important; }
}

/* ─── Subtitle Style Panel ─── */
.sub-style-panel {
  position: absolute; top: 3.5rem; right: 1rem; z-index: 101;
  background: rgba(12, 12, 20, 0.92); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 16px 18px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: none; flex-direction: column; gap: 14px;
  min-width: 240px; box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  animation: subPanelIn 0.2s ease-out;
}
.sub-style-panel.open { display: flex; }
@keyframes subPanelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.sub-style-row {
  display: flex; align-items: center; gap: 10px;
}
.sub-style-row label {
  font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.5);
  min-width: 70px; text-transform: uppercase; letter-spacing: 0.5px;
}
.sub-style-row select {
  flex: 1; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; color: #fff; padding: 6px 8px; font-size: 0.78rem;
  font-family: var(--font); cursor: pointer; outline: none;
}
.sub-style-row select:focus { border-color: var(--accent); }
.sub-style-row select option { background: #1a1a2e; color: #fff; }
.sub-color-options {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.sub-color-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1);
  cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.sub-color-btn:hover { transform: scale(1.15); border-color: rgba(255,255,255,0.4); }
.sub-color-btn.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.sub-color-btn.no-bg {
  background: transparent !important; color: rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center; font-size: 0.7rem;
}
.sub-opacity-slider {
  flex: 1; -webkit-appearance: none; appearance: none; height: 4px;
  background: rgba(255,255,255,0.12); border-radius: 2px; outline: none;
}
.sub-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
}
.sub-opacity-slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  cursor: pointer; border: none;
}
#sub-bg-opacity-val {
  min-width: 32px; text-align: right; font-size: 0.72rem; font-weight: 600;
  color: rgba(255,255,255,0.6); font-variant-numeric: tabular-nums;
}


/* ─── Loading ─── */
.loading-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; gap: 1.5rem; color: var(--text-secondary);
}
.loader {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite;
}
.shimmer {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ─── Toast ─── */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  padding: 0.85rem 1.25rem; border-radius: var(--radius-sm);
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 0.85rem; box-shadow: var(--shadow-card);
  animation: toastIn 0.4s ease; min-width: 280px;
  display: flex; align-items: center; gap: 0.5rem;
}
.toast.success { border-left: 3px solid #22c55e; }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }

/* ─── Empty State ─── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 50vh; gap: 1rem; text-align: center; padding: 2rem;
}
.empty-icon { font-size: 4rem; margin-bottom: 0.5rem; }
.empty-title { font-size: 1.5rem; font-weight: 700; }
.empty-desc { color: var(--text-secondary); max-width: 400px; line-height: 1.6; }
.empty-btn {
  margin-top: 1rem; padding: 0.75rem 2rem; border-radius: var(--radius-sm);
  background: var(--accent); color: white; border: none; cursor: pointer;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  transition: all var(--transition);
}
.empty-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* ─── Responsive ─── */
/* Universal nav — bottom tab bar on mobile, left sidebar on desktop */
.mobile-nav {
  display: block; position: fixed; z-index: 950;
  background: rgba(5, 5, 7, 0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.mobile-nav-links {
  display: flex; align-items: center;
  height: 100%; padding: 0;
}
.mobile-nav-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: #6B7280;
  padding: 0.5rem 0; border-radius: var(--radius-sm); transition: all var(--transition);
  min-width: 0;
}
.mobile-nav-link:hover { color: var(--text-primary); }
.mobile-nav-link.active { color: var(--accent); }
.mobile-nav-link svg { width: 26px; height: 26px; }

/* Desktop: left sidebar */
@media (min-width: 769px) {
  .mobile-nav {
    top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
    border-right: 1px solid var(--border); border-top: none;
  }
  .mobile-nav-links {
    flex-direction: column; justify-content: center;
    gap: 0.5rem; padding: 1rem 0;
  }
  .mobile-nav-link {
    width: 100%; padding: 0.65rem 0; flex: 0;
  }
  .mobile-nav-link svg { width: 20px; height: 20px; }
  body { padding-left: var(--sidebar-w); padding-bottom: 0; }
  #app-content { padding-left: 0; overflow-x: hidden; max-width: 100%; }
}

/* Mobile: bottom tab bar */
@media (max-width: 768px) {
  .mobile-nav {
    bottom: 0; left: 0; right: 0; top: auto; width: auto;
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border); border-right: none;
    padding-top: 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-nav-links {
    flex-direction: row; justify-content: space-evenly;
  }
  .mobile-nav-link { flex: 1; }
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); padding-left: 0; }

  /* Hero */
  .hero { height: 40vh; min-height: 260px; margin-bottom: -1rem; }
  .hero-content { left: 1.5rem; right: 1.5rem; bottom: 1.5rem; }
  .hero-title { font-size: 1.4rem; }
  .hero-overview { font-size: 0.82rem; -webkit-line-clamp: 2; display: none; }
  .hero-meta { font-size: 0.75rem; margin-bottom: 0.5rem; }
  .hero-actions { flex-wrap: wrap; gap: 0.5rem; }
  .btn-play, .btn-info { font-size: 0.8rem; padding: 0.5rem 0.9rem; }
  .hero-arrow { display: none; }
  .hero-dots { bottom: 0.75rem; gap: 4px; pointer-events: none; }
  .hero-dot-btn { width: 4px; height: 4px; }
  .hero-dot-btn.active { width: 12px; }

  /* Browse */
  .content-section { padding: 0 1rem; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 0.6rem; }
  .media-card { width: 120px; }
  .media-row { gap: 0.5rem; }
  .card-title { font-size: 0.72rem; }
  .card-meta { font-size: 0.65rem; }
  .section-title { font-size: 1.1rem; }
  .announcement-banner { margin: 0 1rem 0.75rem; font-size: 0.82rem; padding: 0.7rem 1rem; }
  .filter-bar { padding: 0 1rem; padding-top: calc(env(safe-area-inset-top, 0px) + 12px); }

  /* Detail page - single column stacking */
  .detail-backdrop {
    height: 35vh; min-height: 220px;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, rgba(0,0,0,0.5) 70%, transparent 95%);
    mask-image: linear-gradient(to bottom, black 0%, black 50%, rgba(0,0,0,0.5) 70%, transparent 95%);
  }
  .detail-content {
    display: flex; flex-direction: column; align-items: center;
    margin-top: -10rem; padding: 0 1rem 0.5rem;
    max-width: 100%; overflow-x: hidden; overflow-y: visible;
  }
  .detail-page > div[style*="padding:0 2rem"],
  .detail-page > div[style*="padding: 0 2rem"] { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
  .detail-poster { width: 140px; margin: 0 auto 0.5rem; flex-shrink: 0; }
  .detail-info { padding-top: 0; width: 100%; overflow: hidden; }
  .detail-title { font-size: 1.3rem; text-align: center; word-wrap: break-word; overflow-wrap: break-word; margin-bottom: 0.25rem; }
  .detail-tagline { text-align: center; font-size: 0.75rem; margin-bottom: 0.5rem; }
  .detail-meta { justify-content: center; flex-wrap: wrap; font-size: 0.75rem; margin-bottom: 0.5rem; }
  .detail-genres { justify-content: center; margin-bottom: 0.5rem; }
  .detail-genres .genre-tag { font-size: 0.7rem; padding: 0.2rem 0.6rem; }
  .detail-overview { font-size: 0.85rem; line-height: 1.6; word-wrap: break-word; overflow-wrap: break-word; }
  .detail-actions { justify-content: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
  .detail-section-title { font-size: 1rem; margin-bottom: 0.5rem; }

  /* Cast */
  .cast-row { gap: 0.75rem; }
  .cast-card { width: 80px; }
  .cast-photo { width: 60px; height: 60px; }
  .cast-name { font-size: 0.7rem; }
  .cast-character { font-size: 0.6rem; }

  /* Episodes — horizontal scroll on mobile */
  .episode-card { flex: 0 0 220px; }
  .episode-card-title { font-size: 0.78rem; }
  .episode-card-meta { font-size: 0.65rem; }
  .ep-action-btn { font-size: 0.6rem; padding: 1px 6px; }
  .ep-continue-badge { display: none; }
  .episode-nav { display: none; }
  .season-tabs { gap: 0.35rem; }
  .season-tab { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

  /* Search */
  .search-container.open .search-input { width: calc(100vw - 80px); font-size: 0.85rem; }
  .search-results { width: calc(100vw - 1rem); right: -0.5rem; max-height: 50vh; }
  .search-result-poster { width: 36px; height: 54px; }
  .search-result-item { padding: 0.5rem; gap: 0.5rem; }
  .search-result-title { font-size: 0.82rem; }
  #scan-btn, #logout-btn { display: none; }

  /* Toast */
  .toast-container { bottom: 5rem; right: 1rem; left: 1rem; }
  .toast { min-width: auto; }

  /* Player */
  .player-back { top: calc(0.5rem + env(safe-area-inset-top, 0px)); left: 0.5rem; opacity: 1; pointer-events: all; font-size: 0.8rem; padding: 0.5rem 0.75rem; }
  .sub-offset-controls { top: calc(0.5rem + env(safe-area-inset-top, 0px)); opacity: 1; }
}

/* Fade-in animation */
.fade-in { animation: fadeIn 0.5s ease forwards; opacity: 0; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* Custom seek bar for transcoded streams */
.custom-seek-bar {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: visible;
  touch-action: none;
}
.custom-seek-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.15s linear;
}
.custom-seek-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
  transition: left 0.15s linear;
  pointer-events: none;
}

/* ─── Music Mini Player ─── */
.mini-player {
  position: fixed;
  bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
  left: 0; right: 0;
  z-index: 900;
  background: rgba(5,5,7,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.mini-player-seek {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  touch-action: none;
  flex-shrink: 0;
}
.mini-player-seek-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}
.mini-player-seek-thumb {
  position: absolute;
  top: 50%; left: 0%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
  opacity: 0;
  transition: left 0.1s linear, opacity 0.2s;
  pointer-events: none;
}
.mini-player:hover .mini-player-seek-thumb,
.mini-player-seek:active .mini-player-seek-thumb { opacity: 1; }
.mini-player-main {
  display: flex;
  align-items: center;
  padding: 10px 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 10px;
}
.mini-player-art {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--bg-elevated);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.mini-player-info {
  flex: 1;
  min-width: 0;
}
.mini-player-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}
.mini-player-title.mini-scrolling {
  text-overflow: clip;
  mask-image: linear-gradient(to right, transparent 0%, #fff 4%, #fff 96%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #fff 4%, #fff 96%, transparent 100%);
}
.mini-player-title.mini-scrolling .mini-scroll-inner {
  display: inline-block;
  white-space: nowrap;
  animation: miniMarquee var(--mini-marquee-dur, 10s) linear infinite;
}
.mini-player-title.mini-paused .mini-scroll-inner {
  /* keep scrolling even when paused */
}
@keyframes miniMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.mini-player-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}
.mini-player-artist {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player-time {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.mini-player-controls {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}
.mini-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.mini-btn svg { display: block; }
.mini-btn:hover { background: rgba(255,255,255,0.1); }
.mini-btn.mini-play { padding: 6px; }
.mini-btn.mini-sm { padding: 6px; color: rgba(255,255,255,0.5); }
.mini-btn.mini-sm:hover { color: #fff; }
.mini-btn.mini-sm.active { color: var(--accent); }
/* Repeat-one badge */
.mini-btn.mini-sm.repeat-one::after {
  content: '1';
  position: absolute;
  font-size: 7px;
  font-weight: 800;
  color: var(--accent);
  bottom: 2px; right: 2px;
}
.mini-btn.mini-sm { position: relative; }

/* Volume control in mini player (desktop only) */
.mini-volume {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}
.mini-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  outline: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.mini-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s;
}
.mini-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}
.mini-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
.mini-volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
}
.mini-mute-active svg { color: rgba(255,255,255,0.4) !important; }

/* Adjust main content when mini-player visible */
body.music-playing #app-content { padding-bottom: 190px; }
body.music-playing .mobile-nav { bottom: 0; }
body.music-playing .mini-player { display: flex !important; }

/* Desktop: mini player spans full bottom (nav is sidebar, not bottom bar) */
@media (min-width: 769px) {
  .mini-player { bottom: 0; left: var(--sidebar-w); }
  .mini-btn.mini-sm { padding: 7px; }
}

/* ─── Music Page ─── */
.music-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.music-tabs-buttons {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.music-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  animation: fadeIn 0.2s ease;
}
.music-search-icon {
  flex-shrink: 0;
  font-size: 1rem;
  padding: 8px 12px !important;
}
.music-tab {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.music-tab.active, .music-tab:hover {
  background: rgba(255,106,26,0.15);
  border-color: var(--accent);
  color: #fff;
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  padding: 16px;
}
.music-card {
  cursor: pointer;
  transition: transform 0.2s;
}
.music-card:hover { transform: translateY(-4px); }
.music-card-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--bg-elevated);
  background-size: cover;
  background-position: center;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.artist-card .music-card-art { border-radius: 50%; }

/* Browse All badges */
.browse-badge {
  position: absolute; bottom: 6px; right: 6px;
  padding: 4px 10px; border-radius: 8px;
  font-size: 0.65rem; font-weight: 700;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  z-index: 2; cursor: default;
  transition: all 0.2s ease;
}
.browse-badge-owned {
  background: rgba(16,185,129,0.2); color: #34d399;
  border: 1px solid rgba(16,185,129,0.3);
}
.browse-badge-add {
  background: rgba(139,92,246,0.2); color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.3);
  cursor: pointer;
}
.browse-badge-add:hover {
  background: rgba(139,92,246,0.4);
  transform: scale(1.05);
}
.music-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-card-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Track List ─── */
.track-list { padding: 0 16px; }
.track-row {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.track-row:hover { background: rgba(255,255,255,0.05); }
.track-row.playing { background: rgba(232,96,10,0.15); }
.track-num {
  width: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.track-row.playing .track-num { color: var(--accent); }
.track-art {
  width: 40px; height: 40px;
  border-radius: 5px;
  background: var(--bg-elevated);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.track-info { flex: 1; min-width: 0; }
.track-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-row.playing .track-title { color: var(--accent); }
.track-artist {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
}
.track-duration {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.track-menu-btn {
  background: none; border: none; color: rgba(255,255,255,0.4);
  cursor: pointer; font-size: 1.2rem; padding: 4px 8px;
}
.track-menu-btn:hover { color: #fff; }

/* ─── Album/Artist Detail Header ─── */
.music-detail-header {
  display: flex;
  gap: 24px;
  padding: 24px 16px;
  align-items: flex-end;
}
.music-detail-art {
  width: 180px; height: 180px;
  border-radius: 12px;
  background: var(--bg-elevated);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.music-detail-info { flex: 1; }
.music-detail-type {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
}
.music-detail-name {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 4px 0 8px;
}
.music-detail-meta {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.music-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn-music-play {
  padding: 10px 28px;
  border-radius: 24px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.btn-music-play:hover {
  transform: scale(1.04);
}
.btn-music-secondary {
  padding: 10px 24px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ─── Playlist Card ─── */
.playlist-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.playlist-card:hover { background: rgba(255,255,255,0.05); }
.playlist-card-art {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.playlist-card-info { flex: 1; }
.playlist-card-name { font-weight: 600; font-size: 0.9rem; }
.playlist-card-count { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.playlist-card-art.playlist-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  padding: 0;
  background: rgba(0,0,0,0.3);
}
.playlist-card-art.playlist-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Playlist cover upload overlay */
.playlist-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: rgba(255,255,255,0.9);
  z-index: 2;
}
.playlist-art-editable:hover .playlist-cover-overlay {
  opacity: 1;
}
/* On touch devices, always show a subtle indicator */
@media (hover: none) {
  .playlist-cover-overlay {
    opacity: 0.5;
    background: rgba(0,0,0,0.25);
  }
  .playlist-cover-overlay svg {
    width: 20px;
    height: 20px;
  }
}

/* ─── Explore Tab ─── */
.explore-page { padding: 0 0 80px; }
.explore-stats {
  text-align: center;
  padding: 18px 16px 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.3px;
  font-weight: 500;
}
.explore-section {
  padding: 6px 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.explore-section:last-child { border-bottom: none; }
.explore-section-title {
  padding: 10px 2rem 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
}
.explore-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 0 10px;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 36px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.explore-row::before,
.explore-row::after {
  content: '';
  flex: 0 0 18px;
}
@media (max-width: 768px) {
  .explore-section-title { padding-left: 16px; padding-right: 16px; }
  .explore-row::before, .explore-row::after { flex: 0 0 2px; }
}
.explore-row::-webkit-scrollbar { display: none; }
.explore-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  cursor: pointer;
  position: relative;
}
.explore-card-art {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.explore-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.explore-card-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  margin-top: 1px;
}

/* Daily mix + playlist cards are bigger */
.explore-section:nth-child(2) .explore-card,
.explore-section:nth-child(3) .explore-card { flex: 0 0 180px; }
.explore-section:nth-child(2) .explore-card-art,
.explore-section:nth-child(3) .explore-card-art { width: 180px; height: 180px; }
.explore-section:nth-child(2) .explore-card-title,
.explore-section:nth-child(3) .explore-card-title,
.explore-section:nth-child(2) .explore-card-sub,
.explore-section:nth-child(3) .explore-card-sub { max-width: 180px; }

/* 2x2 cover mosaic for explore cards */
.explore-mix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: rgba(0,0,0,0.3);
}
.explore-mix-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Circular artist cards */
.explore-card.explore-artist { text-align: center; flex: 0 0 140px; }
.explore-artist-art {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--bg-elevated);
  margin: 0 auto;
  overflow: hidden;
}
.explore-card.explore-artist .explore-card-title,
.explore-card.explore-artist .explore-card-sub { max-width: 130px; margin-left: auto; margin-right: auto; text-align: center; }

/* Save button overlay on daily mix cards */
.explore-save-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.explore-card:hover .explore-save-btn { opacity: 1; }
.explore-save-btn:hover { color: #fff; background: rgba(0,0,0,0.8); }

/* Add button for suggested content */
.explore-add-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(232,96,10,0.9);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 2;
  padding: 0 0 1px 0;
}
.explore-card:hover .explore-add-btn { opacity: 1; }
.explore-add-btn:hover { transform: scale(1.15); background: #e8600a; }

/* Mobile: always show save/add buttons, slightly smaller cards */
@media (max-width: 768px) {
  .explore-save-btn, .explore-add-btn { opacity: 1; }
  .explore-card { flex: 0 0 140px; }
  .explore-card-art { width: 140px; height: 140px; }
  .explore-card-title, .explore-card-sub { max-width: 140px; }
  .explore-section:nth-child(2) .explore-card,
  .explore-section:nth-child(3) .explore-card { flex: 0 0 150px; }
  .explore-section:nth-child(2) .explore-card-art,
  .explore-section:nth-child(3) .explore-card-art { width: 150px; height: 150px; }
  .explore-section:nth-child(2) .explore-card-title,
  .explore-section:nth-child(3) .explore-card-title,
  .explore-section:nth-child(2) .explore-card-sub,
  .explore-section:nth-child(3) .explore-card-sub { max-width: 150px; }
  .explore-card.explore-artist { flex: 0 0 120px; }
  .explore-artist-art { width: 110px; height: 110px; }
  .explore-card.explore-artist .explore-card-title,
  .explore-card.explore-artist .explore-card-sub { max-width: 110px; }
}

/* ─── Daily Mix Card ─── */
.playlist-card.daily-mix .playlist-card-art { color: #fff; }
/* 2x2 album art grid */
.daily-mix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
}
.daily-mix-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.daily-mix-grid-lg {
  border-radius: 12px;
}
.daily-mix-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(139,92,246,0.8);
  margin-top: 2px;
}
.track-add-btn {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(139,92,246,0.2);
  color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.3);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.track-add-btn:hover { background: rgba(139,92,246,0.4); }
.track-add-btn.added {
  background: rgba(16,185,129,0.2);
  color: #34d399;
  border-color: rgba(16,185,129,0.3);
  pointer-events: none;
}

/* ─── Create Playlist Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--bg-elevated);
  border-radius: 16px;
  padding: 24px;
  width: 90%; max-width: 400px;
  border: 1px solid var(--border);
}
.modal-box h3 { margin: 0 0 16px; font-size: 1.1rem; }
.modal-box input {
  width: 100%; padding: 10px 14px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05); color: #fff;
  font-size: 0.9rem; margin-bottom: 12px;
  box-sizing: border-box;
}
.modal-box input::placeholder { color: rgba(255,255,255,0.3); }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; }
.modal-btns button {
  padding: 8px 20px; border-radius: 8px; border: none;
  cursor: pointer; font-weight: 500;
}
.modal-btn-primary { background: var(--accent); color: #fff; }
.modal-btn-cancel { background: rgba(255,255,255,0.1); color: #fff; }

/* ─── Clickable Artist Link ─── */
.track-artist-link {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.track-artist-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* ─── Mini Player Clickable ─── */
.mini-player-info { cursor: pointer; }
.mini-player-art { cursor: pointer; }

/* ─── Loading state ─── */
.mini-player.loading .mini-play { animation: pulse 1s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ═══════════════════════════════════════════
   Now Playing Full Screen
   ═══════════════════════════════════════════ */
.now-playing-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: #030304;
  display: none; flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  animation: npSlideUp 0.35s ease;
}
.now-playing-overlay.np-visible {
  display: flex;
}
@keyframes npSlideUp {
  from { transform: translateY(100%); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

/* ─── Full-bleed album art background ─── */
.np-art-bg {
  position: absolute; top: 0; left: 0; right: 0;
  height: 62%;
  background-size: cover; background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
  transition: background-image 0.4s ease;
}
.np-art-gradient {
  position: absolute; top: 0; left: 0; right: 0;
  height: 62%;
  background:
    linear-gradient(
      to bottom,
      transparent 20%,
      rgba(3,3,4,0.15) 40%,
      rgba(3,3,4,0.45) 55%,
      rgba(3,3,4,0.75) 70%,
      rgba(3,3,4,0.95) 85%,
      #030304 100%
    );
  z-index: 1;
  pointer-events: none;
}

/* ─── Header (bottom on mobile, top on desktop) ─── */
.np-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 10;
}
.np-header-title {
  display: none;
}
.np-close, .np-queue-btn {
  background: none; border: none; color: rgba(255,255,255,0.8);
  cursor: pointer; padding: 8px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  transition: all 0.2s;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.np-close:hover, .np-queue-btn:hover { color: #fff; }
.np-queue-btn.active { color: var(--accent); }
/* Lyrics toggle: centered on mobile bottom bar */
.np-lyrics-toggle {
  margin: 0 auto;
}

/* ─── Controls section ─── */
.np-controls-section {
  position: absolute; bottom: 12vh; left: 0; right: 0;
  z-index: 10;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 0 28px;
}

/* ─── Title row: title left + heart + menu right ─── */
.np-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}
.np-title-row .np-btn.np-menu {
  width: 36px; height: 36px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.3);
}
.np-title-row .np-btn.np-menu svg {
  width: 18px; height: 18px;
}

.np-track-title {
  font-size: 2rem; font-weight: 700; color: #fff;
  text-align: left; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
  position: relative;
}

/* ─── Like Button (Now Playing) ─── */
.np-like-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer; padding: 0;
  width: 44px; height: 44px;
  flex-shrink: 0;
  transition: all 0.25s ease;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.np-like-btn:hover { color: rgba(255,255,255,0.7); transform: scale(1.1); }
.np-like-btn.liked {
  color: #ef4444;
  animation: heartPop 0.35s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}
.np-like-btn.liked svg { fill: #ef4444; stroke: #ef4444; }

/* ─── Like Button (Mini Player) ─── */
.mini-like-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer; padding: 4px;
  flex-shrink: 0;
  transition: all 0.25s ease;
  display: flex; align-items: center; justify-content: center;
  margin-right: 2px;
}
.mini-like-btn:hover { color: rgba(255,255,255,0.7); }
.mini-like-btn.liked {
  color: #ef4444;
  animation: heartPop 0.35s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}
.mini-like-btn.liked svg { fill: #ef4444; stroke: #ef4444; }

@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.np-track-title.np-scrolling {
  text-overflow: clip;
  text-align: left;
  mask-image: linear-gradient(to right, transparent 0%, #fff 6%, #fff 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #fff 6%, #fff 94%, transparent 100%);
}
.np-track-title.np-scrolling .np-scroll-inner {
  display: inline-block;
  white-space: nowrap;
  animation: npMarquee var(--marquee-duration, 12s) linear infinite;
  padding-right: 3rem;
}
@keyframes npMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.np-track-artist {
  font-size: 1rem; color: rgba(255,255,255,0.5);
  text-align: left; cursor: pointer; width: 100%;
  transition: color 0.2s;
  margin-bottom: 16px;
}
.np-track-artist:hover { color: var(--accent-hover); }

.np-seek-area { width: 100%; max-width: 100%; }
.np-seek-bar {
  position: relative; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.12); cursor: pointer;
  margin: 0 0 6px;
}
.np-seek-fill {
  height: 100%; border-radius: 3px;
  background: var(--accent);
  width: 0%; transition: width 0.1s linear;
  position: relative;
}
.np-seek-thumb {
  position: absolute; top: 50%; left: 0%;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  pointer-events: none;
  transition: left 0.1s linear;
}
.np-seek-bar:hover .np-seek-thumb { transform: translate(-50%, -50%) scale(1.2); }

.np-times {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: rgba(255,255,255,0.4);
}

.np-controls {
  display: flex; align-items: center;
  justify-content: space-evenly;
  width: 100%;
  margin: 20px 0 4px;
}
.np-btn {
  background: none; border: none; color: rgba(255,255,255,0.5);
  cursor: pointer; padding: 0;
  width: 44px; height: 44px;
  border-radius: 50%; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.np-btn svg { display: block; }
.np-btn.np-play svg { width: 50%; height: 50%; }
.np-btn.np-prev svg, .np-btn.np-next svg { width: 55%; height: 55%; }
.np-btn.np-shuffle svg, .np-btn.np-repeat svg { width: 50%; height: 50%; }
.np-btn.np-menu svg { width: 40%; height: 40%; }
.np-btn.np-menu { color: rgba(255,255,255,0.3); }
.np-btn:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.06); }
.np-btn.np-play {
  width: 96px; height: 96px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb, 232,93,26), 0.35);
}
.np-btn.np-play:hover { transform: scale(1.08); filter: brightness(1.1); }
.np-btn.np-prev, .np-btn.np-next {
  width: 60px; height: 60px;
  color: rgba(255,255,255,0.7);
}
.np-btn.np-prev:hover, .np-btn.np-next:hover { color: #fff; }
.np-btn.np-shuffle, .np-btn.np-repeat {
  width: 44px; height: 44px;
  color: rgba(255,255,255,0.3);
  transition: all 0.2s;
}
.np-btn.np-shuffle.active, .np-btn.np-repeat.active {
  color: var(--accent);
}
.np-btn.np-repeat { position: relative; }
.np-btn.np-repeat.repeat-one::after {
  content: '1';
  position: absolute;
  font-size: 9px;
  font-weight: 800;
  color: var(--accent);
  bottom: 4px; right: 2px;
}

.np-volume {
  display: none; /* Hidden on mobile, shown on desktop */
  align-items: center; gap: 10px;
  width: 100%; max-width: 200px;
  margin-top: 4px;
}
.np-vol-icon { color: rgba(255,255,255,0.4); flex-shrink: 0; display: flex; }
.np-vol-slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) 100%, rgba(255,255,255,0.15) 100%);
  outline: none; cursor: pointer;
}
.np-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.np-vol-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: none;
}

/* Lyrics toggle container below volume */
.np-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  width: 100%;
  max-width: 240px;
}

/* Desktop: three-column layout — art | controls | queue */
@media (min-width: 769px) {
  .now-playing-overlay.np-visible {
    display: grid;
    grid-template-columns: 40% 1fr 0px;
    grid-template-rows: auto 1fr;
    transition: grid-template-columns 0.35s ease;
  }
  /* When queue is open, expand queue column */
  .now-playing-overlay.queue-expanded {
    grid-template-columns: 35% 1fr 340px;
  }

  .np-header {
    position: relative; bottom: auto; left: auto; right: auto;
    grid-column: 1 / 3; grid-row: 1;
    padding-top: 12px; padding-bottom: 12px;
  }
  .np-header .np-lyrics-toggle { display: none; }
  .np-header-title { display: none; }

  .np-art-bg {
    position: relative; grid-column: 1; grid-row: 2;
    height: 0; width: 80%;
    padding-bottom: 80%;
    border-radius: 16px;
    justify-self: center; align-self: center;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  }

  .np-art-gradient { display: none; }

  .np-controls-section {
    position: relative; grid-column: 2; grid-row: 2;
    bottom: auto;
    align-self: center;
    justify-self: stretch;
    padding: 0 48px;
    align-items: center;
    min-width: 0;
    overflow: hidden;
  }

  .np-controls-section .np-track-title {
    text-align: left;
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .np-controls-section .np-like-btn svg { width: 24px; height: 24px; }
  .np-controls-section .np-track-artist {
    text-align: left;
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.45);
  }

  .np-seek-area { max-width: 100%; width: 100%; }
  .np-seek-bar { height: 5px; }
  .np-times { font-size: 0.8rem; }

  .np-controls { 
    justify-content: center;
    gap: 36px;
    margin: 24px 0 16px;
  }
  .np-btn.np-play {
    width: 80px; height: 80px;
  }
  .np-btn.np-prev, .np-btn.np-next {
    width: 52px; height: 52px;
  }
  .np-btn.np-shuffle, .np-btn.np-repeat {
    width: 44px; height: 44px;
  }
  .np-btn.np-menu { width: 36px; height: 36px; }

  .np-volume { display: flex; max-width: 240px; width: 240px; margin-top: 12px; }

  .np-queue {
    display: block !important;
    position: relative; grid-column: 3; grid-row: 1 / -1;
    top: auto; bottom: auto;
    background: rgba(255,255,255,0.03);
    border-left: 1px solid rgba(255,255,255,0.06);
    z-index: 10;
    padding: 20px 16px;
    padding-top: 80px;
    animation: none;
    overflow-y: auto;
    transition: width 0.3s ease, opacity 0.3s ease;
  }

  /* Show queue toggle button on desktop */
  .np-queue-btn { display: flex; }
  /* Show queue header on desktop, rotate close chevron to point right (collapse) */
  .np-queue-header { display: flex; }
  .np-queue-header .np-queue-close svg { transform: rotate(-90deg); }
}

/* Mobile landscape: compact side-by-side layout */
@media (max-height: 500px) and (orientation: landscape) {
  .now-playing-overlay.np-visible {
    display: grid !important;
    grid-template-columns: 40% 1fr;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    transition: grid-template-columns 0.3s ease;
  }
  .now-playing-overlay.np-visible.queue-expanded {
    grid-template-columns: 30% 1fr 240px;
  }
  .np-header {
    position: relative; bottom: auto; left: auto; right: auto;
    grid-column: 1 / -1; grid-row: 1;
    padding: 4px 12px;
    z-index: 40;
  }
  .np-art-bg {
    position: relative; grid-column: 1; grid-row: 2;
    height: 0; width: 75%;
    padding-bottom: 75%;
    border-radius: 10px;
    justify-self: center; align-self: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }
  .np-art-gradient { display: none; }
  .np-controls-section {
    grid-column: 2; grid-row: 2;
    position: relative; bottom: auto;
    align-self: center; justify-self: stretch;
    padding: 0 1rem;
    overflow-y: auto;
  }
  .np-track-title {
    font-size: 1rem !important;
    white-space: nowrap !important;
    margin-bottom: 2px !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: hidden !important;
  }
  .np-track-artist {
    font-size: 0.75rem !important;
    margin-bottom: 8px !important;
  }
  .np-seek-area { max-width: 100%; }
  .np-seek-bar { margin-bottom: 2px; }
  .np-times { font-size: 0.65rem; }
  .np-controls {
    margin: 4px 0 0 !important;
    gap: 12px !important;
    justify-content: center;
  }
  .np-btn.np-play { width: 48px !important; height: 48px !important; }
  .np-btn.np-prev, .np-btn.np-next { width: 30px !important; height: 30px !important; }
  .np-btn.np-shuffle, .np-btn.np-repeat { width: 22px !important; height: 22px !important; }
  .np-btn.np-menu { width: 22px !important; height: 22px !important; }
  .np-like-btn svg { width: 18px !important; height: 18px !important; }
  /* Hide volume in landscape — not enough room */
  .np-volume { display: none !important; }
  /* Queue in landscape */
  .np-queue {
    position: relative !important;
    grid-column: 3; grid-row: 1 / -1;
    top: auto !important; bottom: auto !important;
    left: auto !important; right: auto !important;
    background: rgba(255,255,255,0.03);
    border-left: 1px solid rgba(255,255,255,0.06);
    z-index: 10;
    padding: 8px 10px;
    padding-top: 36px;
    animation: none;
    overflow-y: auto;
  }
  .np-queue-btn { display: flex; }
  .np-queue-header { display: none; }
}

/* ─── Now Playing Queue Panel ─── */
.np-queue {
  display: none;
  position: absolute; bottom: 0; left: 0; right: 0; top: 0;
  background: #030304;
  z-index: 30;
  overflow-y: auto; padding: 16px;
  padding-top: 60px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  animation: npSlideUp 0.3s ease;
}
.np-queue-title {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.np-queue-list .queue-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-radius: 8px;
  transition: background 0.2s;
}
.np-queue-list .queue-item:active { background: rgba(255,255,255,0.04); }
.np-queue-list .queue-item.playing {
  background: rgba(232,96,10,0.12);
  border-left: 3px solid var(--accent);
  padding-left: 8px;
}
.queue-item-art {
  width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0;
  background: var(--bg-elevated);
  background-size: cover; background-position: center;
}
.queue-item-info { flex: 1; min-width: 0; }
.queue-item-title {
  font-size: 0.85rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-item-artist {
  font-size: 0.72rem; color: rgba(255,255,255,0.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-item-duration {
  font-size: 0.72rem; color: rgba(255,255,255,0.35);
  flex-shrink: 0; margin-right: 4px;
}
.queue-item-actions {
  display: flex; flex-direction: column; gap: 2px; flex-shrink: 0;
}
.queue-arrow-btn {
  background: none; border: none; color: rgba(255,255,255,0.35);
  font-size: 0.7rem; cursor: pointer; padding: 4px 6px;
  border-radius: 4px; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.queue-arrow-btn:hover, .queue-arrow-btn:active {
  color: #fff; background: rgba(255,255,255,0.1);
}
.np-queue-list .np-queue-current {
  font-size: 0.65rem; color: var(--accent); text-transform: uppercase;
  letter-spacing: 1px; margin: 10px 0 6px; font-weight: 600;
}

/* NP slide-down dismiss animation */
@keyframes npSlideDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0.5; }
}

/* ─── Now Playing: Header Actions ─── */
.np-header-actions {
  display: flex; align-items: center; gap: 4px;
}

/* ─── Now Playing: Lyrics Toggle Button ─── */
.np-lyrics-toggle {
  background: none; border: none; color: rgba(255,255,255,0.5);
  cursor: pointer; padding: 8px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  transition: all 0.2s;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.np-lyrics-toggle:hover { color: #fff; }
.np-lyrics-toggle.active { color: var(--accent); }

/* ─── Now Playing: Lyrics Panel ─── */
.np-lyrics {
  position: absolute;
  top: 60px; left: 0; right: 0;
  bottom: 40vh;
  z-index: 5;
  display: none;
  overflow: hidden;
}
.np-lyrics.visible { display: flex; }

.np-lyrics-scroll {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  padding: 30% 28px 20%;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,0,0,0.3) 8%,
    rgba(0,0,0,1) 20%,
    rgba(0,0,0,1) 70%,
    rgba(0,0,0,0.3) 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,0,0,0.3) 8%,
    rgba(0,0,0,1) 20%,
    rgba(0,0,0,1) 70%,
    rgba(0,0,0,0.3) 90%,
    transparent 100%
  );
}
.np-lyrics-scroll::-webkit-scrollbar { display: none; }

/* Individual lyric line */
.lyric-line {
  font-size: 1.15rem;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
  padding: 8px 0;
  line-height: 1.5;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-radius: 8px;
}
.lyric-line:hover {
  color: rgba(255,255,255,0.55);
}
/* Past lines */
.lyric-line.lyric-past {
  color: rgba(255,255,255,0.25);
}
/* Active (current) line */
.lyric-line.lyric-active {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  transform: scale(1.02);
  text-shadow: 0 0 30px rgba(232, 96, 10, 0.3);
}

/* Plain lyrics (no timestamps) */
.np-lyrics-plain {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  white-space: pre-wrap;
  padding: 2rem 0;
}

/* Empty state */
.np-lyrics-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 2rem;
}
.np-lyrics-empty-icon {
  font-size: 2.5rem;
  opacity: 0.4;
}
.np-lyrics-empty-text {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Loading state */
.np-lyrics-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255,255,255,0.35);
  font-size: 0.9rem;
}

/* Darken album art when lyrics are showing */
.now-playing-overlay.lyrics-active .np-art-bg {
  filter: brightness(0.2) blur(12px);
  transition: filter 0.4s ease;
}
.now-playing-overlay.lyrics-active .np-art-gradient {
  opacity: 0.7;
}

/* Desktop: lyrics overlay the artwork square, controls stay visible */
@media (min-width: 769px) {
  .np-lyrics {
    position: relative;
    grid-column: 1; grid-row: 2;
    /* Match the album art dimensions: 80% width, square aspect ratio, centered */
    width: 80%;
    height: 0;
    padding-bottom: 80%;
    justify-self: center;
    align-self: center;
    top: auto; bottom: auto; left: auto; right: auto;
    z-index: 6;
    border-radius: 16px;
    background: rgba(3, 3, 4, 0.8);
    overflow: hidden;
  }
  .np-lyrics.visible {
    display: flex;
  }
  .np-lyrics-scroll {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 2rem 28px;
  }
  /* Darken the art behind lyrics on desktop */
  .now-playing-overlay.lyrics-active .np-art-bg {
    filter: brightness(0.1) blur(8px);
  }
  .lyric-line {
    font-size: 1.15rem;
    padding: 6px 0;
  }
  .lyric-line.lyric-active {
    font-size: 1.45rem;
  }
}

/* Mobile landscape: lyrics overlay */
@media (max-height: 500px) and (orientation: landscape) {
  .np-lyrics {
    position: relative;
    grid-column: 2; grid-row: 2;
    top: auto; bottom: auto; left: auto; right: auto;
  }
  .now-playing-overlay.lyrics-active .np-controls-section {
    display: none;
  }
  .np-lyrics-scroll { padding: 4vh 1rem 4vh; }
  .lyric-line { font-size: 0.85rem; padding: 4px 0; }
  .lyric-line.lyric-active { font-size: 1.05rem; }
}

/* ─── Music Filter Bar ─── */
.music-filter-bar {
  padding: 0 16px 8px;
  display: flex; gap: 8px; align-items: center;
}
.music-filter-input {
  flex: 1; padding: 8px 14px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #fff;
  font-size: 0.82rem; font-family: var(--font); outline: none;
  transition: border-color 0.2s;
}
.music-filter-input:focus { border-color: var(--accent); }
.music-filter-input::placeholder { color: rgba(255,255,255,0.3); }
.music-sort-select {
  padding: 8px 12px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7);
  font-size: 0.78rem; font-family: var(--font); cursor: pointer;
}

/* ─── Home Music Row ─── */
.music-home-row {
  display: flex; gap: 12px; overflow-x: auto; padding: 8px 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.music-home-row::-webkit-scrollbar { display: none; }
.music-home-card {
  flex-shrink: 0; width: 140px; cursor: pointer;
  transition: transform 0.2s;
}
.music-home-card:hover { transform: translateY(-4px); }
.music-home-card .music-card-art { width: 140px; height: 140px; }

/* ─── Responsive: Music on mobile ─── */
@media (max-width: 768px) {
  .music-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; padding: 8px 12px; }
  .music-card-title { font-size: 0.75rem; }
  .music-card-sub { font-size: 0.65rem; }
  .music-detail-header { flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 80px 16px 16px; }
  .music-detail-art { width: 140px; height: 140px; }
  .music-detail-name { font-size: 1.3rem; }
  .music-detail-actions { justify-content: center; flex-wrap: wrap; }
  .btn-music-play, .btn-music-secondary { padding: 8px 18px; font-size: 0.8rem; }
  .mini-player { bottom: var(--mobile-nav-h); padding: 6px 12px; gap: 8px; }
  .mini-player-art { width: 38px; height: 38px; }
  .mini-player-title { font-size: 0.8rem; }
  .track-row { padding: 8px 8px; gap: 8px; }
  .track-art { width: 36px; height: 36px; }
  .track-title { font-size: 0.8rem; }

  .np-body { padding: 0 16px; gap: 12px; }
  .np-art { width: min(340px, 85vw); height: min(340px, 85vw); }
  .np-controls-section { padding: 0 16px; }
  .np-track-title { font-size: 1.24rem; font-weight: 700; }
  .np-track-artist { font-size: 1.05rem; }
  .np-seek-area { width: 100%; }
  .np-controls { gap: 16px; justify-content: center; }
  .np-btn.np-play { width: 56px; height: 56px; font-size: 1.6rem; }
  .np-volume { display: none; }
  .mini-volume { display: none; }
}

/* ─── Extra-small screens (iPhone Mini, SE — ≤390px) ─── */
@media (max-width: 390px) {
  .music-detail-header { padding: 70px 12px 12px; gap: 12px; }
  .music-detail-art { width: 110px; height: 110px; }
  .music-detail-name { font-size: 1.15rem; }
  .music-detail-meta { font-size: 0.72rem; }
  .music-detail-type { font-size: 0.6rem; letter-spacing: 1.5px; }
  .music-detail-actions { gap: 6px; }
  .btn-music-play, .btn-music-secondary { padding: 7px 14px; font-size: 0.75rem; }
  .track-row { padding: 6px 6px; gap: 6px; }
  .track-art { width: 32px; height: 32px; }
  .track-title { font-size: 0.75rem; }
  .track-sub { font-size: 0.62rem; }
  .track-duration { font-size: 0.7rem; }
}

/* ═══════════════════════════════════════════
   Welcome / Login Screen
   ═══════════════════════════════════════════ */

.welcome-screen {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.welcome-card {
  max-width: 420px; width: 100%;
  animation: welcomeIn 0.5s ease-out;
}

@keyframes welcomeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-logo { text-align: center; margin-bottom: 40px; }
.welcome-logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--accent);
  font-size: 1.6rem; margin-bottom: 16px;
}
.welcome-logo h1 { font-size: 1.8rem; font-weight: 800; color: #fff; margin: 0; }
.welcome-subtitle { color: rgba(255,255,255,0.4); font-size: 0.85rem; margin-top: 4px; }

.welcome-steps { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.welcome-step {
  display: flex; gap: 16px; align-items: flex-start;
  background: rgba(255,255,255,0.04); border-radius: 12px;
  padding: 16px; border: 1px solid rgba(255,255,255,0.06);
}
.step-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
}
.step-content h3 { font-size: 0.9rem; font-weight: 600; color: #fff; margin: 0 0 4px; }
.step-content p { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin: 0; line-height: 1.4; }
.step-link {
  display: inline-block; margin-top: 8px; font-size: 0.78rem;
  color: var(--accent); text-decoration: none; font-weight: 600;
}

.welcome-input {
  width: 100%; padding: 10px 14px; margin-top: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; color: #fff; font-size: 0.9rem;
  font-family: 'Inter', sans-serif; outline: none;
  transition: border-color 0.2s;
}
.welcome-input:focus { border-color: var(--accent); }
.welcome-input::placeholder { color: rgba(255,255,255,0.25); }

.welcome-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: var(--accent);
  color: #fff; font-size: 0.95rem; font-weight: 700;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.welcome-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.welcome-btn:not(:disabled):active { transform: scale(0.98); }

@media (max-width: 768px) {
  .nav { padding: 0 0.75rem; }
  .nav-link { font-size: 0.8rem; padding: 0.4rem 0.7rem; white-space: nowrap; }
  .logo-text { font-size: 1rem; }
}

/* ═══════════════════════════════════════════
   Card Progress Bar
   ═══════════════════════════════════════════ */
.card-progress-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.1); border-radius: 0 0 8px 8px;
  overflow: hidden;
}
.card-progress-fill {
  height: 100%; background: var(--accent);
  transition: width 0.3s ease;
}

/* ─── Settings Page ─── */
.settings-page {
  padding: 1.5rem;
  padding-top: calc(env(safe-area-inset-top, 0px) + 1.5rem);
}
.settings-page h2 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.settings-section {
  margin-bottom: 1.5rem;
}
.settings-section-title {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.2px; color: rgba(255,255,255,0.4); margin-bottom: 0.75rem;
}
.settings-section-title.collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  padding: 6px 0;
  transition: color 0.2s;
}
.settings-section-title.collapsible:hover {
  color: rgba(255,255,255,0.6);
}
.settings-section-title.collapsible::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 8px;
}
.settings-section-title.collapsible.collapsed::after {
  transform: rotate(-45deg);
}
.collapsible-body {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  max-height: 2000px;
  opacity: 1;
}
.collapsible-body.collapsed {
  max-height: 0;
  opacity: 0;
}
.settings-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border: none; border-radius: 12px;
  background: rgba(255,255,255,0.06); color: #fff;
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s; margin-bottom: 8px;
  font-family: var(--font);
}
.settings-btn:hover, .settings-btn:active { background: rgba(255,255,255,0.1); }
.settings-btn svg { flex-shrink: 0; }
.settings-btn.scanning svg { animation: spin 1s linear infinite; }
.settings-btn-danger {
  background: rgba(255,60,60,0.12); color: #ff4d4d;
}
.settings-btn-danger:hover, .settings-btn-danger:active {
  background: rgba(255,60,60,0.2);
}
.settings-version {
  margin-top: 2rem; text-align: center;
  font-size: 0.72rem; color: rgba(255,255,255,0.2);
}

/* ─── Queue Header ─── */
.np-queue-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.np-queue-close {
  background: none; border: none; color: rgba(255,255,255,0.6);
  cursor: pointer; padding: 6px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.np-queue-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ═══════════════════════════════════════════
   yt-dlp Download Tab
   ═══════════════════════════════════════════ */

.ytdlp-container {
  padding: 12px 16px 120px;
}

.ytdlp-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ytdlp-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ytdlp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,96,10,0.15);
}
.ytdlp-input::placeholder { color: rgba(255,255,255,0.3); }

.ytdlp-search-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.ytdlp-search-btn:hover {
  transform: scale(1.05);
}
.ytdlp-search-btn:active { transform: scale(0.96); }

.ytdlp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ytdlp-select-all {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
}
.ytdlp-select-all input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: #FF6A1A;
  cursor: pointer;
}

.ytdlp-download-btn {
  padding: 10px 24px;
  border-radius: 24px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}
.ytdlp-download-btn:hover:not(:disabled) {
  transform: scale(1.03);
}
.ytdlp-download-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ytdlp-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ytdlp-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.ytdlp-result:hover { background: rgba(255,255,255,0.04); }
.ytdlp-result.selected {
  background: rgba(232,96,10,0.08);
  border-color: rgba(232,96,10,0.25);
}

.ytdlp-cb {
  width: 18px; height: 18px;
  accent-color: #FF6A1A;
  cursor: pointer;
  flex-shrink: 0;
}

.ytdlp-thumb {
  width: 64px; height: 48px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.ytdlp-info { flex: 1; min-width: 0; }

.ytdlp-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytdlp-meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytdlp-empty {
  text-align: center;
  padding: 48px 20px;
  color: rgba(255,255,255,0.3);
  font-size: 0.9rem;
}

.ytdlp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
}

/* ─── Download Status Bar ─── */
.ytdlp-status-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(232,96,10,0.08);
  border: 1px solid rgba(232,96,10,0.2);
}

.ytdlp-status-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.ytdlp-status-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(232,96,10,0.3);
  border-top-color: #FF6A1A;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.ytdlp-progress-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.ytdlp-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ─── Add to Queue Button ─── */
.ytdlp-add-btn {
  padding: 6px 16px;
  border-radius: 18px;
  border: 1px solid rgba(232,96,10,0.4);
  background: rgba(232,96,10,0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ytdlp-add-btn:hover {
  background: rgba(232,96,10,0.25);
  border-color: var(--accent);
  color: #fff;
}
.ytdlp-add-btn:active { transform: scale(0.95); }

/* ─── Preview Button ─── */
.ytdlp-preview-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(46,204,113,0.3);
  background: rgba(46,204,113,0.1);
  color: #2ecc71;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}
.ytdlp-preview-btn:hover {
  background: rgba(46,204,113,0.25);
  border-color: #2ecc71;
  transform: scale(1.08);
}

/* ─── Download Queue Section ─── */
.ytdlp-queue-section {
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
}

.ytdlp-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.ytdlp-clear-btn {
  padding: 5px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}
.ytdlp-clear-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.ytdlp-queue-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ytdlp-queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  transition: background 0.2s;
}
.ytdlp-queue-item.downloading {
  background: rgba(232,96,10,0.08);
  border-left: 3px solid var(--accent);
}
.ytdlp-queue-item.done {
  opacity: 0.5;
}
.ytdlp-queue-item.error {
  background: rgba(255,60,60,0.06);
  border-left: 3px solid #ff4d4d;
}

.ytdlp-queue-icon {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  font-size: 0.9rem;
}

.ytdlp-queue-info { flex: 1; min-width: 0; }

.ytdlp-queue-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytdlp-queue-status {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  text-transform: capitalize;
  margin-top: 1px;
}
.ytdlp-queue-item.error .ytdlp-queue-status { color: #ff6b6b; text-transform: none; }
.ytdlp-queue-item.downloading .ytdlp-queue-status { color: var(--accent); }
.ytdlp-queue-item.done .ytdlp-queue-status { color: #2ecc71; }

.ytdlp-download-all-btn {
  padding: 6px 18px;
  border-radius: 18px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}
.ytdlp-download-all-btn:hover { transform: scale(1.03); }
.ytdlp-download-all-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ytdlp-remove-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,60,60,0.12);
  color: #ff6b6b;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ytdlp-remove-btn:hover { background: rgba(255,60,60,0.25); }

.ytdlp-add-btn.added {
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: default;
}

/* ═══════════════════════════════════════════
   Import Playlist
   ═══════════════════════════════════════════ */

.ytdlp-import-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ytdlp-import-btn {
  flex: 1;
  padding: 11px 20px;
  border-radius: 24px;
  border: 1px dashed rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
  color: #a78bfa;
  font-weight: 600;
  font-size: 0.82rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ytdlp-import-btn:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: #a78bfa;
  color: #c4b5fd;
  border-style: solid;
}
.ytdlp-import-btn:active { transform: scale(0.98); }

.ytdlp-import-file-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ytdlp-import-file-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #a78bfa;
  color: #c4b5fd;
  transform: scale(1.05);
}

/* ─── Import Modal ─── */
.import-modal {
  max-width: 640px !important;
  width: 90vw;
}
.import-modal input[type="checkbox"] {
  width: auto !important;
  margin: 0;
  padding: 0;
}
.import-modal .import-review-cb,
.import-modal .import-select-all input {
  width: 18px !important;
  height: 18px;
  flex-shrink: 0;
}

.import-name-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.06);
  color: #fff;
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.import-name-input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.import-name-input::placeholder { color: rgba(255,255,255,0.25); }

.import-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.import-textarea:focus {
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
.import-textarea::placeholder { color: rgba(255,255,255,0.18); }

/* ─── Progress View ─── */
.import-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.import-progress-bar-wrap {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: 14px;
}

.import-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.import-progress-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.import-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
}
.import-item-matched { color: rgba(255,255,255,0.7); }
.import-item-failed { color: rgba(255,255,255,0.4); }

.import-item-icon { flex-shrink: 0; font-size: 0.7rem; }
.import-item-text {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.import-item-reason {
  font-size: 0.68rem;
  color: #ff6b6b;
  white-space: nowrap;
  flex-shrink: 0;
}

.import-item-conf {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.conf-high { background: rgba(46,204,113,0.15); color: #2ecc71; }
.conf-med { background: rgba(241,196,15,0.15); color: #f1c40f; }
.conf-low { background: rgba(231,76,60,0.15); color: #e74c3c; }

/* ─── Review List ─── */
.import-review-controls {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.import-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
}
.import-select-all input { accent-color: #8b5cf6; cursor: pointer; }

.import-review-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.import-review-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}
.import-review-row:hover { background: rgba(255,255,255,0.03); }
.import-review-row input[type="checkbox"] {
  accent-color: #8b5cf6;
  flex-shrink: 0;
  cursor: pointer;
}

.import-review-info { flex: 1; min-width: 0; }

.import-review-original {
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-review-yt {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-review-dur {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.import-review-failed {
  opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .ytdlp-container { padding: 8px 12px 120px; }
  .ytdlp-title { font-size: 0.8rem; }
  .ytdlp-result { padding: 8px; gap: 8px; }
  .ytdlp-import-bar { display: none; }
}

/* ═══════════════════════════════════════════
   Torrent Search & Download
   ═══════════════════════════════════════════ */
.torrent-page { padding: 16px 16px 120px; max-width: 800px; margin: 0 auto; }
.torrent-search-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-primary); padding: 12px 0 16px;
  margin-bottom: 4px;
}
.torrent-search-input {
  flex: 1; min-width: 200px; padding: 14px 22px; border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06);
  color: #fff; font-size: 0.95rem; font-family: var(--font); outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.torrent-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(232,96,10,0.15); }
.torrent-search-input::placeholder { color: rgba(255,255,255,0.3); }
.torrent-category-btns { display: flex; gap: 4px; }
.torrent-cat-btn {
  padding: 8px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.5);
  font-size: 0.75rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.torrent-cat-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.torrent-cat-btn.active {
  background: rgba(255,106,26,0.15);
  border-color: var(--accent); color: #fff;
}
.torrent-search-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff;
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.2s;
}
.torrent-search-btn:hover { transform: scale(1.05); }
.torrent-search-btn:active { transform: scale(0.96); }
.torrent-results-header { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 12px; font-weight: 500; }
.torrent-empty { text-align: center; padding: 48px 20px; color: rgba(255,255,255,0.35); font-size: 0.9rem; }
.torrent-list { display: flex; flex-direction: column; gap: 4px; }
.torrent-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04); transition: all 0.15s;
}
.torrent-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); }
.torrent-item-info { flex: 1; min-width: 0; }
.torrent-item-title { font-size: 0.85rem; font-weight: 500; color: #fff; line-height: 1.3; word-break: break-word; }
.torrent-item-meta { display: flex; gap: 12px; margin-top: 4px; font-size: 0.72rem; color: rgba(255,255,255,0.35); flex-wrap: wrap; }
.torrent-seeders { color: #2ecc71; font-weight: 600; }
.torrent-peers { color: #e74c3c; }
.torrent-tracker { background: rgba(255,255,255,0.06); padding: 1px 8px; border-radius: 4px; font-size: 0.65rem; }
.torrent-dl-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(232,96,10,0.4);
  background: rgba(255,106,26,0.12); color: var(--accent); font-size: 1rem; cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.torrent-dl-btn:hover { background: rgba(255,106,26,0.25); border-color: var(--accent); color: #fff; transform: scale(1.05); }
.torrent-dl-btn:active { transform: scale(0.95); }
.torrent-dl-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.torrent-dl-btn.done { border-color: rgba(46,204,113,0.4); background: rgba(46,204,113,0.15); color: #2ecc71; }
.torrent-warn-banner {
  background: rgba(255,193,7,0.1); border: 1px solid rgba(255,193,7,0.3); border-radius: 8px;
  color: #ffc107; font-size: 0.78rem; padding: 10px 14px; margin-bottom: 12px; line-height: 1.5;
  word-break: break-word;
}
.torrent-codec-warn {
  font-size: 1.1rem; color: #ffc107; flex-shrink: 0; margin-right: 4px;
  cursor: help; filter: drop-shadow(0 0 4px rgba(255,193,7,0.3));
}
.torrent-item-warned { border-color: rgba(255,193,7,0.2); }
.torrent-item-warned:hover { border-color: rgba(255,193,7,0.4); }
.torrent-active-section { margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 16px; }
.torrent-active-header { font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.torrent-active-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 8px; background: rgba(255,255,255,0.02); margin-bottom: 4px; transition: background 0.2s;
}
.torrent-active-item.downloading { background: rgba(255,106,26,0.06); border-left: 3px solid var(--accent); }
.torrent-active-item.done { opacity: 0.5; }
.torrent-active-info { flex: 1; min-width: 0; }
.torrent-active-name { font-size: 0.82rem; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.torrent-active-meta { display: flex; gap: 10px; font-size: 0.68rem; color: rgba(255,255,255,0.35); margin-top: 3px; }
.torrent-active-pct { font-size: 0.85rem; font-weight: 700; color: var(--accent); flex-shrink: 0; min-width: 40px; text-align: right; }
.torrent-progress-bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; margin-top: 6px; }
.torrent-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.5s ease; }
.torrent-show-more-btn {
  width: 100%; padding: 12px; margin-top: 8px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6); font-size: 0.8rem; cursor: pointer; transition: all 0.2s;
}
.torrent-show-more-btn:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.15); }

@media (max-width: 768px) {
  .torrent-page { padding: calc(env(safe-area-inset-top, 12px) + 120px) 12px 120px; }
  .torrent-search-bar {
    position: fixed; top: 0; left: 0; right: 0;
    padding: calc(env(safe-area-inset-top, 12px) + 8px) 12px 8px;
    z-index: 110; background: var(--bg-primary);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .torrent-search-input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; min-height: 44px; }
  .torrent-category-btns { width: 100%; overflow-x: auto; }
  .torrent-cat-btn { padding: 6px 10px; font-size: 0.7rem; }
  .torrent-item { padding: 10px; gap: 8px; }
  .torrent-item-title { font-size: 0.8rem; }
  .torrent-dl-btn { width: 36px; height: 36px; font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════
   Discovery — "Not In Library" Cards
   ═══════════════════════════════════════════ */

/* Divider between library and discover sections */
.discover-divider {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px 0;
  margin: 4px 0 0;
}
.discover-divider-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
}
.discover-divider-label {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: rgba(255,255,255,0.2);
  white-space: nowrap;
}

/* Not-in-library poster treatment */
.media-card.not-in-library .card-poster-wrap {
  opacity: 0.65;
  filter: saturate(0.7);
  border: 1.5px dashed rgba(255,255,255,0.15);
  border-radius: 10px;
  transition: opacity 0.3s, filter 0.3s, border-color 0.3s;
}
.media-card.not-in-library:hover .card-poster-wrap {
  opacity: 0.9;
  filter: saturate(1);
  border-color: var(--accent);
}

/* "Not in Library" badge (replaces rating) */
.card-nil-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 4px;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.08);
}
.card-nil-badge .nil-icon {
  font-size: 0.7rem;
}

/* "+" add overlay on hover */
.card-add-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.media-card.not-in-library:hover .card-add-overlay {
  opacity: 1;
}
.card-add-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; font-weight: 300;
  box-shadow: 0 4px 16px rgba(232,96,10,0.4);
  transition: transform 0.2s;
}
.media-card.not-in-library:hover .card-add-icon {
  transform: scale(1.08);
}

/* Hide default play icon for not-in-library cards */
.media-card.not-in-library .card-overlay {
  display: none;
}

/* Media type badge on discover cards (movie/tv) */
.card-type-badge {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Music Discover: Artist Cards ─── */
.music-discover-row {
  display: flex; gap: 14px; overflow-x: auto; padding: 8px 0;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.music-discover-row::-webkit-scrollbar { display: none; }

.music-discover-card {
  flex-shrink: 0; width: 130px; cursor: pointer;
  text-align: center;
  transition: transform 0.2s;
}
.music-discover-card:hover { transform: translateY(-4px); }

.music-discover-art {
  width: 120px; height: 120px;
  border-radius: 50%;
  margin: 0 auto 8px;
  background: var(--bg-elevated);
  background-size: cover; background-position: center;
  border: 2px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.music-discover-card:hover .music-discover-art {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(232,96,10,0.25);
}

/* Not-in-library music treatment */
.music-discover-card.not-in-library .music-discover-art {
  opacity: 0.6;
  filter: saturate(0.6);
  border: 2px dashed rgba(255,255,255,0.15);
}
.music-discover-card.not-in-library:hover .music-discover-art {
  opacity: 0.9;
  filter: saturate(1);
  border-color: var(--accent);
  border-style: solid;
}

.music-discover-name {
  font-size: 0.78rem; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-discover-sub {
  font-size: 0.65rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}

/* ─── Music Discover: Track Row Cards ─── */
.music-discover-track-row {
  display: flex; gap: 12px; overflow-x: auto; padding: 8px 0;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.music-discover-track-row::-webkit-scrollbar { display: none; }

.music-discover-track {
  flex-shrink: 0; width: 160px; cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  transition: all 0.2s;
}
.music-discover-track:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}
.music-discover-track.not-in-library {
  opacity: 0.7;
  border-style: dashed;
}
.music-discover-track.not-in-library:hover {
  opacity: 1;
  border-color: var(--accent);
  border-style: solid;
}
.music-discover-track-art {
  width: 100%; aspect-ratio: 1; background-size: cover; background-position: center;
  background-color: rgba(255,255,255,0.04);
  position: relative;
}
.chart-rank {
  position: absolute; bottom: 4px; left: 6px;
  font-size: 1.4rem; font-weight: 900; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 2px rgba(0,0,0,0.9);
  line-height: 1; pointer-events: none;
  font-style: italic;
}
.music-discover-track-title {
  font-size: 0.8rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 8px 10px 0;
}
.music-discover-track-artist {
  font-size: 0.68rem; color: rgba(255,255,255,0.45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 2px 10px 10px;
}


/* ─── Discover Album Cards (distinct from track cards) ─── */
.music-discover-album-row {
  display: flex; gap: 16px; overflow-x: auto; padding: 8px 0;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.music-discover-album-row::-webkit-scrollbar { display: none; }

.music-discover-album {
  flex-shrink: 0; width: 180px; cursor: pointer;
  background: none; border: none; border-radius: 0;
  padding: 0; transition: all 0.25s;
}
.music-discover-album:hover {
  transform: translateY(-4px);
}
.music-discover-album-art {
  width: 100%; aspect-ratio: 1;
  background-size: cover; background-position: center;
  background-color: rgba(255,255,255,0.04);
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.music-discover-album-art::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  pointer-events: none;
}
.music-discover-album-title {
  font-size: 0.82rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 10px;
}
.music-discover-album-artist {
  font-size: 0.7rem; color: rgba(255,255,255,0.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

/* ─── Responsive: Discover on mobile ─── */
@media (max-width: 768px) {
  .music-discover-card { width: 110px; }
  .music-discover-art { width: 100px; height: 100px; }
  .music-discover-name { font-size: 0.72rem; }
  .music-discover-track { width: 140px; padding: 10px; }
  .music-discover-album { width: 150px; }
}

/* ─── Drag Scroll Cursor ─── */
.media-row, .music-home-row, .music-discover-row, .music-discover-track-row, .music-discover-album-row {
  cursor: grab;
}
.media-row:active, .music-home-row:active, .music-discover-row:active, .music-discover-track-row:active, .music-discover-album-row:active {
  cursor: grabbing;
}

/* ─── Music Artist Initials Placeholder ─── */
.music-discover-initial {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 2.2rem; font-weight: 700;
  color: rgba(255,255,255,0.15);
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08));
  border-radius: 50%;
}

/* ─── Season Dropdown ─── */
.season-selector-wrap {
  margin-bottom: 1.2rem;
}

.season-dropdown {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  max-width: 320px;
  padding: 12px 44px 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FF6A1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.season-dropdown:hover {
  border-color: var(--accent);
}

.season-dropdown:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 26, 0.2);
}

.season-dropdown option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px;
}


/* ═══════════════════════════════════════════
   Profile Page & Social Features
   ═══════════════════════════════════════════ */

.profile-page {
  padding: 1.5rem;
  padding-top: calc(env(safe-area-inset-top, 0px) + 1.5rem);
  padding-bottom: 160px;
}
.profile-header { margin-bottom: 0.5rem; }
.profile-username { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary); }
.profile-joined { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.profile-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 0.5rem 0 1.2rem;
}
.profile-stat-card {
  padding: 12px 8px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 10px; text-align: center;
}
.profile-stat-value { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.profile-stat-label {
  font-size: 0.58rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; margin-top: 2px;
}

/* Profile sub-tabs */
.profile-tabs {
  display: flex; gap: 4px; overflow-x: auto; padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font-family: var(--font); font-size: 0.8rem; font-weight: 500;
  white-space: nowrap; transition: all 0.2s;
}
.profile-tab:hover { border-color: rgba(255,255,255,0.2); color: var(--text-primary); }
.profile-tab.active { background: rgba(255,106,26,0.15); border-color: var(--accent); color: #fff; }

/* Profile sub-tabs (e.g. Friends/Messages within Social) */
.profile-sub-tabs {
  display: flex; gap: 6px; margin-bottom: 12px;
}
.profile-sub-tab {
  flex: 1; padding: 6px 12px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08); background: transparent;
  color: var(--text-secondary); cursor: pointer;
  font-family: var(--font); font-size: 0.75rem; font-weight: 500;
  transition: all 0.2s; text-align: center;
}
.profile-sub-tab.active {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: #fff;
}

/* Watchlist bookmark button */
.btn-watchlist {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: var(--radius-sm, 8px);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  font-family: var(--font); font-size: 0.82rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-watchlist:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-watchlist.saved { background: rgba(255,106,26,0.12); border-color: rgba(255,106,26,0.3); color: var(--accent); }

/* Watchlist remove button overlay */
.watchlist-remove-btn {
  position: absolute; top: 6px; right: 6px; z-index: 5;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,0.7); border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; opacity: 0; transition: opacity 0.2s;
}
.media-card:hover .watchlist-remove-btn { opacity: 1; }
.watchlist-remove-btn:hover { background: rgba(255,60,60,0.6); color: #fff; }

.watchlist-empty {
  text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-size: 0.85rem;
  line-height: 1.8;
}

/* Friend cards */
.friend-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
  transition: background 0.2s;
}
.friend-card:hover { background: rgba(255,255,255,0.05); }
.friend-initial {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e85d04);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.friend-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.friend-activity-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: 1px; }
.friend-status {
  font-size: 0.72rem; color: var(--accent); font-style: italic;
  margin-top: 1px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 200px; opacity: 0.85;
}

/* Watch Sub-Tabs */
.watch-sub-tabs {
  display: flex; gap: 6px; padding: 12px 16px 4px;
  position: relative; z-index: 15;
  background: var(--bg-primary);
}
.watch-sub-tabs + #watch-tab-content .filter-bar { padding-top: 6px; }
.watch-filter-chips {
  display: flex; gap: 6px; padding: 0 16px 8px;
}
.watch-filter-chip {
  padding: 5px 12px; border-radius: 16px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary);
  font-family: var(--font); font-size: 0.72rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.watch-filter-chip:hover { border-color: rgba(255,255,255,0.2); color: var(--text-primary); }
.watch-filter-chip.active {
  background: var(--accent); border-color: var(--accent);
  color: white;
}
.watch-sub-tab {
  flex: 1; padding: 8px 0; border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary);
  font-family: var(--font); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  text-align: center;
}
.watch-sub-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.watch-sub-tab.active {
  background: var(--accent); border-color: var(--accent);
  color: white;
}
.user-reviews-grid { display: flex; flex-direction: column; gap: 10px; }
.user-review-card {
  display: flex; gap: 12px; padding: 10px; border-radius: 10px;
  background: rgba(255,255,255,0.04); cursor: pointer;
  transition: background 0.2s;
}
.user-review-card:hover { background: rgba(255,255,255,0.08); }
.user-review-poster { width: 60px; min-width: 60px; border-radius: 6px; overflow: hidden; }
.user-review-poster img { width: 100%; height: auto; display: block; border-radius: 6px; }
.user-review-info { flex: 1; min-width: 0; }
.user-review-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.user-review-rating { font-size: 0.78rem; color: #D9A441; margin-top: 3px; }
.user-review-comment {
  font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px;
  font-style: italic; line-height: 1.3; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.user-review-date { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; }
.friend-actions { margin-left: auto; display: flex; gap: 6px; }
.friend-btn {
  padding: 6px 14px; border-radius: 8px; font-family: var(--font);
  font-size: 0.72rem; font-weight: 600; cursor: pointer; border: none;
  transition: all 0.15s;
}
.friend-btn-accept { background: var(--accent); color: #fff; }
.friend-btn-accept:hover { background: #e85d04; }
.friend-btn-reject { background: rgba(255,60,60,0.12); color: #ff4d4d; }
.friend-btn-reject:hover { background: rgba(255,60,60,0.25); }
.friend-btn-remove { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--border); }
.friend-btn-remove:hover { border-color: rgba(255,60,60,0.3); color: #ff6b6b; }

/* Friend search */
.friend-search-input {
  width: 100%; padding: 10px 16px; border-radius: 20px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--text-primary); font-family: var(--font); font-size: 0.85rem;
  outline: none; margin-bottom: 12px; transition: border-color 0.2s;
}
.friend-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,106,26,0.1); }
.friend-search-input::placeholder { color: rgba(255,255,255,0.25); }

/* Friend badge on poster cards */
.card-friend-badge {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 2px 8px; border-radius: 10px;
  font-size: 0.6rem; font-weight: 600; color: var(--accent);
  z-index: 3; border: 1px solid rgba(255,106,26,0.2);
}

/* Tab order settings */
.tab-order-list { margin: 8px 0; }
.tab-order-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 4px; font-size: 0.85rem; font-weight: 500;
  color: var(--text-primary);
}
.tab-order-handle { color: var(--text-muted); font-size: 0.75rem; }
.tab-order-name { flex: 1; }
.tab-order-btn {
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 0.7rem; transition: all 0.15s;
}
.tab-order-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

/* Mobile: profile stats 2x2 */
@media (max-width: 480px) {
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}

/* T-Load nested inside Profile tab — strip standalone layout */
.profile-tload-wrap .torrent-page {
  padding: 0 !important;
  max-width: none;
  margin: 0;
}
.profile-tload-wrap .torrent-search-bar {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 1 !important;
  padding: 0 0 12px !important;
  border-bottom: none !important;
  background: transparent !important;
}

/* ═══════════════════════════════════════════
   Profile Avatars
   ═══════════════════════════════════════════ */
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1); cursor: pointer;
  transition: border-color 0.3s, transform 0.2s;
}
.profile-avatar:hover { border-color: var(--accent); transform: scale(1.05); }
.profile-avatar-initial { transition: border-color 0.3s; border: 2px solid rgba(255,255,255,0.1); }
.profile-avatar-initial:hover { border-color: var(--accent); }

.friend-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   Conversations List
   ═══════════════════════════════════════════ */
.conversation-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 10px; cursor: pointer; transition: background 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.conversation-card:hover { background: rgba(255,255,255,0.05); }
.conversation-info { flex: 1; min-width: 0; }
.conversation-name { font-size: 0.88rem; font-weight: 600; color: #fff; }
.conversation-preview {
  font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conversation-time { font-size: 0.65rem; color: rgba(255,255,255,0.3); flex-shrink: 0; }

/* Unread badge */
.unread-badge-inline {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 0.6rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  margin-left: 4px; vertical-align: middle;
}

/* ═══════════════════════════════════════════
   Chat View
   ═══════════════════════════════════════════ */
.chat-view {
  display: flex; flex-direction: column;
  height: 400px; /* fallback, JS overrides */
  overflow: hidden;
}
.chat-header {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.chat-back-btn {
  background: none; border: none; color: var(--accent); font-size: 1.2rem;
  cursor: pointer; padding: 4px 8px;
}
.chat-partner-name {
  font-size: 0.92rem; font-weight: 600; color: #fff; cursor: pointer;
}
.chat-partner-name:hover { color: var(--accent); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 0;
}
.chat-bubble {
  max-width: 75%; padding: 10px 14px; border-radius: 16px;
  font-size: 0.85rem; line-height: 1.4; word-break: break-word;
}
.chat-bubble.mine {
  align-self: flex-end;
  background: var(--accent); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
  align-self: flex-start;
  background: rgba(255,255,255,0.08); color: #fff;
  border-bottom-left-radius: 4px;
}
.chat-bubble-content { }
.chat-bubble-time {
  font-size: 0.58rem; opacity: 0.5; margin-top: 3px;
  text-align: right;
}
.chat-bubble.theirs .chat-bubble-time { text-align: left; }

.chat-compose {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.chat-input {
  flex: 1; padding: 12px 18px; border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #fff;
  font-size: 0.88rem; font-family: var(--font); outline: none;
  transition: border-color 0.3s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: rgba(255,255,255,0.3); }
.chat-send-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.2s;
}
.chat-send-btn:hover { transform: scale(1.05); }
.chat-send-btn:active { transform: scale(0.95); }

@media (max-width: 768px) {
  .chat-bubble { max-width: 85%; }
}

/* Unread notification dot on nav */
.nav-unread-dot {
  position: absolute; top: -2px; right: -2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  pointer-events: none;
  box-shadow: 0 0 6px rgba(255,106,26,0.5);
}

/* Conversation delete button */
.convo-delete-btn {
  background: none; border: none; color: rgba(255,255,255,0.2);
  font-size: 0.75rem; cursor: pointer; padding: 4px 8px; flex-shrink: 0;
  transition: color 0.2s;
}
.convo-delete-btn:hover { color: #e74c3c; }

/* Message delete button */
.chat-bubble-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
}
.chat-bubble.long-pressed {
  opacity: 0.5; transform: scale(0.97);
  transition: opacity 0.2s, transform 0.2s;
}

/* ═══════════════════════════════════════════
   Music: Unified Homepage
   ═══════════════════════════════════════════ */

/* Smart search bar */
.music-smart-search {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
}
.music-mode-toggle {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all 0.2s; flex-shrink: 0;
}
.music-mode-toggle.youtube {
  background: rgba(255,0,0,0.12);
  border-color: rgba(255,0,0,0.3);
  color: #ff4444;
}
.music-smart-input {
  flex: 1; padding: 10px 16px; border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #fff;
  font-size: 0.85rem; font-family: var(--font); outline: none;
  transition: border-color 0.3s;
  min-width: 0;
}
.music-smart-input:focus { border-color: var(--accent); }
.music-smart-input::placeholder { color: rgba(255,255,255,0.3); }
.music-search-go {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.2s;
}
.music-search-go:hover { transform: scale(1.05); }

/* Quick access grid */
.music-quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px; padding: 8px 16px 16px;
}
.music-quick-tile {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 8px; border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer; transition: all 0.2s;
  text-decoration: none;
}
.music-quick-tile:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
.music-quick-tile .tile-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,106,26,0.2), rgba(255,106,26,0.05));
  color: var(--accent);
}
.music-quick-tile .tile-icon svg { stroke: var(--accent); }
.music-quick-tile .tile-label {
  font-size: 0.7rem; font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-align: center;
}

/* Sub-page back header */
.music-sub-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; z-index: 20;
  background: var(--bg-primary);
}
.music-sub-back {
  background: none; border: none; color: var(--accent);
  font-size: 1.2rem; cursor: pointer; padding: 4px 8px;
}
.music-sub-title {
  font-size: 1rem; font-weight: 700; color: #fff;
}
.music-sub-search-wrap {
  margin-left: auto; display: flex; align-items: center; gap: 0;
  position: relative;
}
.music-sub-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.3); pointer-events: none; flex-shrink: 0;
}
.music-sub-filter {
  width: 180px; padding: 7px 14px 7px 32px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #fff; font-family: var(--font); font-size: 0.82rem;
  outline: none; transition: border-color 0.3s;
  border-radius: 20px;
}
.music-sub-filter:focus { border-color: var(--accent); }
.music-sub-filter::placeholder { color: rgba(255,255,255,0.3); }
@media (max-width: 480px) {
  .music-sub-filter { width: 140px; font-size: 0.78rem; }
}

/* Download pill */
.dl-pill {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 16px 8px; padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,106,26,0.15), rgba(255,60,60,0.1));
  border: 1px solid rgba(255,106,26,0.2);
  cursor: pointer; transition: all 0.2s;
}
.dl-pill:hover { border-color: rgba(255,106,26,0.4); }
.dl-pill-info {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: rgba(255,255,255,0.85);
}
.dl-pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); animation: pulse 1.5s infinite;
}
.dl-pill-toggle {
  font-size: 0.7rem; color: rgba(255,255,255,0.5);
  background: none; border: none; cursor: pointer;
  padding: 4px 8px;
}
.dl-pill-expanded {
  margin: 0 16px 12px; padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 768px) {
  .music-quick-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px; padding: 8px 12px 12px;
  }
  .music-quick-tile { padding: 12px 4px; }
  .music-quick-tile .tile-icon { width: 34px; height: 34px; font-size: 1.1rem; }
  .music-quick-tile .tile-label { font-size: 0.62rem; }
}

/* ═══════════════════════════════════════════
   Jam Sessions
   ═══════════════════════════════════════════ */

/* Modal overlay */
.jam-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.jam-modal {
  background: var(--bg-elevated); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 28px 24px; width: 90%; max-width: 380px;
  position: relative; text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.jam-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; transition: color 0.2s;
}
.jam-modal-close:hover { color: #fff; }
.jam-modal-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; color: #fff; }

/* Tabs */
.jam-modal-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: rgba(255,255,255,0.06); border-radius: 12px; padding: 3px;
}
.jam-tab {
  flex: 1; padding: 8px 0; border-radius: 10px;
  border: none; background: transparent; color: var(--text-secondary);
  font-family: var(--font); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.jam-tab.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 12px rgba(255,106,26,0.3);
}

.jam-desc {
  font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: 16px;
}

.jam-code-input {
  width: 160px; padding: 14px; border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
  color: #fff; font-family: var(--font); font-size: 1.6rem; font-weight: 800;
  text-align: center; letter-spacing: 8px; text-transform: uppercase;
  outline: none; transition: border-color 0.3s;
  margin-bottom: 16px; display: block; margin-left: auto; margin-right: auto;
}
.jam-code-input:focus { border-color: var(--accent); }
.jam-code-input::placeholder { color: rgba(255,255,255,0.15); letter-spacing: 4px; font-size: 1rem; }

.jam-start-btn {
  width: 100%; padding: 14px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--accent), #e85d04);
  color: #fff; font-family: var(--font); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(255,106,26,0.3);
}
.jam-start-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255,106,26,0.4); }
.jam-start-btn:active { transform: scale(0.98); }

/* ── Inline Jam banner inside queue header ── */
.jam-inline-banner {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
  padding: 4px 8px; border-radius: 8px;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.25);
}
.jam-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  animation: jamPulse 1.5s ease-in-out infinite;
}
@keyframes jamPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.jam-inline-code {
  font-size: 0.72rem; font-weight: 800; color: #4ade80;
  letter-spacing: 2px;
}
.jam-inline-copy {
  background: none; border: none; font-size: 0.7rem;
  cursor: pointer; padding: 2px 4px;
}
.jam-inline-end {
  background: rgba(255,60,60,0.15); border: 1px solid rgba(255,60,60,0.25);
  border-radius: 6px; padding: 2px 8px; color: #ff6b6b;
  font-family: var(--font); font-size: 0.65rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.jam-inline-end:hover { background: rgba(255,60,60,0.3); }

/* ── Jam search inside queue panel ── */
.jam-inline-search {
  padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.jam-search-input {
  width: 100%; padding: 8px 14px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05);
  color: #fff; font-family: var(--font); font-size: 0.8rem;
  outline: none; transition: border-color 0.3s;
}
.jam-search-input:focus { border-color: var(--accent); }
.jam-search-input::placeholder { color: rgba(255,255,255,0.25); }

/* Search results dropdown */
.jam-search-results {
  max-height: 180px; overflow-y: auto; margin-top: 6px;
}
.jam-search-results:empty { display: none; }
.jam-search-result {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px; cursor: pointer; transition: background 0.15s;
  border-radius: 8px;
}
.jam-search-result:hover { background: rgba(255,255,255,0.06); }
.jam-search-result-art {
  width: 32px; height: 32px; border-radius: 4px; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: rgba(255,255,255,0.06);
}
.jam-search-result-info { flex: 1; min-width: 0; }
.jam-search-result-title {
  font-size: 0.78rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jam-search-result-artist {
  font-size: 0.65rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jam-search-result-add {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,106,26,0.15); border: 1px solid rgba(255,106,26,0.3);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 300; flex-shrink: 0;
  transition: all 0.2s; cursor: pointer;
}
.jam-search-result-add:hover {
  background: var(--accent); color: #fff;
}

/* "added by" label in queue items */
.jam-added-by {
  font-size: 0.58rem; color: rgba(74,222,128,0.6);
  font-style: italic; margin-left: 4px;
}

/* NP Jam button */
.np-jam-btn {
  background: none; border: none; color: rgba(255,255,255,0.5);
  cursor: pointer; padding: 4px; transition: color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.np-jam-btn:hover { color: #fff; }
.np-jam-btn.active { color: #4ade80; }

/* Jam action popup */
.jam-action-popup {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10000;
  background: var(--bg-elevated); border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px 20px 0 0; padding: 20px 16px 28px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.jam-action-title {
  font-size: 0.85rem; font-weight: 700; color: #fff;
  text-align: center; margin-bottom: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 20px;
}
.jam-action-btn {
  display: block; width: 100%; padding: 13px; border-radius: 12px;
  border: none; font-family: var(--font); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; margin-bottom: 8px; transition: all 0.15s;
  text-align: center;
}
.jam-action-play {
  background: linear-gradient(135deg, var(--accent), #e85d04);
  color: #fff; box-shadow: 0 3px 14px rgba(255,106,26,0.3);
}
.jam-action-play:hover { transform: translateY(-1px); }
.jam-action-next {
  background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.25);
  color: #4ade80;
}
.jam-action-next:hover { background: rgba(74,222,128,0.2); }
.jam-action-cancel {
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
}
.jam-action-cancel:hover { background: rgba(255,255,255,0.1); }
