:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #162033;
  --muted: #64748b;
  --line: #dbe3ef;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #c2410c;
  --danger: #b91c1c;
  --ok: #15803d;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

img,
video {
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 227, 239, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-size: 18px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a,
.nav-links button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links button:hover,
.btn:hover {
  border-color: #9fb2c8;
}

.btn.primary,
.nav-links .primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn.primary:hover {
  background: var(--brand-dark);
}

.btn.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: var(--danger);
}

.main {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 52px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 28px;
  min-height: 380px;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
}

.hero-panel,
.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 22px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric {
  padding: 18px;
  border-radius: 7px;
  background: #eef7f6;
}

.metric strong {
  display: block;
  font-size: 30px;
}

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

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
}

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

.card {
  overflow: hidden;
}

.thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #edf2f7;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.badge.ok {
  background: #dcfce7;
  color: var(--ok);
}

.badge.warn {
  background: #ffedd5;
  color: var(--accent);
}

.badge.danger {
  background: #fee2e2;
  color: var(--danger);
}

.panel {
  padding: 22px;
}

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #334155;
  font-size: 14px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

.flash {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 7px;
  font-weight: 650;
}

.flash.success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: var(--ok);
}

.flash.error {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: var(--danger);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}

.sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: #334155;
  font-weight: 700;
}

.sidebar a:hover {
  background: #eef7f6;
  color: var(--brand-dark);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #020617;
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.watermark {
  position: absolute;
  right: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.55);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  pointer-events: none;
}

.empty {
  padding: 28px;
  border: 1px dashed #b8c5d8;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inline {
  display: inline;
}

.desktop-logout {
  display: inline;
}

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero,
  .split,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: static;
  }

  .main {
    width: min(100% - 22px, 1180px);
    margin-top: 18px;
  }

  .panel {
    padding: 16px;
  }
}

/* Refined user experience */
body:not(.admin-body):not(.admin-login-body) {
  background:
    radial-gradient(circle at 12% 12%, rgba(20, 184, 166, 0.14), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(217, 119, 6, 0.12), transparent 30%),
    #f7f9fc;
}

.topbar {
  border-bottom-color: rgba(203, 213, 225, 0.7);
}

.brand-mark {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.home-hero {
  min-height: 430px;
  padding: 28px 0;
}

.home-hero h1 {
  max-width: 820px;
}

.watch-preview {
  padding: 14px;
  background: #0b1220;
  color: #fff;
}

.preview-screen {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.78), rgba(30, 64, 175, 0.88)),
    linear-gradient(45deg, #0f172a, #111827);
  color: rgba(255, 255, 255, 0.9);
  font-size: 26px;
  font-weight: 900;
}

.watch-preview .metric {
  background: rgba(255, 255, 255, 0.08);
}

.watch-preview .muted {
  color: rgba(255, 255, 255, 0.68);
}

.catalog-head,
.watch-title,
.admin-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}

.catalog-head h1,
.watch-title h1,
.admin-page-title h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
}

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

.video-card {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.video-card .thumb {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.84), rgba(37, 99, 235, 0.78)),
    #0f172a;
  color: #fff;
}

.full-btn {
  width: 100%;
}

.watch-page {
  display: grid;
  gap: 16px;
}

.watch-page .player-shell {
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
}

.secure-strip {
  margin-top: 14px;
}

.member-summary {
  background: linear-gradient(135deg, #ffffff, #eef7f6);
}

.redeem-panel {
  border-color: rgba(15, 118, 110, 0.28);
}

.admin-body {
  background: #eef2f7;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid #d8e1ee;
  background: #101828;
  color: #fff;
}

.admin-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.admin-brand,
.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-brand {
  font-weight: 850;
}

.admin-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0f766e;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 22px;
  width: min(1440px, calc(100% - 32px));
  margin: 22px auto 48px;
}

.admin-main {
  min-width: 0;
}

