:root {
  --bg: #000000;
  --bg-2: #111111;
  --card: #161616;
  --line: rgba(255, 255, 255, 0.16);
  --gold: #ffffff;
  --gold-2: #d6d6d6;
  --ink: #ffffff;
  --muted: #a3a3a3;
  --danger: #ffffff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --radius: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(255, 255, 255, 0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: 0.01em; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.05; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(1180px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.kicker {
  margin: 0 0 0.55rem;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(0, 0, 0, 0.86);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; letter-spacing: 0.08em; }
.brand-text small { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.04em; }

.site-main { padding: 2.2rem 0 4rem; }

.hero { padding: 1.2rem 0 2rem; }
.hero-lead { max-width: 38rem; color: var(--muted); font-size: 1.05rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.1rem;
  color: var(--muted);
}

.sort-tabs {
  display: flex;
  gap: 1.1rem;
  align-items: baseline;
}

.sort-tabs a {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.1;
}

.sort-tabs a.is-active,
.sort-tabs a:hover {
  color: var(--ink);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.pager a,
.pager span {
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
}

.pager a:hover,
.pager span.is-active {
  color: #000;
  background: var(--gold);
  border-color: var(--gold);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem 1.05rem;
}

.v-card { min-width: 0; }

.v-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  border: 1px solid transparent;
}

.v-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.02);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.v-card:hover .v-thumb {
  border-color: rgba(255, 255, 255, 0.55);
}

.v-card:hover .v-thumb img {
  transform: scale(1.07);
  filter: grayscale(1) contrast(1.12);
}

.v-time,
.v-flag {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.v-time {
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
}

.v-flag {
  left: 0.5rem;
  top: 0.5rem;
  background: var(--gold);
  color: #000;
}

.v-meta { padding: 0.7rem 0.15rem 0; }
.v-meta h3 a { color: var(--ink); }
.v-meta h3 a:hover { color: var(--gold-2); }
.v-meta p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.v-meta p a { color: var(--muted); }

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.watch { display: grid; gap: 1.5rem; }

.player-stage {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}

.player-stage video { width: 100%; height: 100%; display: block; }
.player-stage .fluid_video_wrapper,
.player-stage .fluid_player_container {
  width: 100% !important;
  height: 100% !important;
}

.player-missing {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.watch-info h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.watch-stats {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.watch-cast { color: var(--ink); }
.watch-cast span { color: var(--gold); margin-right: 0.4rem; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; font-weight: 700; }
.watch-desc { color: #e8e8e8; max-width: 48rem; }
.watch-2257 { color: var(--muted); font-size: 0.85rem; max-width: 46rem; }

.tag-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
}

.tag-row a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.related { margin-top: 2.5rem; }

.legal { max-width: 46rem; }
.legal h1 { margin-bottom: 0.4rem; }
.legal h2 { margin: 1.8rem 0 0.6rem; font-size: 1.45rem; }
.legal p, .legal li { color: #e6e6e6; }
.legal-updated { color: var(--muted); }
.legal address { font-style: normal; border-left: 2px solid var(--gold); padding-left: 1rem; color: #f2f2f2; }
.legal-note { font-size: 0.9rem; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 2.8rem;
  background: #000;
}

.footer-inner { display: grid; gap: 1.1rem; }
.footer-brand p { color: var(--muted); max-width: 34rem; margin: 0.4rem 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; }
.footer-links a { color: var(--ink); }
.footer-copy { color: var(--muted); margin: 0; font-size: 0.85rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: #000; color: #fff; border-color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-danger { background: transparent; color: var(--ink); border-color: rgba(255, 255, 255, 0.45); }

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  background:
    radial-gradient(800px 400px at 50% 20%, rgba(255, 255, 255, 0.08), transparent 50%),
    rgba(0, 0, 0, 0.96);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.age-card {
  width: min(520px, 100%);
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.4rem 1.8rem;
  box-shadow: var(--shadow);
}

.age-lead { color: var(--muted); }
.age-actions { display: grid; gap: 0.7rem; margin: 1.4rem 0 1rem; }
.age-note { color: var(--muted); font-size: 0.82rem; }

body.admin {
  background: #000;
}

.admin-shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}

.admin-side {
  border-right: 1px solid var(--line);
  padding: 1.4rem 1rem;
  background: #0a0a0a;
}

.admin-side a {
  display: block;
  color: var(--muted);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}

.admin-side a.active,
.admin-side a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }

.admin-main { padding: 1.6rem 1.6rem 3rem; }

.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 0.85rem; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; }
td img { width: 86px; height: 48px; object-fit: cover; border-radius: 6px; }

.form-grid { display: grid; gap: 0.9rem; max-width: 760px; }
label { display: grid; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="file"],
textarea,
select {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
}

textarea { min-height: 120px; resize: vertical; }
.check { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); }
.flash { padding: 0.7rem 0.9rem; border-radius: 10px; margin-bottom: 1rem; }
.flash-ok { background: rgba(255, 255, 255, 0.08); color: #fff; }
.flash-err { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }

#chunk-upload progress {
  width: 100%;
  height: 8px;
  accent-color: var(--gold);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.5rem;
}

.login-card h1 { font-size: 2rem; margin-bottom: 0.3rem; }

@media (max-width: 1100px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .video-grid { grid-template-columns: 1fr; }
}
