:root {
  color-scheme: dark;
  --bg: #080807;
  --bg-soft: #0d0e0c;
  --panel: #141510;
  --panel-2: #1a1c17;
  --panel-glass: rgba(20, 21, 16, 0.86);
  --line: rgba(245, 239, 225, 0.12);
  --line-strong: rgba(245, 239, 225, 0.2);
  --text: #f7f0e4;
  --muted: #b5bbb2;
  --dim: #787f78;
  --brass: #c9a460;
  --brass-hi: #eed895;
  --teal: #61bda9;
  --wine: #8a455d;
  --danger: #ffb2bd;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.54);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  position: relative;
  background:
    linear-gradient(180deg, rgba(8, 8, 7, 0.98), rgba(8, 8, 7, 1) 420px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 5px),
    linear-gradient(90deg, rgba(97, 189, 169, 0.025), transparent 28%, rgba(138, 69, 93, 0.025) 72%, transparent);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 16px;
  align-content: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, var(--brass-hi), var(--brass));
  color: #18130a;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(201, 164, 96, 0.22);
}

.loading-word {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid rgba(245, 239, 225, 0.11);
  background: rgba(8, 8, 7, 0.88);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.brand-name {
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
}

.nav {
  min-width: 246px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 239, 225, 0.045);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.nav-link,
.soft-button,
.icon-button,
.primary-button,
.category-tab,
.browse-chip,
.browse-search {
  min-height: 36px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0;
}

.nav-link,
.soft-button,
.browse-chip,
.browse-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-weight: 850;
}

.nav-link {
  flex: 1 1 0;
  border: 0;
  color: var(--muted);
  font-size: 14px;
}

.nav-link.active,
.nav-link:hover {
  background: linear-gradient(145deg, rgba(238, 216, 149, 0.96), rgba(201, 164, 96, 0.95));
  color: #18130a;
}

.soft-button,
.icon-button,
.category-tab,
.browse-chip,
.browse-search {
  border: 1px solid var(--line);
  background: rgba(245, 239, 225, 0.045);
  color: var(--muted);
}

.soft-button:hover,
.icon-button:hover,
.category-tab:hover,
.browse-chip:hover,
.browse-search:hover {
  border-color: rgba(97, 189, 169, 0.45);
  background: rgba(97, 189, 169, 0.12);
  color: #d7fff6;
}

.icon-button {
  width: 40px;
  display: grid;
  place-items: center;
}

.search-icon {
  position: relative;
  width: 15px;
  height: 15px;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.grid-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 6px 6px no-repeat,
    linear-gradient(currentColor 0 0) 10px 0 / 6px 6px no-repeat,
    linear-gradient(currentColor 0 0) 0 10px / 6px 6px no-repeat,
    linear-gradient(currentColor 0 0) 10px 10px / 6px 6px no-repeat;
}

.page {
  width: min(1560px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(440px, 1fr);
  min-height: 430px;
  margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 21, 16, 0.98), rgba(12, 13, 11, 0.98) 54%, rgba(28, 21, 26, 0.94)),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(238, 216, 149, 0.08), transparent 24%),
    repeating-linear-gradient(90deg, transparent 0, transparent 94px, rgba(245, 239, 225, 0.025) 95px, transparent 96px);
}

.hero-content,
.hero-media {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--brass-hi);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lock-icon {
  position: relative;
  width: 15px;
  height: 12px;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -9px;
  height: 9px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.hero h1 {
  margin: 0;
  color: #fffaf0;
  font-size: 72px;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-rule {
  width: min(340px, 100%);
  height: 2px;
  margin: 24px 0 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brass), rgba(97, 189, 169, 0.65), transparent);
}

.hero-meta,
.scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-left: 2px solid rgba(97, 189, 169, 0.6);
  padding: 0 12px;
  background: rgba(245, 239, 225, 0.045);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(245, 239, 225, 0.14);
  border-radius: 6px;
  background: rgba(8, 8, 7, 0.7);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border: 0;
  background: linear-gradient(145deg, var(--brass-hi), var(--brass));
  color: #18130a;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(201, 164, 96, 0.22);
}

.primary-button:hover {
  filter: brightness(1.05);
}

.play-symbol {
  width: 18px;
  height: 18px;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
  clip-path: polygon(24% 13%, 24% 87%, 88% 50%);
}

.hero-media {
  min-height: 100%;
  display: grid;
  align-items: stretch;
  border-left: 1px solid var(--line);
  background: #050504;
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  display: block;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.04) brightness(0.78);
  transition: transform 280ms ease, filter 280ms ease;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(8, 8, 7, 0.8), transparent 45%),
    linear-gradient(90deg, rgba(8, 8, 7, 0.35), transparent 28%);
  pointer-events: none;
}

.hero-media:hover img {
  transform: scale(1.025);
  filter: saturate(1.05) contrast(1.04) brightness(0.86);
}