.admin-body .sidebar {
  top: 84px;
  border: 0;
  box-shadow: var(--shadow);
}

.sidebar-title {
  padding: 8px 12px 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.admin-body .sidebar a {
  margin-bottom: 4px;
}

.admin-body .panel,
.admin-body .table-wrap,
.stat-card {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: #64748b;
  font-weight: 750;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.admin-login-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.82)),
    #111827;
}

.admin-login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.admin-login-panel {
  display: grid;
  grid-template-columns: 1fr 420px;
  width: min(960px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.admin-login-copy {
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.95), rgba(30, 64, 175, 0.9)),
    #0f172a;
  color: #fff;
}

.admin-login-copy .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.admin-login-copy h1 {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.08;
}

.admin-login-copy p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

.admin-login-form {
  padding: 42px;
}

.admin-login-body .field label,
.admin-login-body .admin-login-form h2 {
  color: #172033;
}

.admin-login-body input,
.admin-login-body select,
.admin-login-body textarea {
  border-color: #cbd7e6;
  background: #ffffff;
  color: #172033;
}

@media (max-width: 860px) {
  .catalog-head,
  .watch-title,
  .admin-page-title,
  .admin-topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-shell,
  .admin-login-panel {
    grid-template-columns: 1fr;
  }

  .admin-login-copy,
  .admin-login-form {
    padding: 28px;
  }

  .admin-shell {
    width: min(100% - 22px, 1440px);
    margin-top: 14px;
  }
}

/* Short-drama member theater skin */
body:not(.admin-body):not(.admin-login-body) {
  background: #f3f1ed;
  color: #1f1a17;
}

body:not(.admin-body):not(.admin-login-body) .topbar {
  border-bottom: 1px solid rgba(31, 26, 23, 0.08);
  background: rgba(243, 241, 237, 0.92);
  backdrop-filter: blur(14px);
}

body:not(.admin-body):not(.admin-login-body) .nav {
  min-height: 66px;
}

body:not(.admin-body):not(.admin-login-body) .brand {
  color: #1f1a17;
  font-size: 18px;
  letter-spacing: 0;
}

body:not(.admin-body):not(.admin-login-body) .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1f1a17;
  color: #f8f4ec;
  font-size: 16px;
}

body:not(.admin-body):not(.admin-login-body) .nav-links a,
body:not(.admin-body):not(.admin-login-body) .nav-links button,
body:not(.admin-body):not(.admin-login-body) .btn {
  border: 1px solid rgba(31, 26, 23, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #1f1a17;
  font-size: 14px;
  font-weight: 750;
}

body:not(.admin-body):not(.admin-login-body) .btn.primary,
body:not(.admin-body):not(.admin-login-body) .nav-links .primary {
  border-color: #1f1a17;
  background: #1f1a17;
  color: #fffaf2;
}

body:not(.admin-body):not(.admin-login-body) .btn.ghost {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

body:not(.admin-body):not(.admin-login-body) .main {
  width: min(1200px, calc(100% - 32px));
  margin-top: 22px;
}

.theater-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  background: #201915;
  box-shadow: 0 26px 80px rgba(31, 26, 23, 0.18);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 14, 10, 0.92), rgba(20, 14, 10, 0.56) 46%, rgba(20, 14, 10, 0.18)),
    linear-gradient(0deg, rgba(20, 14, 10, 0.9), rgba(20, 14, 10, 0.08) 58%);
}

.theater-hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding: clamp(26px, 6vw, 64px);
  color: #fffaf2;
}

.theater-hero-content h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

.theater-hero-content p {
  max-width: 560px;
  margin: 0 0 24px;
  color: rgba(255, 250, 242, 0.78);
  font-size: 17px;
}

.kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: #f4c27a;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.kicker.dark {
  color: #9a5a20;
}

.clean-title h2,
.theater-head h1 {
  color: #1f1a17;
}

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

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

.poster-card {
  min-width: 0;
}

