:root {
  --color-bg: #0f172a;
  --color-bg-soft: #111827;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-accent: #10b981;
  --color-accent-dark: #059669;
  --color-warm: #f97316;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius-large: 28px;
  --radius-card: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 45%, #f8fafc 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: #ffffff;
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #052e1d;
  background: linear-gradient(135deg, #34d399 0%, #10b981 55%, #6ee7b7 100%);
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14), 0 10px 28px rgba(16, 185, 129, 0.34);
  font-size: 16px;
  font-weight: 900;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  color: #e2e8f0;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.16);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 11px 14px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.24), transparent 28%), linear-gradient(135deg, #020617 0%, #0f172a 52%, #111827 100%);
}

.hero-media,
.hero-media img,
.hero-media::after {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.02);
  transition: opacity 0.45s ease, transform 0.55s ease;
}

.hero-media img.is-changing {
  opacity: 0.20;
  transform: scale(1.06);
}

.hero-media::after {
  content: "";
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.16) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.16));
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 70vh;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 52px;
  padding: 80px 0;
}

.hero-copy {
  max-width: 700px;
}

.eyebrow,
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.92);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2.3vw, 22px);
}

.hero-pills,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}

.hero-pills span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button,
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 16px 30px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover,
.button-primary:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(16, 185, 129, 0.34);
}

.btn-ghost,
.button-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini-card:hover,
.hero-mini-card.is-active {
  background: rgba(16, 185, 129, 0.20);
  transform: translateX(-3px);
}

.hero-mini-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #164e63, #065f46);
}

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

.hero-mini-card strong,
.hero-mini-card small {
  display: block;
}

.hero-mini-card strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.35;
}

.hero-mini-card small {
  color: #cbd5e1;
  font-size: 12px;
}

.page-section,
.page-hero,
.detail-section {
  padding: 56px 0;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 14% 16%, rgba(16, 185, 129, 0.20), transparent 26%), linear-gradient(135deg, #0f172a 0%, #111827 100%);
}

.page-hero.compact {
  padding: 42px 0;
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 26px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.section-link {
  display: inline-flex;
  color: var(--color-accent-dark);
  font-weight: 800;
}

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

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

.video-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.16);
}

.video-card a {
  display: grid;
  min-height: 100%;
  color: inherit;
}

.cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.7), transparent 26%), linear-gradient(135deg, #0f172a, #164e63 56%, #065f46);
}

.cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.video-card:hover .cover img {
  transform: scale(1.06);
}

.cover img.is-missing {
  display: none;
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(36px, 7vw, 78px);
  font-weight: 900;
  z-index: 0;
}

.cover-shade {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.meta-line span {
  padding: 3px 8px;
  background: #f1f5f9;
  border-radius: 999px;
}

.card-body h2,
.card-body h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  min-height: 48px;
  margin: 0;
  color: #475569;
  font-size: 14px;
}

.card-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags span,
.tag-list span {
  display: inline-flex;
  padding: 4px 9px;
  color: #065f46;
  background: #d1fae5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  overflow: hidden;
  min-height: 190px;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: var(--shadow-card);
}

.category-tile a {
  position: relative;
  display: grid;
  min-height: 190px;
  color: #ffffff;
}

.tile-bg,
.tile-bg img,
.tile-bg::after {
  position: absolute;
  inset: 0;
}

.tile-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transition: opacity 0.2s ease, transform 0.35s ease;
}

.category-tile:hover .tile-bg img {
  opacity: 0.52;
  transform: scale(1.06);
}

.tile-bg::after {
  content: "";
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.90), rgba(15, 23, 42, 0.32));
}

.tile-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
}

.tile-content small {
  color: #a7f3d0;
  font-weight: 800;
}

.tile-content strong {
  margin: 6px 0;
  font-size: 26px;
  line-height: 1.15;
}

.tile-content em {
  color: #dbeafe;
  font-size: 13px;
  font-style: normal;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  margin-top: 26px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
}

.search-box {
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.search-box input,
.filter-selects select,
.search-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  outline: none;
}

.search-box input:focus,
.filter-selects select:focus,
.search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.filter-selects {
  display: flex;
  align-items: end;
  gap: 10px;
}

[data-card][hidden] {
  display: none;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: start;
}

.rank-panel,
.prose-panel,
.info-panel,
.search-results-panel {
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.rank-panel {
  padding: 10px;
}

.rank-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 54px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
  background: #ecfdf5;
  transform: translateX(3px);
}

.rank-number {
  color: var(--color-warm);
  font-size: 22px;
  font-weight: 950;
}

.rank-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #047857);
}

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

.rank-info strong,
.rank-info small {
  display: block;
}

.rank-info strong {
  color: #0f172a;
  font-size: 17px;
}

.rank-info small {
  color: var(--color-muted);
  font-size: 13px;
}

.rank-action {
  color: var(--color-accent-dark);
  font-weight: 900;
}

.detail-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #020617 0%, #0f172a 55%, #111827 100%);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: center;
  padding: 46px 0;
}

.detail-title p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #065f46);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.30);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.player-shell {
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.25);
}

.player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  color: #ffffff;
  background: #0f172a;
}

.player-topbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-topbar span {
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 800;
}

.player-stage {
  position: relative;
  background: #000000;
}

.player-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-button {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.35);
  font-size: 34px;
  cursor: pointer;
}

.player-message {
  padding: 12px 18px 16px;
  color: #cbd5e1;
  background: #020617;
  font-size: 14px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.prose-panel,
.info-panel,
.search-results-panel {
  padding: 24px;
}

.prose-panel + .prose-panel {
  margin-top: 20px;
}

.prose-panel h2,
.info-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.prose-panel p,
.info-panel p {
  margin: 0 0 14px;
  color: #475569;
}

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

.info-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.info-list dt {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 800;
}

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

.search-page-box {
  display: grid;
  gap: 14px;
  max-width: 820px;
}

.search-results-panel {
  margin-top: 28px;
}

.sitemap-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sitemap-list a {
  display: block;
  padding: 10px 12px;
  overflow: hidden;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sitemap-list a:hover {
  color: var(--color-accent-dark);
  border-color: rgba(16, 185, 129, 0.42);
  transform: translateY(-2px);
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 28px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

.site-footer p {
  color: #94a3b8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #34d399;
}

.footer-bottom {
  padding: 18px 0;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.empty-state {
  display: none;
  padding: 28px;
  color: #64748b;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-inner,
  .detail-hero-inner,
  .detail-content,
  .rank-layout {
    grid-template-columns: 1fr;
  }

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

  .video-grid,
  .video-grid.featured-grid,
  .category-grid,
  .related-grid,
  .sitemap-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 52px 0;
  }

  .hero-panel,
  .video-grid,
  .video-grid.featured-grid,
  .category-grid,
  .related-grid,
  .footer-grid,
  .sitemap-list {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item a {
    grid-template-columns: 42px 76px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

  .play-button {
    width: 74px;
    height: 74px;
  }
}
