/* ==========================================================
   IPTV Player Pro — Tasarım Sistemi
   ========================================================== */
:root {
  --bg: #0b0f1a;
  --bg2: #0e1422;
  --surface: #141b2d;
  --surface2: #1a2338;
  --glass: rgba(22, 30, 48, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf4;
  --muted: #8b96ab;
  --accent: #8b5cf6;
  --accent2: #db2777;
  --accent-grad: linear-gradient(135deg, #7c3aed, #db2777);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --sidebar-w: 240px;
  --topbar-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
svg { fill: currentColor; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ---------- Glass / genel ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-size: 15px; font-weight: 600;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35); }
.btn.primary:hover { opacity: 0.92; }
.btn.ghost { background: rgba(255,255,255,0.07); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: rgba(255,255,255,0.12); }
.btn.danger { background: rgba(248,113,113,0.15); color: var(--err); border: 1px solid rgba(248,113,113,0.3); }
.btn.full { width: 100%; }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--text);
  background: rgba(255,255,255,0.06); border: 1px solid transparent;
  transition: background .15s ease, transform .1s ease;
}
.icon-btn:hover { background: rgba(255,255,255,0.13); }
.icon-btn:active { transform: scale(0.93); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- Formlar ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.2px; }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 15px; font-size: 15px; color: var(--text);
  transition: border .15s ease, background .15s ease; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: rgba(139, 92, 246, 0.08); outline: none;
}
.field input::placeholder { color: #5b6478; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- AUTH ---------- */
.auth-screen, .onboard-screen {
  position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
}
.auth-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 600px at 15% 10%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(900px 550px at 85% 90%, rgba(219, 39, 119, 0.22), transparent 60%),
    radial-gradient(700px 500px at 60% 30%, rgba(59, 130, 246, 0.12), transparent 65%),
    var(--bg);
}
.auth-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px; opacity: 0.5;
}
.auth-card {
  width: 100%; max-width: 440px; padding: 36px 34px; margin: 30px 0;
}
.auth-card.wide { max-width: 560px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo h1 { font-size: 26px; margin-top: 12px; letter-spacing: -0.4px; }
.auth-logo h1 span {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-logo p { margin-top: 6px; font-size: 14px; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px;
  background: rgba(255,255,255,0.05); border-radius: 12px; margin-bottom: 22px;
}
.auth-tab {
  padding: 11px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted);
  transition: all .18s ease;
}
.auth-tab.active { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 18px rgba(124,58,237,0.35); }
.auth-foot { text-align: center; font-size: 12.5px; margin-top: 18px; line-height: 1.55; }
.test-result { margin-top: 12px; font-size: 13.5px; line-height: 1.5; }
.test-result.ok { color: var(--ok); }
.test-result.err { color: var(--err); }
.test-result .kv { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--border); }