.poster-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #d9d2c7;
  box-shadow: 0 12px 30px rgba(31, 26, 23, 0.12);
}

.poster-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.poster-cover span,
.poster-cover em:not(.unlock-tag):not(.lock-tag) {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #6b5e52;
  font-style: normal;
  font-weight: 800;
}

.poster-card:hover .poster-cover img {
  transform: scale(1.035);
}

.poster-body {
  padding: 10px 2px 0;
}

.poster-body h3 {
  margin: 0;
  overflow: hidden;
  color: #1f1a17;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-body p {
  margin: 4px 0 0;
  color: #776b5f;
  font-size: 13px;
}

.unlock-tag,
.lock-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(31, 26, 23, 0.76);
  color: #fffaf2;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.lock-tag {
  background: rgba(154, 90, 32, 0.86);
}

.poster-card.is-locked .poster-cover img {
  filter: brightness(0.58) saturate(0.82);
}

.poster-lock-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(12, 10, 9, 0.18), rgba(12, 10, 9, 0.74));
  color: #fff8ed;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.theater-head {
  padding: 12px 0 4px;
}

.theater-watch-title {
  padding-top: 10px;
}

.watch-page {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.watch-page .player-shell {
  border-radius: 8px;
  background: #0f0d0b;
  box-shadow: 0 24px 70px rgba(31, 26, 23, 0.28);
}

.watch-note {
  margin: 2px 0 0;
  color: #776b5f;
  font-size: 13px;
  text-align: center;
}

.locked-panel {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: 8px;
  background: #fffaf2;
  box-shadow: 0 16px 42px rgba(31, 26, 23, 0.1);
}

.locked-panel img {
  width: 100%;
  border-radius: 8px;
}

.member-hero,
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 18px;
  align-items: stretch;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: center;
}

.captcha-image {
  display: grid;
  place-items: center;
  width: 128px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7cfc4;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.captcha-image img {
  display: block;
  width: 128px;
  height: 48px;
}

.member-card,
.redeem-card,
.auth-card,
.auth-copy {
  border-radius: 8px;
  background: #fffaf2;
  box-shadow: 0 14px 36px rgba(31, 26, 23, 0.08);
}

.member-card {
  padding: 28px;
  background: #211a16;
  color: #fffaf2;
}

.member-card .kicker {
  color: #f4c27a;
}

.member-card h1 {
  margin: 0 0 22px;
  font-size: 38px;
}

.member-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.member-stats div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.member-stats span {
  display: block;
  color: rgba(255, 250, 242, 0.64);
  font-size: 13px;
}

.member-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.redeem-card,
.auth-card,
.auth-copy {
  padding: 28px;
}

.continue-list {
  display: grid;
  gap: 10px;
}

.continue-item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #fffaf2;
  box-shadow: 0 10px 24px rgba(31, 26, 23, 0.06);
}

.continue-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #d9d2c7;
}

.continue-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.continue-item strong,
.activation-item strong {
  display: block;
  color: #1f1a17;
}

.continue-item small,
.activation-item span {
  color: #776b5f;
}

.activation-list {
  display: grid;
  gap: 10px;
}

.entitlement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.entitlement-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 214, 102, 0.16), rgba(255, 255, 255, 0.05));
  color: #fff8ed;
}

.entitlement-card span {
  color: var(--theater-gold);
  font-size: 13px;
  font-weight: 800;
}

.entitlement-card strong {
  font-size: 20px;
  line-height: 1.25;
}

.entitlement-card small {
  color: rgba(255, 248, 237, 0.62);
}

.activation-item {
  padding: 14px 16px;
  border-radius: 8px;
  background: #fffaf2;
}

.auth-shell {
  width: min(940px, 100%);
  margin: 48px auto;
}

.auth-copy h1,
.auth-card h2 {
  margin-top: 0;
}

