/* ═══════════════════════════════════════════
   Tesla Media Player — Dark UI
   Tesla-first responsive: 1920×1200 (ön ekran)
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #06060b;
  --bg-secondary: #0d0d14;
  --bg-surface: rgba(255, 255, 255, 0.04);
  --bg-surface-solid: #14141e;
  --bg-hover: rgba(255, 255, 255, 0.07);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --text-primary: #eeeef3;
  --text-secondary: #9797a9;
  --text-tertiary: #5c5c73;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-glow: rgba(139, 92, 246, 0.25);
  --accent-subtle: rgba(139, 92, 246, 0.08);
  --gradient-accent: linear-gradient(135deg, #8b5cf6, #6366f1);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --error: #f43f5e;
  --success: #10b981;
  --youtube: #ff0033;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
  --t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --toolbar-width: 56px;
  --scroll-thumb: rgba(255, 255, 255, 0.08);
  --scroll-thumb-hover: rgba(255, 255, 255, 0.16);
  --overlay-bg: rgba(0, 0, 0, 0.78);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

.hidden { display: none !important; }

/* ─── App shell ─────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg-primary);
}

/* ─── Icon toolbar ──────────────────────── */
.icon-toolbar {
  width: var(--toolbar-width);
  min-width: var(--toolbar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  z-index: 100;
}
.toolbar-top, .toolbar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.toolbar-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.toolbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.toolbar-btn.active { background: var(--accent-subtle); color: var(--accent); }
.toolbar-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toolbar-brand {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: var(--shadow-glow);
}

/* ─── App content container ─────────────── */
.app-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

/* ═══════════════════════════════════════════
   HOME VIEW — 4 content cards
   ═══════════════════════════════════════════ */
.home-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 48px;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
}
.home-header {
  text-align: center;
  margin-bottom: 56px;
}
/* ─── Signature chip — fades in, shimmers, fades out every 5 s ── */
.home-signature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: transparent;
  background-image: linear-gradient(
    100deg,
    rgba(139, 92, 246, 0.9) 0%,
    rgba(238, 238, 243, 1) 35%,
    rgba(139, 92, 246, 0.9) 65%,
    rgba(238, 238, 243, 1) 100%
  );
  background-size: 220% 100%;
  background-position: 200% 0;
  -webkit-background-clip: text;
          background-clip: text;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: none;
  opacity: 0;
  transform: translateY(-4px);
  animation: signaturePulse 5s ease-in-out infinite;
  will-change: opacity, transform, background-position;
}
.home-signature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  flex-shrink: 0;
  animation: signatureDotPulse 5s ease-in-out infinite;
}
@keyframes signaturePulse {
  0%   { opacity: 0; transform: translateY(-4px); background-position: 200% 0; }
  8%   { opacity: 1; transform: translateY(0); }
  55%  { opacity: 1; transform: translateY(0); background-position: -120% 0; }
  72%  { opacity: 0; transform: translateY(-4px); background-position: -120% 0; }
  100% { opacity: 0; transform: translateY(-4px); background-position: -120% 0; }
}
@keyframes signatureDotPulse {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  8%       { opacity: 1; transform: scale(1); }
  55%      { opacity: 1; transform: scale(1); }
  72%      { opacity: 0; transform: scale(0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .home-signature,
  .home-signature-dot {
    animation-duration: 1s;
    animation-iteration-count: 1;
    opacity: 1;
    transform: none;
  }
}
.home-brand {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 0 0 12px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-tagline {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.home-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 48px;
}
.home-card {
  position: relative;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-base);
  overflow: hidden;
}
.home-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--accent-subtle) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
}
.home-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}
.home-card:hover::before { opacity: 1; }
.home-card:active { transform: translateY(-2px); }
.home-card-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform var(--t-base);
}
.home-card:hover .home-card-icon { transform: scale(1.08); }
.home-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
}
.home-card-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  position: relative;
}
.home-card-youtube .home-card-icon { color: var(--youtube); }
.home-card-youtube:hover { border-color: var(--youtube); box-shadow: var(--shadow-md), 0 0 40px rgba(255, 0, 51, 0.15); }

