:root {
  color-scheme: dark;
  --bg: #14171c;
  --panel: #1d222a;
  --text: #e8eaf0;
  --muted: #a7adbb;
  --border: #2c333f;
  --accent: #8fb4d8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.25rem;
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
}

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

.tile {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #0e1116;
  overflow: hidden;
}

.thumb img,
.thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb video { opacity: 0; }
.thumb video.is-playing { opacity: 1; }

.tile-title {
  display: block;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-title { margin: 0 0 1rem; font-size: 1.5rem; }
.section-title { margin: 2rem 0 1rem; font-size: 1.1rem; color: var(--muted); }

.player {
  width: 100%;
  max-height: 70vh;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.muted { color: var(--muted); }

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .tile-title {
    font-size: 0.8rem;
  }
}