@media (max-width: 860px) {
  body:not(.admin-body):not(.admin-login-body) .main {
    width: min(100% - 22px, 1200px);
  }

  .theater-hero {
    min-height: 470px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(20, 14, 10, 0.92), rgba(20, 14, 10, 0.2));
  }

  .poster-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .member-hero,
  .auth-shell,
  .locked-panel {
    grid-template-columns: 1fr;
  }

  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 116px;
  }

  .captcha-image,
  .captcha-image img {
    width: 116px;
  }

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

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

  .continue-item {
    grid-template-columns: 112px 1fr;
  }

  .catalog-head h1,
  .watch-title h1,
  .admin-page-title h1 {
    font-size: 28px;
  }
}

/* Hierarchy pass: make the theater homepage feel lighter and better staged */
body:not(.admin-body):not(.admin-login-body) .nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 58px;
}

body:not(.admin-body):not(.admin-login-body) .main {
  width: min(1120px, calc(100% - 32px));
  margin-top: 18px;
}

.theater-hero {
  min-height: 410px;
  max-height: 430px;
  border-radius: 10px;
}

.hero-bg {
  object-position: center center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(18, 13, 10, 0.92) 0%, rgba(18, 13, 10, 0.76) 28%, rgba(18, 13, 10, 0.34) 58%, rgba(18, 13, 10, 0.08) 100%),
    linear-gradient(0deg, rgba(18, 13, 10, 0.78), rgba(18, 13, 10, 0.05) 62%);
}

.theater-hero-content {
  max-width: 520px;
  padding: clamp(24px, 4.2vw, 48px);
}

.theater-hero-content h1 {
  font-size: clamp(34px, 4.6vw, 58px);
}

.theater-hero-content p {
  max-width: 470px;
  margin-bottom: 22px;
  font-size: 16px;
}

.kicker {
  margin-bottom: 10px;
}

.clean-title {
  margin: 32px 0 14px;
}

.clean-title h2 {
  font-size: 26px;
  line-height: 1.15;
}

.poster-grid {
  gap: 20px;
}

.poster-cover {
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(31, 26, 23, 0.09);
}

.poster-body {
  padding-top: 9px;
}

.poster-body h3 {
  font-size: 15px;
}

.poster-body p {
  font-size: 12px;
}

@media (min-width: 1200px) {
  .theater-hero {
    max-width: 1050px;
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  body:not(.admin-body):not(.admin-login-body) .topbar {
    position: static;
  }

  body:not(.admin-body):not(.admin-login-body) .nav {
    flex-direction: row;
    align-items: center;
    width: min(100% - 24px, 1120px);
    min-height: 56px;
    padding: 8px 0;
  }

  body:not(.admin-body):not(.admin-login-body) .brand {
    gap: 8px;
    font-size: 17px;
  }

  body:not(.admin-body):not(.admin-login-body) .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  body:not(.admin-body):not(.admin-login-body) .nav-links {
    flex-wrap: nowrap;
    gap: 6px;
  }

  body:not(.admin-body):not(.admin-login-body) .nav-links a,
  body:not(.admin-body):not(.admin-login-body) .nav-links button,
  body:not(.admin-body):not(.admin-login-body) .btn {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 13px;
  }

  body:not(.admin-body):not(.admin-login-body) .main {
    width: min(100% - 24px, 1120px);
    margin-top: 14px;
  }

  .theater-hero {
    min-height: 360px;
    max-height: none;
    border-radius: 9px;
  }

  .hero-bg {
    object-position: 61% center;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(18, 13, 10, 0.9) 0%, rgba(18, 13, 10, 0.58) 44%, rgba(18, 13, 10, 0.08) 100%),
      linear-gradient(90deg, rgba(18, 13, 10, 0.44), rgba(18, 13, 10, 0));
  }

  .theater-hero-content {
    max-width: 100%;
    padding: 22px;
  }

  .theater-hero-content h1 {
    max-width: 320px;
    font-size: 34px;
  }

  .theater-hero-content p {
    max-width: 330px;
    font-size: 14px;
  }

  .clean-title {
    margin: 28px 0 12px;
  }

  .clean-title h2 {
    font-size: 24px;
  }

  .poster-grid,
  .catalog-grid {
    gap: 14px;
  }
}