.hero-player {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(245, 239, 225, 0.14);
  border-radius: 6px;
  background: rgba(8, 8, 7, 0.74);
  backdrop-filter: blur(12px);
}

.hero-player .play-symbol {
  color: var(--brass-hi);
}

.progress {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(245, 239, 225, 0.18);
}

.progress span {
  width: 42%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--brass), var(--teal));
}

.time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.browse-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 34px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 239, 225, 0.04);
}

.browse-chip,
.browse-search {
  flex: 0 0 auto;
  min-height: 34px;
  font-size: 13px;
}

.browse-chip.active {
  border-color: rgba(238, 216, 149, 0.48);
  background: rgba(201, 164, 96, 0.14);
  color: var(--brass-hi);
}

.browse-search {
  gap: 9px;
  margin-left: auto;
}

.section {
  margin-top: 36px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-kicker {
  margin-top: 3px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 800;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 318px);
  gap: 16px;
  overflow-x: auto;
  padding: 3px 2px 18px;
  scroll-snap-type: x proximity;
}

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

.scene-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #151712, #10110f);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.scene-card:hover {
  transform: translateY(-3px);
  border-color: rgba(97, 189, 169, 0.38);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.44);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050504;
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
}

.scene-card:hover .thumb img {
  transform: scale(1.035);
  filter: brightness(0.92) saturate(1.08);
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(8, 8, 7, 0.68), transparent 52%),
    linear-gradient(90deg, rgba(138, 69, 93, 0.18), transparent 40%);
}

.thumb::before {
  content: "";
  position: absolute;
  left: 13px;
  bottom: 13px;
  z-index: 2;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, var(--brass-hi), var(--brass));
  clip-path: polygon(35% 24%, 35% 76%, 76% 50%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.scene-card:hover .thumb::before {
  opacity: 1;
  transform: translateY(0);
}

.thumb-badges {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 9px;
  display: flex;
  gap: 7px;
}

.card-body {
  position: relative;
  display: grid;
  gap: 11px;
  padding: 15px 38px 16px 16px;
  text-align: left;
}

.card-title {
  min-height: 2.65em;
  display: flex;
  align-items: start;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.32;
}

.card-sub {
  min-height: 18px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 750;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(97, 189, 169, 0.22);
  background: rgba(97, 189, 169, 0.09);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 850;
}

.card-more {
  position: absolute;
  right: 16px;
  top: 18px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 7px 0 var(--dim), 0 14px 0 var(--dim);
  opacity: 0.55;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.search {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(245, 239, 225, 0.045);
  color: var(--text);
  outline: none;
}

.search:focus {
  border-color: rgba(97, 189, 169, 0.72);
  box-shadow: 0 0 0 3px rgba(97, 189, 169, 0.12);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.category-tab {
  min-height: 34px;
  padding: 0 12px;
  font-weight: 850;
}

.category-tab.active {
  border-color: rgba(238, 216, 149, 0.5);
  background: rgba(201, 164, 96, 0.14);
  color: var(--brass-hi);
}

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

.player-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #030302;
  box-shadow: var(--shadow);
}

video {
  width: 100%;
  display: block;
  background: #000;
}

.scene-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-glass);
  padding: 18px;
}

.scene-title {
  margin: 18px 0 0;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: 0;
}

.scene-details {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(8, 8, 7, 0.94), rgba(8, 8, 7, 0.76)),
    linear-gradient(90deg, rgba(97, 189, 169, 0.12), rgba(138, 69, 93, 0.1));
}

.login-card {
  width: min(420px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 28, 23, 0.96), rgba(12, 13, 11, 0.98));
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-card .brand {
  margin-bottom: 22px;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.field input {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(8, 8, 7, 0.76);
  color: var(--text);
  padding: 0 13px;
}

.field input:focus {
  outline: none;
  border-color: rgba(97, 189, 169, 0.72);
  box-shadow: 0 0 0 3px rgba(97, 189, 169, 0.12);
}

.login-card .primary-button {
  width: 100%;
  margin-top: 20px;
}

.error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 750;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    position: static;
  }

  .brand,
  .top-actions,
  .nav {
    justify-self: center;
  }

  .page {
    width: min(100vw - 24px, 760px);
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 34px 28px;
  }

  .hero-media {
    border-top: 1px solid var(--line);
    border-left: 0;
    min-height: 0;
  }

  .hero-media img {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }

  .toolbar,
  .watch-layout {
    grid-template-columns: 1fr;
  }

  .rail {
    grid-auto-columns: minmax(250px, 84vw);
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 12px;
  }

  .brand-name {
    font-size: 17px;
  }

  .nav {
    width: 100%;
    min-width: 0;
  }

  .top-actions {
    display: none;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-content {
    padding: 28px 20px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .browse-search {
    margin-left: 0;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title {
    font-size: 26px;
  }

  .scene-title {
    font-size: 31px;
  }
}