.home-m3u {
  display: flex;
  justify-content: center;
  width: 100%;
}
.home-m3u-qr-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--gradient-accent);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 10px 28px var(--accent-glow);
  transition: transform var(--t-fast), box-shadow var(--t-base);
}
.home-m3u-qr-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px var(--accent-glow);
}
.home-m3u-qr-btn:active { transform: translateY(0); }
.home-m3u-qr-btn svg { flex-shrink: 0; }

/* ─── QR pairing modal ─────────────────────── */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: var(--overlay-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: qrFadeIn 0.2s ease;
}
@keyframes qrFadeIn { from { opacity: 0; } to { opacity: 1; } }
.qr-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 32px 24px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(139, 92, 246, 0.15);
  animation: qrSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes qrSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.qr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.qr-close:hover { background: var(--accent-subtle); color: var(--accent); }
.qr-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.qr-header-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  border-radius: var(--radius-sm);
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.qr-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.qr-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.qr-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 22px;
  min-height: 320px;
}
.qr-image-wrap img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  image-rendering: pixelated;
}
.qr-loading {
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 500;
}
.qr-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.qr-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-hover);
  border-radius: var(--radius-xs);
  font-size: 13px;
  color: var(--text-primary);
}
.qr-step-num {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.qr-pair-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.qr-pair-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.qr-pair-url {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}
.qr-status {
  font-size: 13px;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-hover);
}
.qr-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  animation: qrPulse 1.4s ease-in-out infinite;
}
@keyframes qrPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 12px var(--accent-glow); }
}
.qr-status.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.qr-status.success::before {
  background: var(--success);
  animation: none;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}
.qr-status.error {
  background: rgba(244, 63, 94, 0.1);
  color: var(--error);
}
.qr-status.error::before { background: var(--error); animation: none; }

@media (max-width: 600px) {
  .qr-modal { padding: 24px 20px 20px; }
  .qr-image-wrap { min-height: 260px; padding: 12px; }
}

/* ═══════════════════════════════════════════
   CONTENT VIEW — 3 columns
   ═══════════════════════════════════════════ */
.content-view {
  height: 100%;
  overflow: hidden;
  position: relative;
}
.content-columns {
  display: flex;
  height: 100%;
}

/* Column 1: Categories */
.col-categories {
  width: 300px;
  min-width: 260px;
  border-right: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
}
.cat-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.cat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cat-header-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.cat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: all var(--t-fast);
  border-left: 3px solid transparent;
}
.cat-item:hover { background: var(--bg-hover); }
.cat-item.active {
  background: var(--accent-subtle);
  border-left-color: var(--accent);
}
.cat-item-fav svg { color: var(--error); }
.cat-item-recent svg { color: var(--success); }
.cat-item-all svg { color: var(--accent); }
.cat-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cat-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-item.active .cat-item-name { color: var(--accent); }
.cat-item-count {
  font-size: 11px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.cat-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Column 2: Channels */
.col-channels {
  width: 380px;
  min-width: 320px;
  border-right: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}
.ch-panel { height: 100%; display: flex; flex-direction: column; }
.ch-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ch-search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0 12px;
}
.ch-search-wrapper svg { color: var(--text-tertiary); flex-shrink: 0; }
.ch-search-input {
  flex: 1;
  padding: 10px 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.ch-search-input::placeholder { color: var(--text-tertiary); }
.ch-sort-bar {
  display: flex;
  gap: 6px;
}
.ch-sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.ch-sort-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.ch-sort-btn.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent);
}
.ch-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.ch-empty { padding: 60px 20px; text-align: center; color: var(--text-tertiary); font-size: 13px; }

/* Live/channel list item */
.ch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
}
.ch-item:hover { background: var(--bg-hover); }
.ch-item.active { background: var(--accent-subtle); }
.ch-item-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.ch-item-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ch-item-logo-fallback {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
}
.ch-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ch-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-item.active .ch-item-name { color: var(--accent); }
.ch-item-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}
.ch-item-fav {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--t-fast);
}
.ch-item-fav:hover { color: var(--error); }
.ch-item-fav.fav-active { color: var(--error); }