@media (max-width: 390px) {
  body:not(.admin-body):not(.admin-login-body) .nav {
    width: min(100% - 18px, 1120px);
  }

  body:not(.admin-body):not(.admin-login-body) .brand span:last-child {
    max-width: 76px;
    overflow: hidden;
    white-space: nowrap;
  }

  body:not(.admin-body):not(.admin-login-body) .nav-links a,
  body:not(.admin-body):not(.admin-login-body) .nav-links button {
    padding: 7px 9px;
  }
}

/* Cinema polish pass: darker, aligned, content-first */
body:not(.admin-body):not(.admin-login-body) {
  background:
    linear-gradient(180deg, #0d0c0b 0%, #12100f 48%, #171410 100%);
  color: #f7f1e8;
}

body:not(.admin-body):not(.admin-login-body) .topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 12, 11, 0.9);
}

body:not(.admin-body):not(.admin-login-body) .nav,
body:not(.admin-body):not(.admin-login-body) .main {
  width: min(1280px, calc(100% - 56px));
}

body:not(.admin-body):not(.admin-login-body) .nav {
  min-height: 68px;
}

body:not(.admin-body):not(.admin-login-body) .brand {
  color: #fff8ed;
}

body:not(.admin-body):not(.admin-login-body) .brand-mark {
  background: #f1c574;
  color: #17100b;
}

body:not(.admin-body):not(.admin-login-body) .nav-links a,
body:not(.admin-body):not(.admin-login-body) .nav-links button,
body:not(.admin-body):not(.admin-login-body) .btn {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #fff8ed;
}

body:not(.admin-body):not(.admin-login-body) .btn.primary,
body:not(.admin-body):not(.admin-login-body) .nav-links .primary {
  border-color: #f1c574;
  background: #f1c574;
  color: #19120d;
}

body:not(.admin-body):not(.admin-login-body) .main {
  margin-top: 28px;
}

.theater-hero {
  width: 100%;
  max-width: none;
  min-height: 520px;
  max-height: 560px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #111;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
}

.hero-bg {
  object-position: center center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(10, 8, 7, 0.92) 0%, rgba(10, 8, 7, 0.72) 33%, rgba(10, 8, 7, 0.28) 62%, rgba(10, 8, 7, 0.04) 100%),
    linear-gradient(0deg, rgba(10, 8, 7, 0.74), rgba(10, 8, 7, 0.04) 58%);
}

.theater-hero-content {
  max-width: 560px;
  padding: clamp(34px, 5vw, 72px);
}

.theater-hero-content h1 {
  font-size: clamp(44px, 5.2vw, 76px);
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.34);
}

.theater-hero-content p {
  color: rgba(255, 248, 237, 0.78);
}

.kicker {
  color: #f1c574;
}

.kicker.dark {
  color: #f1c574;
}

.clean-title,
.theater-head,
.watch-title {
  color: #fff8ed;
}

.clean-title {
  margin: 44px 0 18px;
}

.clean-title h2,
.theater-head h1,
.catalog-head h1,
.watch-title h1 {
  color: #fff8ed;
}

body:not(.admin-body):not(.admin-login-body) .muted,
.poster-body p,
.watch-note,
.continue-item small,
.activation-item span {
  color: rgba(255, 248, 237, 0.58);
}

.poster-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

.category-title {
  align-items: center;
}

.category-title p {
  margin: 4px 0 0;
  color: rgba(255, 250, 242, 0.58);
}

.category-grid {
  margin-bottom: 28px;
}

.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.poster-cover {
  border-radius: 12px;
  background: #211c18;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.poster-body {
  padding: 12px 2px 0;
}

