/* KR/EN/JP: 호바라 TV - 대시보드와 같은 네이비/시안 / navy-cyan like the dashboard / ダッシュボードと同じ配色 */
:root { --bg:#0b1426; --card:#13213d; --line:#22355c; --fg:#e8eefc; --dim:#9fb0d0; --accent:#29c5f6; --live:#ff3b5c; --ok:#3ddc97; }
@media (prefers-color-scheme: light) {
  :root { --bg:#f3f6fb; --card:#ffffff; --line:#d7e0ef; --fg:#14213d; --dim:#5b6b8a; --accent:#0a8fc2; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Hiragino Sans", sans-serif; }
button { font: inherit; cursor: pointer; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }

.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 17px; }
.out { margin-left: auto; }
.out button { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 8px; padding: 4px 10px; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--line); color: var(--dim); }
.badge.live { background: var(--live); color: #fff; animation: pulse 1.4s infinite; }
.badge.soon { background: var(--accent); color: #fff; }
@keyframes pulse { 50% { opacity: .6; } }

main { max-width: 1100px; margin: 0 auto; padding: 12px 16px 40px; display: grid; gap: 12px; }
.match { padding: 12px 16px; }
.line1 { color: var(--dim); font-size: 13px; }
.line2 { font-size: 14px; margin-top: 2px; }
.line2 b { color: var(--accent); }
.teams { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 17px; font-weight: 700; margin-top: 6px; }
.vs { color: var(--dim); font-weight: 400; font-size: 13px; }
.score { font-size: 22px; font-weight: 800; letter-spacing: .5px; margin-top: 4px; }
.score:empty { display: none; }
.when { color: var(--dim); font-size: 13px; margin-top: 4px; }

.player { position: relative; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player iframe.yt { width: 100%; height: 100%; display: block; border: 0; }
.player video[hidden] { display: none; }
/* KR: 전체 화면 - 진짜 전체 화면이 안 되는 아이폰은 화면을 꽉 채우는 방식(가로로 돌리면 꽉 찬다) / EN: fullscreen; iPhone
   gets a fill-the-viewport fallback / JP: 全画面。iPhone は画面いっぱい表示で代替 */
.fsrow { margin: 10px 0 0; }
.fsbtn { display: block; width: 100%; border: 0; border-radius: 10px; padding: 12px; background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 700; }
.fsclose { display: none; }
body.full { overflow: hidden; }
body.full .player { position: fixed; inset: 0; z-index: 50; width: 100vw; height: 100vh; height: 100dvh;
  aspect-ratio: auto; border: 0; border-radius: 0; }
body.full .fsclose, .player:fullscreen .fsclose { display: block; position: absolute; right: 12px; top: 12px; z-index: 3;
  border: 0; border-radius: 8px; padding: 6px 12px; background: rgba(0,0,0,.7); color: #fff; }
.player:fullscreen { aspect-ratio: auto; border-radius: 0; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  color: #cfd8ea; background: rgba(0,0,0,.6); font-size: 15px; }
.overlay[hidden] { display: none; }
.unmute { position: absolute; left: 12px; top: 12px; border: 0; border-radius: 8px; padding: 6px 12px;
  background: rgba(0,0,0,.7); color: #fff; }

.note { margin: 0; color: var(--dim); font-size: 13px; word-break: break-all; }
.warn { margin: 0; color: #ffb020; font-size: 13px; }
.manual { padding: 10px 16px; }
.manual summary { cursor: pointer; font-weight: 600; }
.hint { color: var(--dim); font-size: 13px; }
.streams { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.streams button { width: 100%; text-align: left; background: var(--bg); color: var(--fg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.row { display: flex; gap: 8px; margin: 8px 0; }
.row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; }
.row button, .login button { border: 0; border-radius: 8px; padding: 8px 14px; background: var(--accent); color: #fff; font-weight: 600; }
.ghost { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 8px; padding: 6px 12px; }

body.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 340px; padding: 24px; display: grid; gap: 10px; }
.login h1 { margin: 0 0 6px; font-size: 20px; }
.login input { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.err { margin: 0; color: var(--live); font-size: 13px; }
