/* doink! vods stylesheet.
   The base theme block (palette, font, reset, header, footer) is copied from
   products/emotes/public/assets/style.css — extraction candidate for shared/
   once a third product needs it. Keep the two in sync by hand until then.
   Theme rules: no transitions/animations, no rounded corners. */

/* ------------------------- base theme (shared) ------------------------- */
:root {
  color-scheme: dark;
  --bg: #140826;
  --panel: #1e0f38;
  --panel-2: #2a164e;
  --border: #3d2566;
  --text: #f1eaff;
  --muted: #a893cc;
  --accent: #9c6acd;
  --accent-2: #7a3fbf;
  --green: #16c7ac;
  --gold: #b5b558;
  --red: #f87171;
  --twitch: #9146FF;
  --check-a: #251345;
  --check-b: #1b0d33;
}
::selection { background: var(--accent-2); color: #fff; }
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/nunito-latin.woff2) format("woff2");
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: radial-gradient(900px 420px at 50% -140px, #2a1450, var(--bg) 70%) no-repeat, var(--bg);
  color: var(--text);
  font-family: "Nunito", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}
header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex-wrap: wrap;
}
.logo { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 10px; }
.logo::before {
  content: ""; width: 45px; height: 30px; flex: none;
  background: url(/assets/goblin.png) center / contain no-repeat;
}
.logo h1 { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.logo h1 .logo-product {
  color: var(--green);
  border: 1px solid var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 7px;
  margin-left: 9px;
  display: inline-block;
  transform: rotate(-4deg);
  vertical-align: 4px;
}
#authArea { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auth-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 13px; font-weight: 700;
  text-decoration: none; color: #fff; border: 0; cursor: pointer;
}
.auth-twitch { background: var(--twitch); }
.whoami { font-size: 13px; }
.whoami b { color: var(--accent); }
.logout-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  padding: 7px 12px; font-size: 12px; cursor: pointer;
}
.mini-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  padding: 5px 10px; font-size: 12px; cursor: pointer; text-decoration: none;
}
.mini-btn:hover { color: var(--text); border-color: var(--accent); }
.mini-btn.danger:hover { color: var(--red); border-color: var(--red); }
.mini-btn:disabled { opacity: 0.6; cursor: default; }
main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
.site-footer {
  position: sticky;
  top: 100vh;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.footer-msg { font-weight: 600; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--text); }
.page-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 18px; }
.page-head span { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); font-size: 14px; padding: 40px; text-align: center; grid-column: 1 / -1; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, monospace; font-size: 0.92em; color: var(--accent); }

/* ------------------------------- landing ------------------------------- */
.landing { padding: 40px 0; max-width: 560px; }
.landing h2 { font-size: 20px; margin-bottom: 12px; }
.landing p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------------------------- channel page ----------------------------- */
.vod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vod-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--border);
  overflow: hidden;
}
.vod-card:hover { border-color: var(--accent); }
.vod-thumb {
  aspect-ratio: 16 / 9; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: repeating-conic-gradient(var(--check-a) 0% 25%, var(--check-b) 0% 50%) 0 0 / 20px 20px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.vod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vod-thumb .no-thumb { width: 64px; opacity: 0.5; }
.vod-duration {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(20, 8, 38, 0.85); color: var(--text);
  font-size: 11px; font-weight: 700; padding: 2px 7px;
}
.vod-processing {
  position: absolute; top: 6px; left: 6px;
  color: var(--gold); border: 1px solid var(--gold);
  background: rgba(20, 8, 38, 0.85);
  font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 2px 7px;
}
.vod-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; }
.vod-title {
  font-weight: 700; font-size: 14px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vod-meta { font-size: 12px; color: var(--muted); }

/* ------------------------------ watch page ----------------------------- */
body.watch main { max-width: 1500px; }
.watch-layout { display: flex; gap: 20px; align-items: flex-start; }
.player-col { flex: 1; min-width: 0; }
.player-box {
  position: relative; background: #000;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}
.player-box video { display: block; width: 100%; height: 100%; }
.player-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center;
  background: repeating-conic-gradient(var(--check-a) 0% 25%, var(--check-b) 0% 50%) 0 0 / 20px 20px;
  font-size: 14px; font-weight: 700; padding: 20px;
}
.player-msg small { font-weight: 400; color: var(--muted); font-size: 12px; }
/* display:flex above beats the hidden attribute's UA display:none — restore it */
.player-msg[hidden] { display: none; }
.watch-info { padding: 16px 2px; display: flex; flex-direction: column; gap: 10px; }
.watch-info h2 { font-size: 18px; line-height: 1.35; }
.watch-meta { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.watch-meta a { color: var(--accent); text-decoration: none; font-weight: 700; }
.watch-meta a:hover { text-decoration: underline; }
.chapters { display: flex; flex-direction: column; }
.chapter-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  background: none; border-left: 0; border-right: 0; border-top: 0;
  color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer;
  width: 100%;
}
.chapter-row:hover .chapter-ts { color: var(--accent); }
.chapter-ts { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); flex: none; }
.chapter-cat { margin-left: auto; font-size: 11px; color: var(--muted); }
.chat-pane {
  width: 340px; flex: none;
  background: var(--panel); border: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: calc((min(100vw, 1500px) - 40px - 340px - 20px) * 9 / 16);
  min-height: 320px;
}
.chat-pane-head {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.chat-pane-body {
  flex: 1; overflow-y: auto; padding: 12px 14px; font-size: 13px;
  display: flex; flex-direction: column; gap: 6px;
  overflow-wrap: anywhere;
}
.chat-line { line-height: 1.45; }
.chat-ts { font-family: ui-monospace, monospace; font-size: 10px; color: var(--muted); margin-right: 6px; }
.chat-name { font-weight: 800; color: var(--accent); margin-right: 4px; }
.chat-name::after { content: ":"; color: var(--muted); font-weight: 400; }
.chat-emote { height: 21px; vertical-align: -5px; margin: 0 1px; }
@media (max-width: 900px) {
  .watch-layout { flex-direction: column; }
  .chat-pane { width: 100%; height: 300px; }
}

/* ------------------------------ dashboard ------------------------------ */
.dash-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.dash-row:last-child { border-bottom: 0; }
.dash-thumb {
  width: 96px; aspect-ratio: 16 / 9; object-fit: cover;
  background: repeating-conic-gradient(var(--check-a) 0% 25%, var(--check-b) 0% 50%) 0 0 / 12px 12px;
  border: 1px solid var(--border); flex: none;
}
.dash-info { display: flex; flex-direction: column; gap: 3px; min-width: 200px; flex: 1; }
.dash-title { font-weight: 700; font-size: 14px; color: inherit; text-decoration: none; }
.dash-title:hover { color: var(--accent); }
.dash-meta { font-size: 12px; color: var(--muted); }
.dash-controls { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.dash-controls select {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 8px; font-size: 12px;
}