.poster-body h3 {
  color: #fff8ed;
  font-size: 17px;
}

.poster-card:hover .poster-cover img {
  transform: scale(1.025);
}

.empty,
.member-card,
.redeem-card,
.auth-card,
.auth-copy,
.continue-item,
.activation-item,
.locked-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1b1714;
  color: #fff8ed;
}

.auth-card input,
.auth-card select,
.auth-card textarea,
.redeem-card input,
.redeem-card select,
.redeem-card textarea {
  border-color: rgba(255, 255, 255, 0.13);
  background: #100e0c;
  color: #fff8ed;
}

.field label,
.continue-item strong,
.activation-item strong {
  color: #fff8ed;
}

.member-card {
  background:
    linear-gradient(135deg, rgba(241, 197, 116, 0.16), rgba(255, 255, 255, 0.03)),
    #1b1714;
}

.member-stats div {
  background: rgba(255, 255, 255, 0.05);
}

@media (min-width: 1200px) {
  .theater-hero {
    max-width: none;
  }
}

@media (max-width: 860px) {
  body:not(.admin-body):not(.admin-login-body) .nav,
  body:not(.admin-body):not(.admin-login-body) .main {
    width: min(100% - 24px, 1280px);
  }

  body:not(.admin-body):not(.admin-login-body) .nav {
    min-height: 58px;
  }

  .theater-hero {
    min-height: 430px;
    border-radius: 12px;
  }

  .hero-bg {
    object-position: 58% center;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(10, 8, 7, 0.94) 0%, rgba(10, 8, 7, 0.62) 44%, rgba(10, 8, 7, 0.14) 100%);
  }

  .theater-hero-content {
    padding: 24px;
  }

  .theater-hero-content h1 {
    font-size: 36px;
  }

  .clean-title {
    margin-top: 34px;
  }

  .poster-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Mobile overflow fix */
body:not(.admin-body):not(.admin-login-body) {
  overflow-x: hidden;
}

body:not(.admin-body):not(.admin-login-body) .topbar,
body:not(.admin-body):not(.admin-login-body) .main,
.theater-hero,
.poster-grid,
.catalog-grid {
  max-width: 100%;
}

@media (max-width: 640px) {
  body:not(.admin-body):not(.admin-login-body) .nav,
  body:not(.admin-body):not(.admin-login-body) .main {
    width: calc(100% - 28px);
  }

  body:not(.admin-body):not(.admin-login-body) .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 56px;
    padding: 8px 0;
  }

  body:not(.admin-body):not(.admin-login-body) .brand {
    min-width: 0;
  }

  body:not(.admin-body):not(.admin-login-body) .brand span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.admin-body):not(.admin-login-body) .nav-links {
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
  }

  body:not(.admin-body):not(.admin-login-body) .nav-links form {
    display: none;
  }

  .desktop-logout {
    display: none;
  }

  body:not(.admin-body):not(.admin-login-body) .nav-links a,
  body:not(.admin-body):not(.admin-login-body) .nav-links button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .theater-hero {
    min-height: 420px;
    overflow: hidden;
  }

  .theater-hero-content {
    padding: 22px 20px;
  }

  .theater-hero-content h1 {
    max-width: 100%;
    font-size: clamp(30px, 8vw, 38px);
    word-break: keep-all;
  }

  .theater-hero-content p {
    max-width: 100%;
  }

  .clean-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .clean-title h2 {
    min-width: 0;
  }

  .clean-title .btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .poster-body h3 {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

@media (max-width: 360px) {
  body:not(.admin-body):not(.admin-login-body) .nav,
  body:not(.admin-body):not(.admin-login-body) .main {
    width: calc(100% - 20px);
  }

  body:not(.admin-body):not(.admin-login-body) .brand span:last-child {
    max-width: 70px;
  }

  body:not(.admin-body):not(.admin-login-body) .nav-links a {
    padding: 6px 8px;
  }
}

/* Admin readability and cover controls */
.admin-body {
  color: #172033;
}

.admin-body .admin-main,
.admin-body .panel,
.admin-body .table-wrap,
.admin-body table,
.admin-body input,
.admin-body select,
.admin-body textarea {
  color: #172033;
}

.admin-body .admin-page-title h1,
.admin-body .panel h2,
.admin-body .section-title h2,
.admin-body .field label,
.admin-body th,
.admin-body td strong {
  color: #172033;
}

.admin-body .field label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.admin-body input,
.admin-body select,
.admin-body textarea {
  border-color: #cbd7e6;
  background: #ffffff;
}

.admin-body input::placeholder,
.admin-body textarea::placeholder {
  color: #8795a8;
  opacity: 1;
}

.admin-body .muted {
  color: #5d6f88;
}

.admin-body input[type="file"] {
  padding: 8px 10px;
  background: #fbfdff;
}

.admin-video-upload small {
  display: block;
  margin-top: 6px;
}

.status-autosave {
  min-width: 112px;
  margin-right: 8px;
}

.status-autosave.is-saving {
  opacity: 0.65;
}

.admin-user-table table {
  min-width: 980px;
}

.entitlement-editor {
  display: grid;
  gap: 10px;
}

.entitlement-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 360px;
  margin-bottom: 7px;
}

