/* -------------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------------- */
:root {
  --bg:          #0d0d10;
  --bg-elev:     #16161b;
  --bg-elev-2:   #1e1e25;
  --border:      #2a2a33;
  --text:        #ececf1;
  --text-muted:  #9a9aa8;

  /* Brand, sampled from logo.png */
  --accent:       #1fff34;  /* green, the dominant logo color */
  --accent-dark:  #14cc26;  /* hover state for green surfaces */
  --accent-soft:  rgba(31, 255, 52, 0.13);
  --pink:         #ffcfcf;  /* logo secondary */
  --pink-deep:    #febfbf;

  /* Bright green needs dark text on top of it, never white. */
  --on-accent:   #0a0a0c;

  --radius:      10px;
  --radius-sm:   6px;
  --wrap:        1360px;
  --shadow:      0 8px 24px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-dark); color: var(--on-accent); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn--ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn--lg { padding: 14px 28px; font-size: 15px; }

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 13, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img {
  height: 30px;
  width: auto;
  transition: opacity .15s ease;
}
.logo:hover img { opacity: .82; }

.search {
  display: flex;
  flex: 1;
  max-width: 520px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.search:focus-within { border-color: var(--accent); }
.search input {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.search input::placeholder { color: var(--text-muted); }
.search button {
  padding: 0 14px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.search button:hover { color: var(--accent); }

.site-nav { display: flex; gap: 20px; font-weight: 600; font-size: 14px; margin-left: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */
.site-main { padding: 24px 16px 56px; min-height: 60vh; }

.hero {
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.hero__title { font-size: 28px; letter-spacing: -0.02em; }
.hero__text { margin: 8px 0 20px; color: var(--text-muted); max-width: 68ch; }

.section-head { margin: 0 0 18px; }
.section-head__title { font-size: 20px; letter-spacing: -0.01em; }
.section-head__sub { margin: 6px 0 0; font-size: 14px; }

.tag-intro {
  max-width: 78ch;
  margin: 0 0 26px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   Grid and cards
   ------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px 14px;
}
.grid--side { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.card { min-width: 0; }

.card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-elev-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .2s ease;
}
.card:hover .card__thumb img { transform: scale(1.04); }
.card__thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--bg-elev-2), var(--bg-elev));
}

.card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  color: #fff;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.card:hover .card__play { opacity: 1; }

.badge {
  position: absolute;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
}
.badge--quality { top: 8px; left: 8px; background: var(--accent); color: var(--on-accent); }
.badge--duration { bottom: 8px; right: 8px; }

.card__title {
  margin: 9px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}
.card__tag { text-transform: capitalize; }
.card__tag:hover { color: var(--accent); }

/* -------------------------------------------------------------------------
   Watch page
   ------------------------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumbs__current {
  color: var(--text);
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.player__container { width: 100%; height: 100%; }
.player__container iframe,
.player__container video { width: 100% !important; height: 100% !important; border: 0; }

.player__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}
.player__fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.player__fallback p, .player__fallback a { position: relative; }

.watch__title { margin: 18px 0 10px; font-size: 22px; letter-spacing: -0.01em; }

.watch__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.chip--quality { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); font-weight: 700; }

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--accent-soft), rgba(255, 207, 207, 0.10));
  border: 1px solid var(--border);
}
.cta__title { margin: 0; font-size: 17px; font-weight: 700; color: var(--pink); }
.cta__text { margin: 4px 0 0; font-size: 14px; }

.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 28px; }
.tag-row__label { font-size: 13px; color: var(--text-muted); margin-right: 4px; }

.tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: 13px;
  text-transform: capitalize;
}
.tag:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.previews { margin-bottom: 28px; }
.previews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.previews__grid img { border-radius: var(--radius-sm); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.watch__side { position: sticky; top: 78px; }

/* -------------------------------------------------------------------------
   Tag index
   ------------------------------------------------------------------------- */
.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.alpha-nav a {
  min-width: 32px;
  padding: 5px 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
}
.alpha-nav a:hover { border-color: var(--accent); }

.tag-group { margin-bottom: 28px; scroll-margin-top: 80px; }
.tag-group__letter { font-size: 15px; color: var(--accent); margin-bottom: 10px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* -------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.pagination__pages { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination__page,
.pagination__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}
.pagination__page:hover,
.pagination__step:hover { border-color: var(--accent); color: var(--accent); }
.pagination__page.is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pagination__step.is-disabled { opacity: .4; pointer-events: none; }
.pagination__gap { display: flex; align-items: center; padding: 0 4px; color: var(--text-muted); }

/* -------------------------------------------------------------------------
   Long form SEO copy, homepage only
   ------------------------------------------------------------------------- */
.seo-content {
  max-width: 82ch;
  margin: 56px auto 0;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}
.seo-content h2 {
  margin: 34px 0 12px;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.seo-content h2:first-of-type { margin-top: 0; }
.seo-content p { margin: 0 0 16px; }
.seo-content strong { color: var(--text); font-weight: 600; }
.seo-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.seo-content a:hover { color: var(--accent-dark); }

.seo-content__list { margin: 0 0 20px; padding-left: 20px; }
.seo-content__list li { margin-bottom: 12px; }

/* Glossary and FAQ share a definition list structure. */
.seo-content__glossary,
.seo-content__faq { margin: 0 0 20px; }

.seo-content__glossary dt,
.seo-content__faq dt {
  color: var(--text);
  font-weight: 600;
  margin-top: 16px;
}
.seo-content__glossary dd,
.seo-content__faq dd {
  margin: 4px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

/* The FAQ reads as a list of questions, so give it a little more air. */
.seo-content__faq dt { margin-top: 20px; }
.seo-content__faq dt::before { content: none; }

.seo-content__img {
  float: right;
  max-width: 42%;
  margin: 4px 0 18px 22px;
  border-radius: var(--radius);
}

@media (max-width: 640px) {
  .seo-content__img { float: none; max-width: 100%; margin: 0 0 18px; }
}

/* -------------------------------------------------------------------------
   Empty states
   ------------------------------------------------------------------------- */
.empty { text-align: center; padding: 48px 16px; }
.empty__tags { margin-top: 32px; }
.tag-cloud--centered { justify-content: center; max-width: 800px; margin: 12px auto 0; }
.empty--page { padding: 72px 16px 48px; }
.empty__code { font-size: 56px; font-weight: 800; color: var(--accent); margin: 0 0 8px; letter-spacing: -0.03em; }
.empty__title { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.empty a { color: var(--accent); }

/* -------------------------------------------------------------------------
   Age gate
   ------------------------------------------------------------------------- */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 8, 10, 0.95);
  backdrop-filter: blur(6px);
}
.age-gate[hidden] { display: none; }
.age-gate__box {
  max-width: 440px;
  padding: 32px;
  text-align: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.age-gate__logo {
  height: 34px;
  width: auto;
  margin: 0 auto 22px;
}
.age-gate__box h2 { font-size: 22px; margin-bottom: 12px; }
.age-gate__box p { color: var(--text-muted); margin: 0 0 24px; }
.age-gate__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  background: var(--bg-elev);
}
.site-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}
.site-footer__logo { height: 26px; width: auto; margin-bottom: 8px; opacity: .9; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.site-footer p { margin: 0 0 8px; }

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .watch { grid-template-columns: 1fr; }
  .watch__side { position: static; }
}

@media (max-width: 720px) {
  .site-header__inner { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .site-nav { display: none; margin-left: 0; }
  .site-nav.is-open { display: flex; order: 4; flex-basis: 100%; padding-top: 6px; }
  .nav-toggle { display: flex; margin-left: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px 10px; }
  .hero__title { font-size: 23px; }
  .watch__title { font-size: 19px; }
  .cta { flex-direction: column; align-items: stretch; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
