/* ===== Maçları TV'den İzle — minimal, webOS için hafif ===== */
:root {
  --bg: #0d1117;
  --card: #161b22;
  --card-focus: #1f2733;
  --line: #283041;
  --text: #e9eef5;
  --muted: #8b95a7;
  --accent: #e8b53a;   /* tek, sade altın vurgu */
  --live: #ff5a72;
  --hd: #4ad27e;
  --score: #ffd36a;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);             /* düz renk — gradient yok (TV'de hızlı) */
  color: var(--text);
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  overflow: hidden;
  padding: 3vh 3vw;
  -webkit-font-smoothing: antialiased;
}

/* ===== Üst bar ===== */
.topbar { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.brand { font-size: 28px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.brand b { color: var(--accent); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; font-size: 18px;
  color: #14100a; background: var(--accent);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.status { font-size: 20px; color: var(--muted); }
.status.error { color: var(--live); }
.live-count { font-size: 19px; font-weight: 600; color: var(--live); }
.live-count:empty { display: none; }

/* ===== Görünümler ===== */
.view { display: none; }
.view.visible { display: block; }

/* ===== Spor sekmeleri ===== */
.tabs { display: flex; gap: 12px; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  font-size: 21px; padding: 11px 20px; border-radius: 10px;
  background: transparent; color: var(--muted);
  border: 2px solid var(--line); cursor: pointer; white-space: nowrap;
}
.tab .tab-ic { font-size: 22px; }
.tab .tab-count { font-size: 17px; color: var(--muted); }
.tab.active { color: var(--text); border-color: var(--accent); }
.tab.active .tab-count { color: var(--accent); }

/* ===== Maç ızgarası ===== */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px; max-height: calc(100vh - 210px); overflow-y: auto; padding: 2px 2px 24px;
}
.card {
  text-align: left; cursor: pointer; color: var(--text);
  background: var(--card); border: 2px solid var(--line); border-radius: 12px;
  padding: 16px 20px; display: flex; flex-direction: column; gap: 10px;
}
.card-top { display: flex; align-items: center; gap: 10px; }
.card-tour {
  flex: 1; min-width: 0; font-size: 18px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-tags { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.live { font-size: 14px; font-weight: 800; letter-spacing: 1px; color: var(--live); }
.hd-badge { font-size: 14px; font-weight: 800; letter-spacing: .5px; color: var(--hd); }
.row { display: flex; align-items: center; gap: 14px; }
.tname { flex: 1; min-width: 0; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tscore { font-size: 26px; font-weight: 700; color: var(--score); min-width: 38px; text-align: right; }

/* ===== Odak (D-pad) — sadece kenarlık+zemin; transform/gölge YOK (kasma yok) ===== */
.focusable:focus { outline: none; }
.card.focused, .tab.focused, .ctrl.focused, .qitem.focused {
  border-color: var(--accent);
  background: var(--card-focus);
}
.tab.focused { color: var(--text); }

.grid::-webkit-scrollbar { width: 8px; }
.grid::-webkit-scrollbar-thumb { background: #2a3346; border-radius: 4px; }

/* ===== Oynatıcı (tam ekran) ===== */
#player-view.visible {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; background: #000;
}
.player-stage { position: relative; flex: 1; background: #000; overflow: hidden; }
#video, #frame { width: 100vw; height: 100vh; background: #000; border: 0; }
#frame { display: none; }

.player-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 20px; padding: 4vh 44px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,.7), transparent);
  pointer-events: none;
}
#player-title { font-size: 28px; font-weight: 700; }
.player-hint { margin-left: auto; font-size: 18px; color: #c4ccda; }

.player-msg {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--text); background: rgba(0,0,0,.55); text-align: center; padding: 24px;
}
.player-msg:empty { display: none; }
.player-msg.error { color: var(--live); }

/* ===== Kontrol çubuğu ===== */
.controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  padding: 26px 24px 7vh;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.controls.show { opacity: 1; pointer-events: auto; }
.ctrl {
  font-size: 22px; font-weight: 600; padding: 13px 26px; border-radius: 12px;
  background: rgba(22,27,34,.96); color: var(--text); border: 2px solid var(--line); cursor: pointer; white-space: nowrap;
}
.quality-menu {
  position: absolute; left: 50%; bottom: 124px; transform: translateX(-50%); z-index: 6;
  display: none; flex-direction: column; gap: 8px;
  background: rgba(13,17,23,.98); padding: 12px; border-radius: 14px;
  min-width: 230px; max-height: 60vh; overflow-y: auto; border: 2px solid var(--line);
}
.quality-menu.show { display: flex; }
.qitem { font-size: 21px; padding: 12px 20px; border-radius: 10px; background: var(--card); color: var(--text); border: 2px solid transparent; cursor: pointer; text-align: center; }
.qitem.active { color: var(--accent); font-weight: 800; }
