:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --panel: #151519;
  --panel-2: #1e1f24;
  --line: #2d2f37;
  --text: #f6f6f6;
  --muted: #a9adb8;
  --red: #d53939;
  --red-2: #ff4d4d;
  --gold: #e4aa46;
  --blue: #4c7ad8;
  --green: #33b37e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 5, 6, 0.86);
  backdrop-filter: blur(20px);
}

.age-gate.hidden {
  display: none;
}

.gate-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151519;
  box-shadow: var(--shadow);
}

.gate-card strong {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
}

.gate-card h1 {
  margin: 18px 0 10px;
  font-size: 30px;
}

.gate-card p {
  color: var(--muted);
  line-height: 1.6;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.gate-actions button,
.header-actions button,
.sort-tabs button,
.pager button,
.side-title button,
.dialog-actions button,
.category-nav button,
.quick-grid button,
.tag-cloud button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202127;
  color: var(--text);
}

.gate-actions button:first-child,
.search button,
.dialog-actions button:first-child {
  border: 0;
  background: var(--red);
  color: white;
  font-weight: 800;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 13, 0.94);
  backdrop-filter: blur(16px);
}

.header-main {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 12px 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
}

.logo span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), #7a1111);
  font-weight: 900;
}

.logo strong {
  font-size: 22px;
}

.search {
  display: grid;
  grid-template-columns: 1fr 88px;
  min-width: 0;
}

.search input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: #111216;
  color: var(--text);
  outline: 0;
  padding: 0 13px;
}

.search button {
  border-radius: 0 6px 6px 0;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.header-actions button {
  height: 38px;
  padding: 0 12px;
}

.link-button {
  display: inline-grid;
  min-height: 38px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202127;
  color: var(--text);
  text-decoration: none;
}

.category-nav {
  display: flex;
  gap: 8px;
  width: min(1480px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  padding: 0 18px 12px;
}

.category-nav button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  color: #d4d7df;
}

.category-nav button.active,
.category-nav button:hover {
  border-color: rgba(213, 57, 57, 0.75);
  background: rgba(213, 57, 57, 0.16);
  color: white;
}

.page {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.ad-slot {
  position: relative;
  display: grid;
  min-height: 120px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #454852;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(213, 57, 57, 0.18), transparent 42%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 14px),
    #17181d;
  color: #dfe2ea;
  text-align: center;
}

.ad-slot::after {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  content: "";
  pointer-events: none;
}

.ad-slot span {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.ad-slot strong,
.ad-slot small {
  position: relative;
  z-index: 1;
  display: block;
}

.ad-slot strong {
  font-size: 18px;
}

.ad-slot small {
  margin-top: 5px;
  color: var(--muted);
}

.ad-wide {
  min-height: 96px;
  margin-bottom: 16px;
}

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

.ad-box {
  min-height: 250px;
}

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

.recommend-carousel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(213, 57, 57, 0.12), transparent 42%),
    #151519;
  box-shadow: var(--shadow);
}

.carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.carousel-head p,
.section-head p,
.dialog-label {
  margin: 0 0 8px;
  color: var(--red-2);
  font-size: 13px;
  font-weight: 800;
}

.carousel-head h1 {
  margin: 0;
  font-size: 28px;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-controls button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202127;
  color: white;
  font-size: 24px;
}

.recommend-track {
  display: block;
}

.recommend-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 34%) 1fr;
  gap: 28px;
  width: 100%;
  min-height: 222px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202127;
  color: white;
  text-align: left;
}

.recommend-banner::before,
.banner-poster::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 27%, rgba(255, 255, 255, 0.22), transparent 15%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 18px);
}

.recommend-banner::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.78));
}

.banner-poster {
  position: relative;
  z-index: 2;
  display: block;
  min-height: 300px;
  margin: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.banner-poster i {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  transform: translateX(-50%);
  box-shadow:
    0 52px 0 22px rgba(255, 255, 255, 0.12),
    -48px 96px 0 34px rgba(255, 255, 255, 0.08),
    48px 96px 0 34px rgba(255, 255, 255, 0.08);
}

.banner-poster b {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 1;
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.64);
  font-size: 12px;
}

.banner-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  min-height: 336px;
  padding: 32px 34px 54px 0;
}

.banner-copy small,
.banner-copy strong,
.banner-copy em {
  display: block;
}

