/* 169.tube — the web app's one stylesheet. Every frame is 16:9. */

:root {
  --bg: #0b0b0f;
  --surface: #15151c;
  --line: #24242e;
  --text: #ececf1;
  --muted: #9a9aa8;
  --accent: #c5f04a;
  --radius: 12px;
  --gap: 20px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center;
  height: 60px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.mark { height: 20px; width: auto; color: var(--accent); flex: none; }
.tld { color: var(--muted); }

main { padding: 24px; max-width: 1800px; margin: 0 auto; }

/* The 16:9 frame: thumbnails, the player, placeholders. */
.frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  overflow: hidden; border-radius: var(--radius); background: var(--surface);
}
.frame img, .frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }

.grid { display: grid; gap: 32px var(--gap); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card { display: flex; flex-direction: column; gap: 10px; }
.card .frame { transition: transform 160ms ease, box-shadow 160ms ease; }
.card:hover .frame { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--accent); }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.duration {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 6px; border-radius: 6px;
  background: rgb(0 0 0 / 0.8); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}

.watch { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.watch.solo { grid-template-columns: minmax(0, 1fr); max-width: 1280px; margin: 0 auto; }
.player { border-radius: var(--radius); }
.player video { object-fit: contain; }
.title { font-size: 22px; margin: 16px 0 4px; letter-spacing: -0.01em; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.meta { color: var(--muted); margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.fullscreen {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.fullscreen:hover { border-color: var(--accent); }
.description { white-space: pre-wrap; color: var(--muted); line-height: 1.5; background: var(--surface); padding: 14px 16px; border-radius: var(--radius); }
.next { display: flex; flex-direction: column; gap: 18px; }
.next h2 { font-size: 16px; margin: 0; color: var(--muted); font-weight: 600; }

@media (max-width: 1100px) {
  .watch { grid-template-columns: 1fr; }
  .next { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px var(--gap); }
  .next h2 { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  main { padding: 0 0 24px; }
  .player { border-radius: 0; }
  .title, .bar, .description, .next { margin-left: 16px; margin-right: 16px; }
  .grid { padding: 16px; }
}

.empty { max-width: 560px; margin: 8vh auto; text-align: center; }
.placeholder { display: grid; place-items: center; border: 1px dashed var(--line); }
.placeholder span { font-size: 48px; font-weight: 800; color: var(--line); letter-spacing: -0.04em; }
.empty h1 { margin: 28px 0 8px; font-size: 24px; }
.empty p { color: var(--muted); }
.empty a { color: var(--accent); }
.empty pre { text-align: left; background: var(--surface); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; font-size: 13px; }
