:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0f172a;
  --panel-light: rgba(30, 41, 59, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --rose: #fb7185;
  --violet: #a78bfa;
  --amber: #f59e0b;
  --emerald: #34d399;
  --blue: #60a5fa;
  --orange: #fb923c;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(167, 139, 250, 0.1), transparent 34rem),
    var(--bg);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.36), transparent);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
body.menu-open .site-header {
  background: rgba(2, 6, 23, 0.94);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.3);
}

.logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 600;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: #e2e8f0;
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: var(--bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.65s ease;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, var(--bg), transparent);
}

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

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  padding: 120px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 48px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-text,
.page-hero p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.hero-tags a,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.66);
}

.hero-tags a,
.detail-tags span:first-child {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(34, 211, 238, 0.1);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-button,
.ghost-button,
.rank-action,
.category-overview-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.rank-action,
.category-overview-head a {
  color: #021014;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

.ghost-button {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.rank-action:hover,
.category-overview-head a:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: translateY(10px);
}

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

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 30px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.36);
}

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

.quick-search,
.page-section,
.standard-page {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.search-band,
.search-panel,
.category-filter {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band input,
.search-panel input,
.search-panel select,
.category-filter input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 0 16px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.search-band input:focus,
.search-panel input:focus,
.search-panel select:focus,
.category-filter input:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.search-band button {
  min-width: 120px;
  border: 0;
  border-radius: 16px;
  color: #021014;
  font-weight: 800;
  background: var(--cyan);
}

.page-section {
  padding: 70px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

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

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

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

.category-tile,
.category-overview-card,
.page-hero,
.detail-copy,
.sidebar-panel,
.detail-poster-card,
.player-card,
.rank-page-item,
.home-rank-list,
.side-recommend-list {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.category-tile {
  min-height: 154px;
  padding: 22px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.category-tile::before,
.category-overview-card::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background: radial-gradient(circle at 20% 10%, var(--tone, var(--cyan)), transparent 18rem);
}

.category-tile span {
  position: relative;
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  position: relative;
  margin: 12px 0 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.tone-cyan { --tone: var(--cyan); }
.tone-violet { --tone: var(--violet); }
.tone-rose { --tone: var(--rose); }
.tone-amber { --tone: var(--amber); }
.tone-emerald { --tone: var(--emerald); }
.tone-blue { --tone: var(--blue); }
.tone-orange { --tone: var(--orange); }
.tone-slate { --tone: #94a3b8; }

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.28);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 55%);
  transition: opacity 0.25s ease;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  opacity: 0;
  color: #021014;
  background: var(--cyan);
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .play-badge {
  opacity: 1;
}

.movie-card:hover .play-badge {
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  min-height: 48px;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.card-title:hover,
.rank-title:hover,
.rank-name:hover {
  color: var(--cyan);
}

.card-meta,
.card-line,
.rank-card p,
.rank-page-item p {
  color: var(--muted);
}

.card-meta {
  margin: 8px 0 0;
  font-size: 13px;
}

.card-line {
  min-height: 44px;
  margin: 10px 0 12px;
  line-height: 1.55;
  font-size: 14px;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 26px;
}

.home-rank-list {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.home-rank-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.home-rank-item:last-child {
  border-bottom: 0;
}

.home-rank-item span,
.rank-number {
  font-weight: 900;
  color: var(--cyan);
}

.home-rank-item a {
  font-weight: 800;
}

.home-rank-item em {
  color: var(--muted);
  font-style: normal;
}

.side-recommend-list {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-xl);
}

.rank-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
}

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

.rank-title {
  font-weight: 850;
}

.rank-card p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.standard-page {
  padding-top: 104px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 48px;
  border-radius: 30px;
}

.small-hero {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.category-filter {
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  box-shadow: none;
}

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

.category-overview-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.category-overview-head,
.category-sample-grid {
  position: relative;
}

.category-overview-head h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.category-overview-head p {
  color: #cbd5e1;
  line-height: 1.7;
}

.category-overview-head a {
  margin-top: 18px;
}

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

.category-sample-grid a {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.category-sample-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-sample-grid span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 8px #000;
}

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

.rank-page-item {
  display: grid;
  grid-template-columns: 56px 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
}

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

.rank-name {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
}

.rank-info p {
  margin: 4px 0;
  line-height: 1.6;
}

.search-hero .search-panel {
  margin-top: 28px;
  max-width: 880px;
  box-shadow: none;
}

.search-panel select {
  max-width: 180px;
}

.search-status {
  margin-bottom: 20px;
  color: var(--muted);
}

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

.detail-main,
.detail-sidebar {
  min-width: 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #021014;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.1));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.38);
  font-size: 32px;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.82);
}

.player-message.is-visible {
  display: block;
}

.detail-copy {
  margin-top: 22px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.detail-copy h2,
.sidebar-panel h2,
.site-footer h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-copy p {
  color: #dbeafe;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.detail-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: #475569;
}

.detail-tags {
  margin-top: 20px;
}

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

.detail-poster-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

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

.detail-poster-card a {
  display: block;
  padding: 16px;
  color: var(--cyan);
  font-weight: 850;
}

.sidebar-panel {
  padding: 20px;
  border-radius: var(--radius-xl);
}

.sidebar-panel h2 {
  margin-top: 0;
}

.detail-related {
  width: 100%;
}

.compact-card .card-line {
  display: none;
}

.site-footer {
  margin-top: 80px;
  padding: 56px 0 28px;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.92));
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.15fr;
  gap: 34px;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--muted);
  line-height: 1.7;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1040px) {
  .hero-inner,
  .detail-layout,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .detail-sidebar {
    grid-template-columns: 240px 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  body.menu-open .mobile-nav {
    display: block;
  }

  .hero,
  .hero-inner {
    min-height: 640px;
  }

  .hero-inner {
    padding-top: 104px;
    padding-bottom: 88px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .search-band,
  .search-panel,
  .category-overview-card,
  .rank-page-item {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .search-panel select {
    max-width: none;
  }

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

  .page-hero {
    padding: 30px;
  }

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

  .rank-page-item {
    display: grid;
    grid-template-columns: 48px 92px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 2 / -1;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .quick-search,
  .page-section,
  .standard-page,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 17px;
  }

  .hero-tags,
  .hero-actions {
    gap: 8px;
  }

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

  .card-title {
    min-height: auto;
  }

  .rank-page-item {
    grid-template-columns: 1fr;
  }

  .rank-cover {
    width: 100%;
  }
}
