/* The public website: live streams, videos, matches and channels. */
:root { --bg: #0f0f0f; --panel: #1b1b1b; --panel2: #272727; --line: #303030; --text: #f1f1f1; --dim: #aaa; --live: #ff3b3b; --accent: #00ff82; --radius: 12px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: var(--text); background: var(--panel2); border: 0; border-radius: 18px; padding: 8px 16px; cursor: pointer; }
button:hover { background: #3a3a3a; }
button.primary { background: var(--text); color: #0f0f0f; font-weight: 600; }
button.primary.on { background: var(--panel2); color: var(--text); }
.icon { background: none; font-size: 20px; padding: 6px 10px; border-radius: 50%; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand img { height: 30px; }
.search { flex: 1; max-width: 620px; margin: 0 auto; display: flex; }
.search input { flex: 1; min-width: 0; background: #121212; border: 1px solid var(--line); border-right: 0; border-radius: 20px 0 0 20px; color: var(--text); padding: 9px 16px; font: inherit; }
.search button { border-radius: 0 20px 20px 0; border: 1px solid var(--line); background: var(--panel2); padding: 8px 18px; }
.me { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.me .studio { border: 1px solid var(--line); background: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--panel2); display: inline-grid; place-items: center; font-weight: 700; color: var(--dim); flex: none; }

/* layout */
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.side { position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; padding: 8px 10px 20px; }
.side a { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 10px; }
.side a:hover { background: var(--panel); }
.side a.on { background: var(--panel2); font-weight: 600; }
.side h4 { margin: 16px 12px 6px; font-size: 14px; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 4px; }
.side .chip-logo { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--panel2); flex: none; }
.side .studio-link { color: var(--accent); }
main { padding: 8px 24px 40px; min-width: 0; }
.loading, .empty { color: var(--dim); padding: 40px 0; text-align: center; }
h2.sec { font-size: 20px; margin: 22px 0 12px; display: flex; align-items: center; gap: 10px; }
h2.sec .count { color: var(--dim); font-weight: 400; font-size: 14px; }

/* video cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px 16px; }
.card { display: block; min-width: 0; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #222 center / cover no-repeat; }
.thumb .logo { position: absolute; inset: 0; margin: auto; max-width: 42%; max-height: 52%; object-fit: contain; filter: drop-shadow(0 4px 16px rgba(0,0,0,.6)); }
.badge { position: absolute; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.8); }
.badge.live { left: 8px; top: 8px; background: var(--live); letter-spacing: .05em; }
.badge.dur { right: 8px; bottom: 8px; }
.badge.when { left: 8px; bottom: 8px; background: rgba(0,0,0,.75); }
.badge.price { right: 8px; top: 8px; background: #ffd34d; color: #111; }
.meta { display: flex; gap: 12px; padding-top: 10px; }
.meta .chlogo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--panel2); flex: none; display: inline-grid; place-items: center; font-weight: 700; color: var(--dim); }
.thumb-name { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-size: 22px; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.meta b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.3; }
.meta .sub { color: var(--dim); font-size: 13px; margin-top: 3px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 8px; }
.hero .thumb { border-radius: 16px; }
.hero h3 { font-size: 24px; margin: 0 0 8px; }
.hero .sub { color: var(--dim); }

/* matches */
.matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.match { background: var(--panel); border-radius: var(--radius); padding: 12px 14px; }
.match .top-line { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; margin-bottom: 8px; gap: 8px; }
.match .top-line .status-live { color: var(--live); font-weight: 700; }
.match .row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.match .row img, .match .row .ph { width: 26px; height: 26px; object-fit: contain; flex: none; }
.match .row .ph { border-radius: 50%; }
.match .row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.match .score { font-size: 18px; font-weight: 700; text-align: right; margin-top: 4px; }
.match .foot { color: var(--dim); font-size: 12px; margin-top: 6px; }

/* channels */
.chans { display: flex; gap: 22px; overflow-x: auto; padding-bottom: 6px; }
.chan { width: 110px; text-align: center; flex: none; }
.chan img, .chan .ph { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--panel2); display: grid; place-items: center; margin: 0 auto 8px; font-size: 34px; font-weight: 800; }
.chan b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan .sub { color: var(--dim); font-size: 12px; }

/* a channel's page */
.banner { height: 180px; border-radius: 16px; background: #222 center / cover no-repeat; margin-top: 8px; }
.chead { display: flex; align-items: center; gap: 22px; padding: 18px 0 8px; flex-wrap: wrap; }
.chead .big { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--panel2); border: 4px solid var(--bg); }
.chead h1 { margin: 0; font-size: 30px; }
.chead .sub { color: var(--dim); margin-top: 4px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; }
.tabs a { padding: 10px 2px; color: var(--dim); font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--text); border-color: var(--text); }
.about { white-space: pre-wrap; color: var(--dim); max-width: 760px; }
.signin-box { text-align: center; padding: 50px 20px; color: var(--dim); }
.signin-box button { margin-top: 12px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 20; left: 0; top: 58px; width: 250px; background: var(--bg); transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.6); }
  body.side-open .side { transform: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  main { padding: 8px 14px 40px; }
  .search { display: none; }
  .brand span { display: none; }
  .me { margin-left: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (min-width: 901px) { .menu { display: none; } }