/* VOD poster grid */
.vod-poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  padding: 14px;
}
.vod-poster-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--t-fast);
}
.vod-poster-card:hover { transform: translateY(-3px); }
.vod-poster-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--bg-surface-solid);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.vod-poster-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.vod-poster-img-wrap.no-poster::before {
  content: '🎬';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  opacity: 0.3;
}
.vod-poster-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ch-load-more {
  margin: 14px auto;
  display: block;
  padding: 10px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.ch-load-more:hover { background: var(--bg-hover); border-color: var(--accent); }
.ch-load-more:disabled { opacity: 0.5; cursor: not-allowed; }

/* Column 3: Player */
.col-player {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* VOD browse mode: when viewing films/series, hide player column so the
   channel poster grid gets the full width. */
.content-columns.vod-browse-mode .col-player { display: none; }
.content-columns.vod-browse-mode .col-channels { flex: 1; min-width: 0; }

/* ═══════════════════════════════════════════
   VOD DETAIL VIEW (film / series)
   ═══════════════════════════════════════════ */
.vod-detail {
  position: absolute;
  inset: 0;
  display: flex;
  background: var(--bg-primary);
  overflow: hidden;
}
.vod-detail-left {
  width: 320px;
  min-width: 280px;
  max-width: 360px;
  padding: 20px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.vod-detail-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--bg-surface-solid);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.vod-detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.vod-detail-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.25;
}
.vod-detail-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}
.vod-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.vod-detail-fav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.vod-detail-fav-btn:hover { border-color: var(--error); color: var(--error); }
.vod-detail-fav-btn.fav-active {
  background: rgba(244, 63, 94, 0.1);
  border-color: var(--error);
  color: var(--error);
}
.vod-detail-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vod-detail-player {
  flex: 1;
  min-height: 0;
  background: #000;
  position: relative;
}

/* Season / episode selector (for series) */
.vod-seasons {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  max-height: 40%;
  display: flex;
  flex-direction: column;
}
.vod-seasons-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.vod-seasons-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}
.vod-seasons-select {
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.vod-seasons-select:focus { border-color: var(--accent); }
.vod-episodes-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.vod-episode-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.vod-episode-item:hover { background: var(--bg-hover); }
.vod-episode-item.active {
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent);
  padding-left: 17px;
}
.vod-episode-num {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.vod-episode-item.active .vod-episode-num {
  background: var(--accent);
  color: #fff;
}
.vod-episode-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════
   FAVORITES VIEW
   ═══════════════════════════════════════════ */
.favorites-view { height: 100%; overflow-y: auto; padding: 32px 40px; }
.favorites-panel { max-width: 1200px; margin: 0 auto; }
.favorites-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.favorites-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
}
.favorites-count {
  padding: 4px 12px;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.fav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t-fast);
}
.fav-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.fav-card-logo {
  width: 48px;
  height: 48px;
  background: var(--bg-surface);
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
}
.fav-card-logo img { width: 100%; height: 100%; object-fit: contain; }
.fav-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fav-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-card-meta { font-size: 11px; color: var(--text-tertiary); }
.fav-card-remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--t-fast);
}
.fav-card-remove:hover { color: var(--error); background: rgba(244, 63, 94, 0.08); }
.favorites-empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

/* ═══════════════════════════════════════════
   YOUTUBE VIEW — Tesla-first 1920×1200
   ═══════════════════════════════════════════ */
.youtube-view {
  height: 100%;
  overflow-y: auto;
  padding: 28px 40px 40px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 0, 51, 0.08), transparent 60%),
    radial-gradient(1000px 500px at 10% 110%, var(--accent-subtle), transparent 60%);
}
.yt-shell {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.yt-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.yt-header::before {
  content: '';
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--youtube);
  box-shadow: 0 8px 24px rgba(255, 0, 51, 0.35);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='10,8 16,12 10,16' fill='white'/></svg>") center/60% no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='10,8 16,12 10,16' fill='white'/></svg>") center/60% no-repeat;
}
.yt-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.yt-search { position: relative; }
.yt-player { min-height: 0; }

