:root {
  --bg: #0f0f12;
  --surface: #1a1a20;
  --surface-2: #23232b;
  --text: #f2f2f5;
  --muted: #a1a1aa;
  --accent: #ff4d6d;
  --accent-soft: rgba(255, 77, 109, .14);
  --border: #2c2c36;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--text); text-decoration: none; }
img { display: block; max-width: 100%; }

/* age gate */
.age-gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 10, 13, .97);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.age-gate.hide { display: none; }
.age-box {
  max-width: 360px; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 22px;
}
.age-box h1 { margin: 0 0 10px; font-size: 24px; }
.age-box p { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.btn-primary, .btn-ghost {
  display: block; width: 100%; padding: 12px; margin-top: 10px;
  border-radius: 8px; font-size: 16px; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(15, 15, 18, .94);
  border-bottom: 1px solid var(--border);
}
.logo { font-size: 20px; font-weight: 700; color: var(--accent); white-space: nowrap; }
#search {
  flex: 1; min-width: 0; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 15px; outline: none;
}
#search:focus { border-color: var(--accent); }
.back-link { margin-left: auto; color: var(--muted); font-size: 15px; white-space: nowrap; }

.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
h2 { font-size: 18px; margin: 18px 0 12px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* featured row */
.featured-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.featured-row .card { flex: 0 0 260px; }
@media (max-width: 600px) { .featured-row .card { flex-basis: 220px; } }

/* grid: 2 per row on phones */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; display: block;
}
.card-thumb { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.duration {
  position: absolute; right: 6px; bottom: 6px;
  background: rgba(0, 0, 0, .75); color: #fff;
  font-size: 12px; padding: 2px 6px; border-radius: 4px;
}
.card-body { padding: 10px 12px 12px; }
.card-title { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.card-desc {
  margin: 0; color: var(--muted); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tag {
  display: inline-block; font-size: 12px; color: var(--accent);
  background: var(--accent-soft); border-radius: 4px; padding: 1px 7px; margin-top: 7px;
}

.empty { color: var(--muted); text-align: center; padding: 32px 0; }

/* watch page */
.watch-page { max-width: 900px; }
.player-wrap { border-radius: var(--radius); overflow: hidden; background: #000; }
.player-wrap .video-js { width: 100%; aspect-ratio: 16 / 9; }
.watch-title { font-size: 20px; margin: 16px 0 6px; }
.watch-meta { color: var(--muted); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.watch-desc { color: var(--text); font-size: 15px; white-space: pre-line; }

.site-footer {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 24px 16px 32px; border-top: 1px solid var(--border); margin-top: 24px;
}