.banner-copy small {
  color: var(--red-2);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.banner-copy strong {
  margin-top: 10px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.05;
}

.banner-copy em {
  max-width: 680px;
  margin-top: 16px;
  color: #d4d7df;
  font-style: normal;
  line-height: 1.6;
}

.banner-dots {
  position: absolute;
  right: 28px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 7px;
}

.banner-dots i {
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.banner-dots i.active {
  background: var(--red-2);
}

.recommend-copy {
  display: none;
}

.poster-face {
  display: none;
}

.recommend-card {
  display: none;
}

/*
  Legacy selectors kept hidden above because previous markup used six cards.
  The active design is a single banner carousel.
*/

.recommend-copy strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.daily-panel,
.side-card,
.feed {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.daily-panel,
.side-card,
.feed {
  padding: 16px;
}

h2,
h3,
p {
  margin-top: 0;
}

.daily-panel h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

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

.quick-grid button {
  min-height: 64px;
  padding: 10px;
  text-align: left;
}

.quick-grid strong {
  display: block;
  font-size: 18px;
}

.quick-grid span {
  color: var(--muted);
  font-size: 12px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 16px;
}

.section-head,
.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.sort-tabs {
  display: flex;
  gap: 8px;
}

.sort-tabs button,
.pager button,
.side-title button {
  min-height: 34px;
  padding: 0 11px;
  color: #d6d9e0;
}

.sort-tabs button.active {
  border-color: rgba(213, 57, 57, 0.75);
  background: rgba(213, 57, 57, 0.16);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 16px;
}

.video-card {
  display: block;
  min-width: 0;
}

.thumb {
  position: relative;
  display: block;
  width: 100%;
  min-height: 178px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #2b2d35, #101114);
  text-align: left;
}

.thumb::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.22), transparent 23%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
}

.thumb::after {
  position: absolute;
  inset: auto 10px 10px 10px;
  height: 42%;
  content: "";
  border-radius: 7px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.cover-art {
  position: absolute;
  inset: 12px 12px 34px;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.2), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
}

.cover-art::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.38));
  content: "";
}

.cover-art i {
  display: block;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  box-shadow:
    0 34px 0 18px rgba(255, 255, 255, 0.12),
    -46px 72px 0 34px rgba(255, 255, 255, 0.08),
    46px 72px 0 34px rgba(255, 255, 255, 0.08);
}

.cover-art b {
  display: none;
}

.tone-a {
  background: linear-gradient(135deg, #492327, #131318);
}

.tone-b {
  background: linear-gradient(135deg, #24314d, #111216);
}

.tone-c {
  background: linear-gradient(135deg, #2a4639, #121315);
}

.tone-d {
  background: linear-gradient(135deg, #4a3924, #111216);
}

.tone-e {
  background: linear-gradient(135deg, #39284a, #121315);
}

.duration,
.badge {
  position: absolute;
  z-index: 4;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.74);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.duration {
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
}

.badge {
  top: 8px;
  left: 8px;
  padding: 4px 6px;
  background: var(--red);
}

.play-mark {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: rgba(213, 57, 57, 0.9);
  transform: translate(-50%, -50%);
}

.play-mark::before {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid white;
  content: "";
}

.video-card h3 {
  display: -webkit-box;
  min-height: 42px;
  margin: 9px 0 5px;
  overflow: hidden;
  color: #f1f2f5;
  font-size: 15px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.title-code {
  display: inline-block;
  margin-right: 8px;
  color: var(--red-2);
  font-weight: 900;
}

.video-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

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

.sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
}

.rank-item b {
  display: grid;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: #24252c;
  color: var(--gold);
}

.rank-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item span {
  color: var(--muted);
  font-size: 12px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud button {
  min-height: 32px;
  padding: 0 10px;
  color: #d7dae2;
}

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

.stats div {
  padding: 12px;
  border-radius: 8px;
  background: #202127;
}

.stats dt {
  color: var(--muted);
  font-size: 12px;
}

.stats dd {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 900;
}

.detail-dialog {
  width: min(920px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 22px;
}

.detail-dialog[open] {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.dialog-cover {
  position: relative;
  min-height: 430px;
}

.dialog-cover::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 23%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
}

.dialog-cover::after {
  position: absolute;
  inset: 34px 42px 72px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.22), transparent 16%),
    radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12));
  content: "";
}

.dialog-cover span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  font-weight: 900;
}

.dialog-body {
  padding: 28px;
}

.dialog-body h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.info-list div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
}

.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dialog-tags span {
  padding: 6px 9px;
  border-radius: 6px;
  background: #24252c;
  color: #dce0e9;
  font-size: 13px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.dialog-actions button {
  min-height: 38px;
  padding: 0 13px;
}

.safe-note {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.6;
}

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

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

.watch-layout-rich {
  align-items: start;
}

.player-panel {
  min-width: 0;
}

.player-placeholder {
  position: relative;
  display: grid;
  min-height: 560px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08090b;
  box-shadow: var(--shadow);
}

.player-placeholder::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.14), transparent 25%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 22px);
}