/* ─── SearchBox component ──────────────────── */
.search-box { position: relative; width: 100%; }
.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--t-base);
  box-shadow: var(--shadow-sm);
}
.search-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}
.search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color var(--t-base);
}
.search-input-wrapper:focus-within .search-icon { color: var(--accent); }
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 500;
  font-family: inherit;
  min-width: 0;
}
.search-input::placeholder { color: var(--text-tertiary); }
.search-clear {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--t-fast);
}
.search-clear:hover { background: var(--accent-subtle); color: var(--accent); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 520px;
  overflow-y: auto;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 20;
  padding: 8px;
}
.search-dropdown::-webkit-scrollbar { width: 10px; }
.search-dropdown::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}
.search-result-item + .search-result-item { margin-top: 4px; }
.search-result-item:hover,
.search-result-item.selected {
  background: var(--accent-subtle);
}
.result-thumb {
  width: 140px;
  height: 80px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius-xs);
  background: var(--bg-primary);
}
.result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.result-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}
.result-title mark,
.result-channel mark {
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 2px;
}
.result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.result-channel { font-weight: 500; color: var(--text-secondary); }
.result-duration,
.result-views {
  padding: 2px 8px;
  background: var(--bg-hover);
  border-radius: var(--radius-xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-secondary);
}
.search-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 500;
}

/* ─── VideoPlayer (YouTube) component ──────── */
.player-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.player-canvas-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-canvas-wrapper video,
.player-canvas-wrapper canvas,
.player-canvas-wrapper .ogvjs {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain;
  background: #000;
}
.player-loading,
.player-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.82);
  color: var(--text-primary);
  font-weight: 500;
  z-index: 10;
  text-align: center;
  padding: 20px;
}
.player-loading .spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.player-error span { color: var(--error); }

.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
.player-controls .ctrl-btn {
  width: 44px;
  height: 44px;
}
.ctrl-time {
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  min-width: 92px;
  text-align: center;
}
.ctrl-progress-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}
.ctrl-progress {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
.ctrl-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
}
.ctrl-progress::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}
.ctrl-quality {
  height: 40px;
  padding: 0 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t-fast);
}
.ctrl-quality:hover { border-color: var(--border-hover); }
.ctrl-quality:focus { border-color: var(--accent); }

.player-info {
  padding: 16px 20px 18px;
  background: var(--bg-surface-solid);
  border-top: 1px solid var(--border);
}
.player-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.player-channel {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Empty-state placeholder when no video is loaded */
.yt-player:empty::before,
.yt-player .player-section.hidden ~ .yt-empty,
.yt-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 500;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-glass);
  text-align: center;
  padding: 40px 20px;
}

/* ═══════════════════════════════════════════
   SEARCH OVERLAY — fullscreen modal
   ═══════════════════════════════════════════ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--overlay-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 48px 32px;
  overflow-y: auto;
}
.search-overlay-inner {
  max-width: 900px;
  margin: 0 auto;
}
.search-overlay-header {
  margin-bottom: 24px;
}
.search-overlay-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-surface-solid);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}
.search-overlay-input-wrap svg { color: var(--accent); flex-shrink: 0; }
.search-overlay-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 500;
  outline: none;
  min-width: 0;
}
.search-overlay-input::placeholder { color: var(--text-tertiary); }
/* Big close button — Tesla touchscreens can't press ESC so this is the
   only way for the user to dismiss the virtual keyboard. */