/* ---------- APP layout ---------- */
.app-screen { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px;
}
.side-logo { display: flex; align-items: center; gap: 11px; padding: 6px 10px 22px; font-size: 17px; }
.side-logo b {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.side-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px;
  color: var(--muted); font-size: 14.5px; font-weight: 600; transition: all .16s ease;
}
.side-nav a svg { width: 21px; height: 21px; }
.side-nav a:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.side-nav a.active { background: rgba(139, 92, 246, 0.16); color: #c4b5fd; }
.side-foot { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.side-account { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.side-account-info { display: flex; flex-direction: column; overflow: hidden; }
.side-account-info b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-account-info span { font-size: 11.5px; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
  flex-shrink: 0;
}
.avatar.small { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; gap: 16px;
  padding: 0 26px; position: sticky; top: 0; z-index: 30;
  background: rgba(11, 15, 26, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar h2 { font-size: 20px; letter-spacing: -0.3px; flex-shrink: 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search-box {
  display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); border-radius: 12px; padding: 9px 14px; width: 300px;
}
.search-box svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search-box input { background: none; border: none; outline: none; color: var(--text); font-size: 14px; width: 100%; }
.content { padding: 26px; flex: 1; }

/* ---------- Alt navigasyon (mobil) ---------- */
.bottom-nav { display: none; }
.only-mobile { display: none; }

/* ---------- Bölümler / başlıklar ---------- */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 16px;
}
.section-head h3 { font-size: 17px; letter-spacing: -0.2px; }
.section-head .link { color: var(--accent); font-size: 13.5px; font-weight: 600; cursor: pointer; }

/* ---------- Kart satırları (yatay kaydırmalı) ---------- */
.hscroll {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x proximity;
}
.hscroll::-webkit-scrollbar { height: 6px; }
.hscroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* ---------- Poster kartları ---------- */
.poster-card {
  width: 158px; cursor: pointer; position: relative;
  transition: transform .18s ease;
}
.poster-card:hover { transform: translateY(-4px); }
.poster-card .poster {
  width: 100%; aspect-ratio: 2/3; border-radius: 12px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); position: relative;
}
.poster-card .poster img, .poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.poster-card .play-bubble {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); opacity: 0; transition: opacity .18s ease;
}
.poster-card:hover .play-bubble { opacity: 1; }
.play-bubble .circle {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.5);
}
.play-bubble .circle svg { width: 22px; height: 22px; fill: #fff; }
.poster-card h4 {
  margin-top: 9px; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.poster-card .sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; }
.rating-badge {
  position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.65);
  border: 1px solid var(--border); border-radius: 8px; padding: 3px 8px; font-size: 11.5px;
  font-weight: 700; color: var(--warn);
}
.progress-bar-mini {
  position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px;
  background: rgba(255,255,255,0.25); border-radius: 4px; overflow: hidden;
}
.progress-bar-mini i { display: block; height: 100%; background: var(--accent-grad); border-radius: 4px; }

/* ---------- Kanal satırları (Canlı TV) ---------- */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.channel-item {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px;
  cursor: pointer; transition: all .16s ease; min-width: 0;
}
.channel-item:hover { background: var(--surface2); border-color: var(--border-strong); transform: translateY(-2px); }
.channel-item .logo-box {
  width: 52px; height: 52px; border-radius: 11px; background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border);
}
.channel-item .logo-box img { max-width: 78%; max-height: 78%; object-fit: contain; }
.channel-item .ch-text { min-width: 0; flex: 1; }
.channel-item .ch-text h4 {
  font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.channel-item .ch-text p {
  font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-dot {
  display: inline-flex; align-items: center; gap: 5px; color: var(--err);
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px;
}
.live-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--err);
  box-shadow: 0 0 8px var(--err); animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }
.fav-btn { color: var(--muted); flex-shrink: 0; }
.fav-btn.active { color: var(--accent2); }

/* ---------- Katalog düzeni (kategori + ızgara) ---------- */
.catalog-layout { display: flex; gap: 22px; align-items: flex-start; }
.cat-panel {
  width: 235px; flex-shrink: 0; position: sticky; top: calc(var(--topbar-h) + 18px);
  max-height: calc(100vh - var(--topbar-h) - 50px); display: flex; flex-direction: column;
}
.cat-search {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 11px;
  padding: 10px 13px; color: var(--text); font-size: 13.5px; margin-bottom: 10px; width: 100%;
  outline: none;
}
.cat-list { overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-right: 5px; }
.cat-item {
  padding: 11px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; transition: all .14s ease; white-space: nowrap; overflow: hidden;
}
.cat-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.cat-item.active { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
.cat-item .count {
  font-size: 11px; background: rgba(255,255,255,0.08); padding: 2px 8px; border-radius: 20px;
}
.catalog-main { flex: 1; min-width: 0; }
.catalog-toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.catalog-toolbar .search-box { width: min(360px, 100%); }
.result-count { font-size: 13px; color: var(--muted); margin-left: auto; }
.grid-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 18px 15px;
}