.player-placeholder::after {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: white;
  content: attr(data-code);
  font-weight: 900;
}

#playToggle {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(213, 57, 57, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

#playToggle span {
  width: 0;
  height: 0;
  margin-left: 8px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 26px solid white;
}

.player-copy {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 64px;
  left: 22px;
}

.player-copy strong {
  display: block;
  font-size: 26px;
}

.player-copy p {
  max-width: 560px;
  margin: 8px 0 0;
  color: #c8ccd6;
}

.player-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.62);
  color: #e8eaf0;
}

.player-controls i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.player-controls i::before {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  content: "";
}

.watch-titlebar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 18px;
}

.watch-titlebar p {
  margin: 0 0 8px;
  color: var(--red-2);
  font-weight: 900;
}

.watch-titlebar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

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

.watch-actions button,
.module-list button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202127;
  color: var(--text);
}

.watch-actions button:first-child {
  border-color: rgba(228, 170, 70, 0.72);
  color: var(--gold);
}

.watch-info-block {
  margin-top: 18px;
}

.detail-style {
  margin-top: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-style h1 {
  max-width: 980px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.32;
}

.icon-actions button,
.icon-actions button:first-child {
  border: 0;
  background: transparent;
  color: #d7dae2;
}

.detail-tabs {
  display: flex;
  gap: 22px;
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-tabs button {
  position: relative;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.detail-tabs button.active {
  color: #ff6b6b;
}

.detail-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #ff6b6b;
  content: "";
}

.tab-panel {
  display: none;
  padding-top: 20px;
}

.tab-panel.active {
  display: block;
}

.intro-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #aeb3bf;
  font-size: 18px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.intro-text.expanded {
  display: block;
}

.more-button {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-weight: 800;
}

.text-ad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin-top: 24px;
}

.text-ad-grid a,
.side-text-ads a {
  color: #95bd7a;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.source-detail {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
}

.source-detail div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
}

.source-detail dt {
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.source-detail dd {
  margin: 0;
  color: #d6dae3;
  font-size: 17px;
  line-height: 1.5;
}

.source-tags {
  margin-top: 18px;
}

.download-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.download-panel p {
  color: var(--muted);
}

.download-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.download-buttons button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202127;
  color: var(--text);
}

.watch-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.watch-meta div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.watch-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.watch-meta dd {
  margin: 5px 0 0;
  font-weight: 800;
}

.watch-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
}

.compact-list,
.module-list {
  display: grid;
  gap: 10px;
}

.rich-related {
  gap: 18px;
}

.rich-item {
  grid-template-columns: 150px 1fr;
}

.compact-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.mini-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.mini-thumb::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.18), transparent 24%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 16px);
}

.mini-thumb b,
.related-thumb b {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.68);
  color: white;
  font-size: 12px;
}

.side-text-ads {
  display: grid;
  gap: 12px;
}

.related-section {
  margin-top: 34px;
}

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

.related-card {
  color: var(--text);
  text-decoration: none;
}

.related-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202127;
}

.related-thumb::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.22), transparent 17%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.26)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 18px);
}

.related-thumb i {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(213, 57, 57, 0.9);
  transform: translate(-50%, -50%);
}

.related-card strong {
  display: -webkit-box;
  margin-top: 9px;
  overflow: hidden;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.compact-item strong,
.compact-item small {
  display: block;
}

.compact-item small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-footer {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 28px 18px 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-logo {
  margin-bottom: 10px;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  line-height: 1.6;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
}

.site-footer a {
  color: #d8dbe3;
  text-decoration: none;
}

.admin-page {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.admin-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.admin-nav a {
  padding: 9px 11px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.admin-nav a:hover {
  background: #202127;
  color: var(--text);
}

.admin-hero {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(213, 57, 57, 0.14), transparent 38%),
    var(--panel);
}

.admin-hero p,
.settings-head p {
  margin: 0 0 8px;
  color: var(--red-2);
  font-size: 13px;
  font-weight: 900;
}

.admin-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 56px);
}

.admin-hero span {
  color: var(--muted);
}

.admin-status {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 12px;
  min-width: 180px;
  padding: 16px;
  border-radius: 8px;
  background: #202127;
}

.admin-status strong {
  font-size: 28px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.admin-side,
.settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-side {
  position: sticky;
  top: 112px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
}

.admin-side a {
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.admin-side a.active,
.admin-side a:hover {
  background: rgba(213, 57, 57, 0.16);
  color: var(--text);
}

.admin-main {
  display: grid;
  gap: 16px;
}

.settings-panel {
  padding: 18px;
}

.settings-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.settings-head h2 {
  margin: 0;
}

.primary-action {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: white;
  font-weight: 900;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
}

.form-grid span {
  color: var(--muted);
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111216;
  color: var(--text);
  padding: 0 11px;
}

.admin-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.7fr 0.8fr 0.6fr;
  gap: 12px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-head {
  background: #202127;
  color: var(--muted);
  font-weight: 900;
}

.status-on {
  color: #73d39d;
  font-weight: 900;
}

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

.ad-setting-grid article {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px dashed #454852;
  border-radius: 8px;
  background: #17181d;
}

.ad-setting-grid strong {
  display: block;
}

.ad-setting-grid span {
  color: var(--muted);
}

.module-switches,
.footer-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.module-switches label,
.footer-editor button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202127;
  color: var(--text);
}

.module-switches label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-editor button {
  text-align: left;
}

.pro-admin {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background: #0f1014;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #14151a;
}

.admin-logo {
  margin-bottom: 22px;
}

.admin-menu {
  display: grid;
  gap: 6px;
}

.admin-menu a {
  padding: 12px 13px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
}

.admin-menu a.active,
.admin-menu a:hover {
  background: rgba(213, 57, 57, 0.16);
  color: var(--text);
}

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

.admin-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 16, 20, 0.92);
  backdrop-filter: blur(14px);
}