.search-overlay-close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.search-overlay-close:hover {
  background: var(--error);
  color: #fff;
  transform: rotate(90deg);
}
.search-overlay-scope {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.search-overlay-results { min-height: 200px; }
.search-overlay-empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.search-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.search-list-view { display: flex; flex-direction: column; gap: 4px; }
.search-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}
.search-list-item:hover { background: var(--bg-hover); }
.search-item-logo-wrap {
  width: 40px;
  height: 40px;
  background: var(--bg-surface-solid);
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-item-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.search-item-logo-fb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
}
.search-item-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-cat { font-size: 11px; color: var(--text-tertiary); }
.search-list-item mark {
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}
.search-poster-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.search-poster-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--t-fast);
}
.search-poster-card:hover { transform: translateY(-3px); }
.search-poster-img-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--bg-surface-solid);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.search-poster-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.search-poster-img-wrap.no-poster::before {
  content: '🎬';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  opacity: 0.3;
}
.search-poster-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   IPTV Player (canvas + overlays)
   ═══════════════════════════════════════════ */
.iptv-player-section { position: relative; height: 100%; background: #000; display: flex; flex-direction: column; }
.iptv-player-wrapper { position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; }
.iptv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.iptv-player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10;
}
.iptv-player-loading.hidden { display: none; }
.iptv-player-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.iptv-player-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  text-align: center;
  z-index: 10;
}
.iptv-player-error span { color: var(--error); font-size: 14px; }
.btn-retry {
  padding: 10px 20px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.iptv-codec-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 5;
}
.iptv-codec-badge {
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.iptv-codec-badge b { color: var(--accent); }
.iptv-tap-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.iptv-seek-ripple {
  width: 80px;
  height: 80px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  backdrop-filter: blur(8px);
}
.iptv-seek-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-surface-solid);
  border-top: 1px solid var(--border);
}
.iptv-time {
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 48px;
}
.iptv-time:last-child { text-align: right; }
.iptv-seek-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
.iptv-seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
}
.iptv-seek-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}
.iptv-player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-surface-solid);
  border-top: 1px solid var(--border);
}
.ctrl-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.ctrl-btn:hover { background: var(--accent-subtle); color: var(--accent); }
.iptv-ctrl-stop {
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: #fff;
}
.iptv-ctrl-stop:hover { background: var(--accent-hover); color: #fff; }
.iptv-ctrl-spacer { flex: 1; }
.iptv-volume-group { display: flex; align-items: center; gap: 8px; }
.iptv-volume-slider {
  width: 100px;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
.iptv-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.iptv-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}
.iptv-channel-info-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
.iptv-now-playing { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.iptv-now-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  object-fit: contain;
  background: var(--bg-surface);
  flex-shrink: 0;
}
.iptv-now-text { min-width: 0; }
.iptv-now-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.iptv-now-category { font-size: 11px; color: var(--text-tertiary); }
.iptv-live-badge {
  padding: 4px 10px;
  background: var(--error);
  color: #fff;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.iptv-tracks-panel {
  position: absolute;
  bottom: 80px;
  right: 16px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 180px;
  z-index: 20;
}
.iptv-tracks-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 10px;
}
.iptv-track-item {
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: background var(--t-fast);
}
.iptv-track-item:hover { background: var(--bg-hover); }
.iptv-track-item.active { background: var(--accent-subtle); color: var(--accent); }

/* ═══════════════════════════════════════════
   Startup loading overlay
   ═══════════════════════════════════════════ */