.permission-pill,
.entitlement-summary em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.permission-pill.ok,
.entitlement-summary em {
  background: #dcfce7;
  color: #0f766e;
}

.entitlement-compact {
  max-width: 360px;
}

.entitlement-compact summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #fff;
  color: #0f766e;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.entitlement-compact .entitlement-editor {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fbfdff;
}

.entitlement-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 330px;
}

.entitlement-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #fbfdff;
  font-size: 12px;
  font-weight: 750;
}

.entitlement-checks input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  margin: 0;
  border-radius: 3px;
}

.entitlement-checks em {
  color: #0f766e;
  font-style: normal;
  font-size: 12px;
}

.admin-filter {
  margin-top: 18px;
}

.filter-actions {
  align-self: end;
}

.upload-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #cfe3f4;
  border-radius: 8px;
  background: #f3f8fc;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
}

.upload-progress strong {
  color: var(--brand);
}

.upload-progress progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #dbe7f4;
}

.upload-progress progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #dbe7f4;
}

.upload-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--brand);
}

.upload-progress progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--brand);
}

.admin-video-table table {
  min-width: 980px;
}

.admin-video-summary {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 360px;
}

.admin-video-summary img {
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  object-fit: cover;
  background: #e8eef6;
}

.admin-video-summary strong {
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-edit-details {
  margin-top: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fbfdff;
}

.admin-edit-details summary {
  min-height: 38px;
  padding: 8px 12px;
  color: #0f766e;
  font-weight: 850;
  cursor: pointer;
}

.admin-edit-details[open] summary {
  border-bottom: 1px solid #dbe3ef;
}

.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px;
}

.admin-edit-wide {
  grid-column: 1 / -1;
}

.admin-edit-wide textarea {
  min-height: 86px;
}

.admin-edit-wide input[type="file"] {
  width: 100%;
}

.admin-inline-edit {
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) 88px 110px auto;
  align-items: end;
}

@media (max-width: 900px) {
  .admin-inline-edit {
    grid-template-columns: 1fr;
  }

  .admin-video-summary {
    grid-template-columns: 96px minmax(0, 1fr);
    min-width: 300px;
  }

  .admin-video-summary img {
    width: 96px;
  }

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

/* Keep the standalone admin login readable after the user-side dark theme overrides. */
.admin-login-body .admin-login-form h2,
.admin-login-body .field label {
  color: #172033;
}

.admin-login-body input,
.admin-login-body select,
.admin-login-body textarea {
  border-color: #cbd7e6;
  background: #ffffff;
  color: #172033;
}