.admin-toolbar p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.admin-toolbar h1 {
  margin: 0;
  font-size: 24px;
}

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

.toolbar-actions input {
  width: min(280px, 36vw);
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111216;
  color: var(--text);
  padding: 0 11px;
}

.toolbar-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202127;
  color: var(--text);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #111216;
}

.admin-tabs a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.admin-tabs a.active,
.admin-tabs a:hover {
  border-color: rgba(213, 57, 57, 0.72);
  color: var(--text);
}

.pro-admin-page {
  padding-top: 16px;
}

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

.dashboard-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.dashboard-grid span,
.dashboard-grid em {
  color: var(--muted);
  font-style: normal;
}

.dashboard-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 30px;
}

.dashboard-grid em {
  color: #73d39d;
  font-weight: 900;
}

.admin-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 16px;
  margin-top: 16px;
}

.chart-placeholder {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 240px;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 100% 25%,
    #111216;
}

.chart-placeholder i {
  flex: 1;
  min-width: 18px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--red-2), rgba(213, 57, 57, 0.25));
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-list label {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #202127;
}

.resource-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.resource-row {
  display: grid;
  grid-template-columns: 110px 1.6fr 1fr 0.7fr 0.6fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.resource-row:last-child {
  border-bottom: 0;
}

.resource-head {
  background: #202127;
  color: var(--muted);
  font-weight: 900;
}

.resource-row .mini-thumb {
  width: 96px;
}

.resource-row strong,
.resource-row small {
  display: block;
}

.resource-row small {
  margin-top: 4px;
  color: var(--muted);
}

.resource-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202127;
  color: var(--text);
}

.privacy-on .video-card h3,
.privacy-on #dialogCode,
.privacy-on #dialogTitle {
  filter: blur(5px);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(213, 57, 57, 0.5);
  border-radius: 8px;
  background: #17181d;
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1220px) {
  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .feature-strip,
  .content-layout,
  .watch-layout,
  .ad-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-main {
    grid-template-columns: 1fr auto;
  }

  .logo strong {
    display: none;
  }

  .search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .recommend-banner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .banner-poster {
    min-height: 250px;
  }

  .banner-copy {
    min-height: auto;
    padding: 0 18px 58px;
  }

  .banner-copy strong {
    font-size: 30px;
  }

  .video-grid,
  .sidebar,
  .detail-dialog[open],
  .watch-meta {
    grid-template-columns: 1fr;
  }

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

  .sort-tabs {
    width: 100%;
  }

  .sort-tabs button {
    flex: 1;
  }

  .dialog-cover {
    min-height: 250px;
  }

  .player-placeholder {
    min-height: 330px;
  }

  .watch-titlebar {
    flex-direction: column;
  }

  .watch-actions {
    width: 100%;
    justify-content: stretch;
  }

  .watch-actions button {
    flex: 1;
  }

  .text-ad-grid,
  .download-buttons,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .source-detail div {
    grid-template-columns: 1fr;
  }

  .rich-item {
    grid-template-columns: 120px 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .admin-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .admin-hero,
  .settings-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-layout,
  .form-grid,
  .ad-setting-grid,
  .module-switches,
  .footer-editor,
  .table-row {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
  }

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

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions,
  .toolbar-actions input {
    width: 100%;
  }

  .dashboard-grid,
  .admin-charts,
  .resource-row {
    grid-template-columns: 1fr;
  }
}