.m3u-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.m3u-loading-overlay.hidden { display: none; }
.m3u-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.m3u-loading-bar-track {
  width: 280px;
  height: 4px;
  background: var(--bg-surface-solid);
  border-radius: 2px;
  overflow: hidden;
}
.m3u-loading-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.m3u-loading-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.m3u-loading-sub { font-size: 13px; color: var(--text-secondary); min-height: 20px; }
.bq-wave { animation: waveShow 2s ease-in-out infinite; }
.bq-wave-1 { animation-delay: 0s; }
.bq-wave-2 { animation-delay: 0.3s; }
.bq-wave-3 { animation-delay: 0.6s; }
.bq-wave-1r { animation-delay: 0s; }
.bq-wave-2r { animation-delay: 0.3s; }
.bq-wave-3r { animation-delay: 0.6s; }
@keyframes waveShow {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.8; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Tesla first
   Model 3/Y ön ekran: 1920×1200 yatay
   Arka tablet (varsa): ~1024 dikey veya yatay
   ═══════════════════════════════════════════ */

/* ≥1400: TV / Tesla ön ekran, daha ferah */
@media (min-width: 1400px) {
  .home-brand { font-size: 56px; }
  .home-cards { grid-template-columns: repeat(4, 1fr); gap: 32px; max-width: 1320px; }
  .home-card { height: 240px; }
  .home-card-icon { width: 80px; height: 80px; }
  .col-categories { width: 320px; }
  .col-channels { width: 420px; }
  .vod-poster-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
}

/* 1024–1400: biraz sıkış */
@media (max-width: 1399px) {
  .home-cards { max-width: 1000px; }
}

/* ≤1024: tablet yatay */
@media (max-width: 1024px) {
  .col-categories { width: 260px; min-width: 220px; }
  .col-channels { width: 320px; min-width: 280px; }
  .vod-detail-left { width: 260px; min-width: 220px; padding: 16px; }
  .vod-poster-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .home-brand { font-size: 40px; }
}

/* ≤900: tablet dikey (arka koltuk) — dikey stack */
@media (max-width: 900px) {
  .content-columns {
    flex-direction: column;
  }
  .col-categories {
    width: 100%;
    min-width: 0;
    max-height: 28vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .col-channels {
    width: 100%;
    min-width: 0;
    max-height: 38vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .content-columns.vod-browse-mode .col-channels { max-height: none; flex: 1; }
  .col-player { flex: 1; min-height: 240px; }

  .home-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 600px;
  }
  .home-card { height: 160px; }
  .home-card-icon { width: 60px; height: 60px; }
  .home-card-title { font-size: 17px; }
  .home-brand { font-size: 36px; }
  .home-view { padding: 40px 24px; }

  /* VOD detail: dikey */
  .vod-detail { flex-direction: column; overflow-y: auto; }
  .vod-detail-left {
    width: 100%;
    max-width: none;
    flex-direction: row;
    padding: 16px;
    align-items: stretch;
  }
  .vod-detail-poster {
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
  }
  .vod-detail-right { order: 2; min-height: 320px; }
  .vod-detail-player { min-height: 240px; }
  .vod-seasons { max-height: 320px; }

  .favorites-view, .youtube-view { padding: 20px; }
  .favorites-title, .yt-title { font-size: 22px; }
  .yt-header::before { width: 36px; height: 36px; }
  .search-input-wrapper { padding: 14px 16px; }
  .search-input { font-size: 16px; }
  .result-thumb { width: 100px; height: 58px; }
  .player-controls { flex-wrap: wrap; gap: 8px; }
  .ctrl-progress-wrapper { order: 5; flex-basis: 100%; }

  .search-overlay { padding: 20px 14px; }
  .search-overlay-input { font-size: 16px; }
}

/* ≤600: telefon fallback */
@media (max-width: 600px) {
  :root { --toolbar-width: 44px; }
  .toolbar-btn { width: 36px; height: 36px; }
  .toolbar-brand { width: 30px; height: 30px; font-size: 13px; }

  .home-cards { grid-template-columns: 1fr; max-width: 320px; }
  .home-card { height: 130px; flex-direction: row; gap: 16px; padding: 0 20px; justify-content: flex-start; }
  .home-card-icon { width: 50px; height: 50px; }

  .vod-poster-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; padding: 10px; }
  .vod-poster-title { font-size: 11px; }

  .col-categories { max-height: 24vh; }
  .col-channels { max-height: 36vh; }

  .vod-detail-left {
    flex-direction: column;
    align-items: center;
  }
  .vod-detail-poster { width: 160px; }

  .search-overlay { padding: 14px 10px; }
  .search-overlay-input { font-size: 15px; }
  .search-overlay-input-wrap { padding: 12px 14px; }
  .search-poster-view { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
}