/* ---------- Detay görünümü ---------- */
.detail-hero {
  position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 26px;
  background: var(--surface);
}
.detail-hero .backdrop {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(2px) brightness(0.32); transform: scale(1.05);
}
.detail-hero .backdrop-fallback {
  position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 20% 20%, rgba(124,58,237,0.35), transparent 60%),
              radial-gradient(700px 400px at 80% 80%, rgba(219,39,119,0.28), transparent 60%),
              var(--surface2);
}
.detail-hero .hero-inner {
  position: relative; display: flex; gap: 28px; padding: 34px; align-items: flex-end;
}
.detail-hero .hero-poster {
  width: 210px; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); background: var(--surface2);
}
.detail-hero .hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .hero-info { flex: 1; min-width: 0; padding-bottom: 6px; }
.detail-hero h1 { font-size: 30px; letter-spacing: -0.5px; line-height: 1.15; }
.meta-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 13px 0; align-items: center; }
.chip {
  padding: 5px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
}
.chip.star { color: var(--warn); }
.detail-plot {
  color: #c3cbd9; font-size: 14.5px; line-height: 1.65; max-width: 720px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.detail-plot.open { display: block; }
.detail-actions { display: flex; gap: 11px; margin-top: 20px; flex-wrap: wrap; }
.detail-cast { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.detail-cast b { color: var(--text); font-weight: 600; }

/* ---------- Bölümler / sezonlar ---------- */
.season-tabs { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; }
.season-tab {
  padding: 9px 18px; border-radius: 11px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.season-tab.active { background: var(--accent-grad); color: #fff; border-color: transparent; }
.episode-list { display: flex; flex-direction: column; gap: 11px; }
.episode-item {
  display: flex; gap: 15px; padding: 13px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; transition: all .16s ease;
}
.episode-item:hover { background: var(--surface2); border-color: var(--border-strong); }
.episode-item .ep-thumb {
  width: 148px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; flex-shrink: 0;
  background: var(--surface2); position: relative;
}
.episode-item .ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode-item .ep-thumb .ep-num {
  position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,0.6);
  padding: 3px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 700;
}
.episode-item .ep-body { flex: 1; min-width: 0; }
.episode-item h4 { font-size: 14.5px; font-weight: 600; }
.episode-item p {
  font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.episode-item .ep-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ---------- Ana sayfa ---------- */
.hero-banner {
  border-radius: 18px; padding: 38px 36px; margin-bottom: 30px; position: relative; overflow: hidden;
  background:
    radial-gradient(600px 300px at 85% 20%, rgba(219,39,119,0.35), transparent 60%),
    radial-gradient(700px 350px at 10% 90%, rgba(124,58,237,0.4), transparent 60%),
    linear-gradient(120deg, #172033, #121828);
  border: 1px solid var(--border);
}
.hero-banner h1 { font-size: 30px; letter-spacing: -0.5px; line-height: 1.2; max-width: 560px; }
.hero-banner p { margin-top: 11px; color: #b9c2d4; font-size: 15px; max-width: 520px; line-height: 1.6; }
.hero-banner .hero-actions { display: flex; gap: 11px; margin-top: 22px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats .stat b { font-size: 22px; display: block; }
.hero-stats .stat span { font-size: 12px; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 15px; margin-bottom: 30px; }
.quick-card {
  border-radius: 15px; padding: 21px; cursor: pointer; border: 1px solid var(--border);
  transition: transform .16s ease, border .16s ease; position: relative; overflow: hidden;
}
.quick-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.quick-card .q-icon {
  width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 13px;
}
.quick-card .q-icon svg { width: 23px; height: 23px; }
.quick-card h4 { font-size: 15.5px; }
.quick-card p { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.account-card {
  border-radius: 15px; border: 1px solid var(--border); background: var(--surface);
  padding: 20px; display: flex; gap: 15px; align-items: center;
}
.account-card .acc-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0;
}
.account-card .acc-info { flex: 1; min-width: 0; }
.account-card h4 { font-size: 15px; }
.account-card p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.exp-badge {
  padding: 5px 12px; border-radius: 20px; font-size: 11.5px; font-weight: 700;
  background: rgba(52, 211, 153, 0.14); color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.3);
}
.exp-badge.warn { background: rgba(251, 191, 36, 0.13); color: var(--warn); border-color: rgba(251, 191, 36, 0.3); }
.exp-badge.err { background: rgba(248, 113, 113, 0.13); color: var(--err); border-color: rgba(248, 113, 113, 0.3); }

/* ---------- Boş durumlar & iskelet ---------- */
.empty-state {
  text-align: center; padding: 70px 20px; color: var(--muted);
}
.empty-state svg { width: 64px; height: 64px; opacity: 0.35; margin-bottom: 15px; }
.empty-state h3 { color: var(--text); font-size: 17px; margin-bottom: 7px; }
.empty-state p { font-size: 14px; max-width: 380px; margin: 0 auto 18px; line-height: 1.6; }
.skeleton {
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface2) 50%, var(--surface) 60%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.load-more { display: flex; justify-content: center; padding: 24px 0; }

/* ---------- Ayarlar ---------- */
.settings-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.settings-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px;
}
.settings-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.settings-card > p.desc { font-size: 12.5px; color: var(--muted); margin-bottom: 17px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-row .s-label b { display: block; font-size: 13.5px; font-weight: 600; }
.setting-row .s-label span { font-size: 12px; color: var(--muted); }
.setting-row select, .setting-row input[type="text"], .setting-row input[type="password"] {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; color: var(--text); font-size: 13.5px; min-width: 130px; outline: none;
}
.switch { position: relative; width: 48px; height: 27px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 20px; background: rgba(255,255,255,0.14);
  transition: background .18s ease; cursor: pointer;
}
.switch .slider::before {
  content: ""; position: absolute; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform .18s ease;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(21px); }

/* ---------- Toast ---------- */
.toast-root {
  position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex;
  flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 40px));
}
.toast {
  padding: 14px 17px; border-radius: 13px; background: var(--glass); border: 1px solid var(--border);
  backdrop-filter: blur(16px); box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.5;
  display: flex; gap: 11px; align-items: flex-start;
  animation: slideIn .25s ease;
}
.toast.ok { border-color: rgba(52, 211, 153, 0.35); }
.toast.err { border-color: rgba(248, 113, 113, 0.4); }
.toast .t-icon { flex-shrink: 0; margin-top: 1px; }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 12, 0.72); backdrop-filter: blur(6px); }
.modal-box {
  position: relative; width: 100%; max-width: 480px; max-height: 86vh; overflow-y: auto; padding: 26px;
}
.modal-box h3 { font-size: 18px; margin-bottom: 12px; }
.modal-box .modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* ==========================================================
   PLAYER
   ========================================================== */
.player-overlay {
  position: fixed; inset: 0; z-index: 150; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.player-overlay video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000;
}
.player-overlay video.fill { object-fit: cover; }
.player-overlay video.a169 { object-fit: fill; }

.player-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.player-center > * { pointer-events: auto; }
.player-spinner { pointer-events: none !important; }
.spinner {
  width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.18); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.big-play {
  width: 86px; height: 86px; border-radius: 50%; background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
.big-play:hover { background: rgba(255,255,255,0.22); transform: scale(1.05); }
.big-play svg { width: 40px; height: 40px; fill: #fff; margin-left: 5px; }

.player-error, .resume-card {
  background: rgba(15, 20, 33, 0.92); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 30px 34px; text-align: center; max-width: 440px;
}
.player-error h3, .resume-card h3 { margin: 12px 0 8px; font-size: 18px; }
.player-error p, .resume-card p { font-size: 14px; line-height: 1.55; margin-bottom: 20px; }

.player-chrome {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,0.65) 0%, transparent 22%, transparent 62%, rgba(0,0,0,0.82) 100%);
  transition: opacity .25s ease; z-index: 5;
}
.player-chrome.chrome-hidden { opacity: 0; pointer-events: none; }

.player-top { display: flex; align-items: center; gap: 14px; padding: 20px 24px; }
.player-title-box { flex: 1; min-width: 0; }
.player-title-box h3 {
  font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.player-title-box p { font-size: 13px; margin-top: 2px; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.player-top .icon-btn { background: rgba(255,255,255,0.1); }

.player-bottom { padding: 0 24px 22px; }
.player-episodes {
  display: flex; gap: 10px; overflow-x: auto; padding: 10px 0 14px;
}
.player-episodes .ep-chip {
  flex-shrink: 0; padding: 9px 15px; border-radius: 11px; background: rgba(255,255,255,0.1);
  border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.player-episodes .ep-chip.active { background: var(--accent-grad); border-color: transparent; }

.seek-row { display: flex; align-items: center; gap: 13px; }
.time { font-size: 12.5px; font-variant-numeric: tabular-nums; color: #d7dce6; min-width: 44px; text-align: center; }
.seekbar {
  flex: 1; height: 22px; display: flex; align-items: center; position: relative; cursor: pointer;
}
.seekbar .seek-buffered {
  position: absolute; height: 5px; background: rgba(255,255,255,0.22); border-radius: 4px; width: 0;
}
.seekbar .seek-played {
  position: absolute; height: 5px; background: var(--accent-grad); border-radius: 4px; width: 0;
}
.seekbar .seek-thumb {
  position: absolute; right: -7px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5); opacity: 0; transition: opacity .15s ease;
}
.seekbar:hover .seek-thumb { opacity: 1; }
.seekbar:hover .seek-played, .seekbar:hover .seek-buffered { height: 7px; }
.seek-tooltip {
  position: absolute; bottom: 26px; transform: translateX(-50%);
  background: rgba(10, 14, 24, 0.95); padding: 5px 11px; border-radius: 8px;
  font-size: 12px; pointer-events: none; border: 1px solid var(--border);
}

.control-row { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.control-row .icon-btn { background: rgba(255,255,255,0.08); }
.control-row .icon-btn:hover { background: rgba(255,255,255,0.16); }
.control-spacer { flex: 1; }
.volume-box { display: flex; align-items: center; gap: 7px; }
.volume-slider { width: 82px; accent-color: var(--accent); cursor: pointer; }
.speed-label { font-size: 13px; font-weight: 800; letter-spacing: 0.3px; }
.ctrl-pill {
  padding: 8px 15px; border-radius: 10px; background: rgba(255,255,255,0.1);
  border: 1px solid var(--border); font-size: 12.5px; font-weight: 700; transition: background .15s;
}
.ctrl-pill:hover { background: rgba(255,255,255,0.2); }

/* Player menüleri */
.player-menu {
  position: absolute; bottom: 96px; right: 26px; z-index: 20;
  background: rgba(13, 18, 31, 0.96); border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 9px; min-width: 210px; max-height: 46vh; overflow-y: auto;
  box-shadow: var(--shadow);
}
.player-menu .menu-title {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--muted); padding: 8px 12px 9px;
}
.player-menu .menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px; border-radius: 10px; font-size: 13.5px; cursor: pointer; color: var(--text);
}
.player-menu .menu-item:hover { background: rgba(255,255,255,0.08); }
.player-menu .menu-item.active { color: #c4b5fd; background: rgba(139, 92, 246, 0.15); }
.player-menu .menu-item .check { width: 16px; height: 16px; opacity: 0.8; }
.menu-info-body { padding: 6px 12px 12px; font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.menu-info-body b { color: var(--text); }

/* Altyazı stilleri */
video::cue {
  background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 1.05em;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1100px) {
  .catalog-layout { flex-direction: column; }
  .cat-panel {
    width: 100%; position: static; max-height: none; flex-direction: row; gap: 10px;
  }
  .cat-search { width: 220px; margin-bottom: 0; flex-shrink: 0; }
  .cat-list { flex-direction: row; overflow-x: auto; padding: 2px; }
  .cat-item { flex-shrink: 0; }
}

@media (max-width: 860px) {
  :root { --topbar-h: 60px; }
  .only-mobile { display: inline-flex; }
  .only-desktop { display: none !important; }
  .sidebar {
    transform: translateX(-100%); transition: transform .22s ease; z-index: 60;
    box-shadow: 30px 0 60px rgba(0,0,0,0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content { padding: 16px 14px 90px; }
  .topbar { padding: 0 14px; }
  .topbar h2 { display: none; }
  .search-box { width: 100%; }
  .topbar-actions { flex: 1; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(11, 15, 26, 0.94); backdrop-filter: blur(16px);
    border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: 10.5px; color: var(--muted); padding: 5px 0; border-radius: 10px; font-weight: 600;
  }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: #c4b5fd; }
  .poster-card { width: 128px; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px 11px; }
  .detail-hero .hero-inner { flex-direction: column; align-items: flex-start; padding: 22px; gap: 18px; }
  .detail-hero .hero-poster { width: 150px; }
  .detail-hero h1 { font-size: 22px; }
  .hero-banner { padding: 26px 20px; }
  .hero-banner h1 { font-size: 23px; }
  .episode-item .ep-thumb { width: 110px; }
  .channel-grid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px; }
  .volume-slider { display: none; }
  .player-menu { right: 12px; left: 12px; bottom: 88px; }
  .player-top { padding: 14px 14px; }
  .player-bottom { padding: 0 14px 16px; }
  .player-title-box h3 { font-size: 15px; }
  .toast-root { right: 12px; left: 12px; bottom: 84px; max-width: none; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 16px; }
  .hero-stats .stat b { font-size: 18px; }
  .poster-card { width: 112px; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}

/* TV / büyük ekran ok tuşu odağı */
.tv-focus {
  outline: 3px solid var(--accent) !important; outline-offset: 3px;
  border-radius: 12px; transform: scale(1.04);
}

/* PWA standalone */
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); }
}
