:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --muted-deep: #64748b;
  --text: #f8fafc;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), #67e8f9 52%, #f8fafc);
  box-shadow: 0 14px 42px rgba(34, 211, 238, 0.28);
  font-weight: 900;
}

.logo-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.logo-copy em {
  margin-top: 3px;
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-button:hover {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
  padding: 24px 0;
}

.dropdown-panel {
  position: absolute;
  top: 68px;
  left: -18px;
  width: 220px;
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
}

.dropdown-panel a:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.10);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.86);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
  padding: 10px 15px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #06121f;
  background: var(--cyan);
  cursor: pointer;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.88);
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.94);
}

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

.mobile-nav a {
  color: #cbd5e1;
  padding: 8px 0;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding-top: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-track {
  position: relative;
  min-height: 72vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 44px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: blur(6px) saturate(1.2);
  transform: scale(1.04);
}

.hero-shade {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.92)),
    linear-gradient(0deg, #020617, transparent 45%, #020617);
}

.hero-content {
  max-width: 740px;
  padding-top: 40px;
}

.hero-kicker,
.section-heading p,
.page-hero p,
.rank-copy p,
.detail-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-one-line {
  max-width: 680px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #a5f3fc;
  background: var(--cyan-soft);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
}

.card-tags span {
  padding: 4px 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 13px 22px;
  color: #04111e;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.23);
}

.ghost-button {
  padding: 12px 20px;
  border: 1px solid var(--border);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-card {
  position: relative;
  min-height: 480px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 34px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.hero-card span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #04111e;
  background: var(--cyan);
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.76);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.44);
}

.hero-dot.is-active {
  width: 28px;
  background: var(--cyan);
}

main,
.page-main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section-block {
  margin-top: 72px;
}

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

.section-heading h2,
.page-hero h1,
.rank-copy h1,
.detail-copy h1,
.player-block h2,
.content-panel h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading a,
.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.70);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(30, 41, 59, 0.86);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 9;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.05) 60%);
}

.poster-badge,
.poster-category {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 850;
}

.poster-badge {
  left: 12px;
  color: #04111e;
  background: var(--cyan);
}

.poster-category {
  right: 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.80);
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 16px;
}

.movie-card-body h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-body h2 a:hover {
  color: var(--cyan);
}

.movie-card-body p {
  margin: 0 0 12px;
  min-height: 52px;
  color: #cbd5e1;
  font-size: 14px;
}

.card-meta {
  margin-bottom: 12px;
  color: var(--muted-deep);
  font-size: 13px;
}

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

.category-card,
.category-overview-card,
.content-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.74));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.category-card {
  padding: 22px;
}

.category-card span,
.category-title {
  display: block;
  margin-bottom: 8px;
  color: #f8fafc;
  font-size: 19px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p,
.footer-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-card:hover,
.category-overview-card:hover {
  border-color: rgba(34, 211, 238, 0.38);
  transform: translateY(-3px);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 30px;
}

.compact-heading {
  margin-bottom: 18px;
}

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

.ranking-list li a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-list span {
  color: var(--cyan);
  font-weight: 950;
}

.ranking-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.page-hero,
.rank-hero,
.detail-hero {
  margin-top: 34px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(2, 6, 23, 0.78));
  box-shadow: var(--shadow);
}

.page-hero {
  padding: clamp(30px, 5vw, 64px);
}

.slim-hero {
  min-height: 260px;
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.page-hero span,
.rank-copy span,
.detail-one-line {
  display: block;
  max-width: 820px;
  margin-top: 16px;
  color: #cbd5e1;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
  padding: 13px 16px;
}

.filter-bar select {
  width: 190px;
}

.empty-state {
  display: none;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.70);
}

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

.category-overview-card {
  padding: 22px;
}

.category-samples {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}

.category-samples a {
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-samples a:hover {
  color: var(--cyan);
}

.rank-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  align-items: center;
  padding: clamp(26px, 5vw, 58px);
}

.rank-copy h1 {
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1;
}

.rank-copy .primary-button {
  margin-top: 26px;
}

.rank-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rank-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

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

.rank-table th,
.rank-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.rank-table th {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.rank-table td:first-child {
  color: var(--cyan);
  font-weight: 950;
}

.rank-table a:hover {
  color: var(--cyan);
}

.detail-main {
  width: min(1180px, calc(100% - 32px));
}

.detail-hero {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: clamp(22px, 4vw, 44px);
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.05;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.66);
  font-size: 13px;
  font-weight: 750;
}

.player-block h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 4vw, 38px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.20);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.20));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-start span {
  width: clamp(68px, 10vw, 104px);
  height: clamp(68px, 10vw, 104px);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.92);
  box-shadow: 0 22px 62px rgba(34, 211, 238, 0.30);
  clip-path: polygon(34% 24%, 34% 76%, 78% 50%);
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

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

.content-panel {
  padding: 26px;
}

.content-panel h2 {
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 24px;
}

.content-panel p {
  margin: 0;
  color: #dbeafe;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding: 44px 0;
}

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

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-link-grid {
  display: grid;
  gap: 8px;
}

.footer-link-grid a {
  color: var(--muted);
  font-size: 14px;
}

.footer-link-grid a:hover {
  color: var(--cyan);
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--border);
  color: var(--muted-deep);
  text-align: center;
  font-size: 13px;
}

.is-hidden-by-filter {
  display: none !important;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-slide {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .hero-card {
    display: none;
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    height: 66px;
  }

  .logo-copy strong {
    font-size: 17px;
  }

  .hero-carousel,
  .hero-track {
    min-height: 78vh;
  }

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

  .movie-grid,
  .category-grid,
  .overview-grid,
  .mini-grid,
  .detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .detail-poster {
    max-width: 320px;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar select {
    width: 100%;
  }

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

@media (max-width: 560px) {
  main,
  .page-main,
  .detail-main,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1240px);
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .logo-copy em {
    display: none;
  }

  .mobile-search {
    flex-direction: column;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .category-grid,
  .overview-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .rank-hero,
  .detail-hero,
  .content-panel {
    border-radius: 22px;
  }

  .movie-card-body p {
    min-height: auto;
  }
}
