:root {
  --ice-950: #020617;
  --ice-900: #0f172a;
  --ice-850: #111c31;
  --ice-800: #1e293b;
  --ice-700: #334155;
  --ice-500: #64748b;
  --ice-400: #94a3b8;
  --ice-300: #cbd5e1;
  --ice-200: #e2e8f0;
  --ice-100: #f1f5f9;
  --frost-600: #0284c7;
  --frost-500: #0ea5e9;
  --frost-400: #38bdf8;
  --frost-300: #7dd3fc;
  --glacier-600: #0891b2;
  --glacier-500: #06b6d4;
  --glacier-400: #22d3ee;
  --gold: #facc15;
  --rose: #fb7185;
  --shadow-ice: 0 24px 80px rgba(0, 0, 0, 0.42);
  --shadow-frost: 0 20px 60px rgba(14, 165, 233, 0.28);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --header-height: 76px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ice-200);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--ice-950), #050b18 42%, var(--ice-950));
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--frost-600), var(--glacier-500));
  box-shadow: var(--shadow-frost);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-copy strong {
  font-size: 1.3rem;
  color: var(--ice-100);
  letter-spacing: -0.04em;
}

.brand-copy em {
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--ice-400);
  font-style: normal;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--ice-300);
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(14, 165, 233, 0.22);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.9);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--ice-100);
}

.mobile-panel {
  display: none;
}

.hero-slider {
  position: relative;
  min-height: min(780px, calc(100vh - var(--header-height)));
  overflow: hidden;
  background: var(--ice-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.1s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.64) 45%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 90px 0 120px;
}

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

.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 999px;
  color: var(--frost-300);
  background: rgba(14, 165, 233, 0.16);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 22px 0 18px;
  color: white;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.hero-line {
  max-width: 690px;
  color: var(--ice-200);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--ice-300);
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-meta strong,
.detail-meta strong,
.rank-meta strong {
  padding: 8px 13px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--gold));
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 15px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--frost-600), var(--glacier-500));
  box-shadow: var(--shadow-frost);
}

.button.ghost {
  color: var(--ice-100);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.16);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 72px;
  border: 0;
  border-radius: 18px;
  color: white;
  background: rgba(15, 23, 42, 0.64);
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
  background: rgba(14, 165, 233, 0.74);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.4);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--frost-400);
}

.search-strip,
.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.search-strip {
  padding: 34px 0 12px;
}

.search-strip-inner,
.page-hero,
.detail-copy,
.detail-poster-card,
.movie-info-box,
.player-shell,
.category-tile,
.rank-item {
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow-ice);
  backdrop-filter: blur(18px);
}

.search-strip-inner {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 28px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.search-strip h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
}

.filter-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 16px;
  color: white;
  outline: none;
  background: rgba(2, 6, 23, 0.62);
}

.filter-panel input:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: var(--ice-300);
  background: rgba(30, 41, 59, 0.72);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: white;
  background: rgba(14, 165, 233, 0.72);
}

.content-section {
  padding: 54px 0;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--frost-400);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-copy h2,
.detail-poster-card h2,
.movie-info-box h2 {
  margin: 0;
  color: white;
  letter-spacing: -0.05em;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-more {
  color: var(--frost-300);
  font-weight: 800;
}

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

.category-movie-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 26px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.46);
  box-shadow: var(--shadow-frost);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--ice-900);
}

.poster-link img,
.rank-cover img,
.detail-poster-card img,
.category-covers img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.rank-item:hover .rank-cover img,
.category-tile:hover .category-covers img {
  transform: scale(1.08);
}

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #fef3c7, var(--gold));
  font-size: 0.8rem;
  font-weight: 900;
}

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

.movie-card h3 {
  min-height: 2.7em;
  margin: 10px 0 8px;
  color: white;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover {
  color: var(--frost-300);
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--ice-400);
  font-size: 0.86rem;
  line-height: 1.55;
}

.card-desc {
  margin-top: 8px;
}

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

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

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

.category-tile {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 24px;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
}

.category-covers {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 8px;
  height: 150px;
  overflow: hidden;
  border-radius: 18px;
}

.category-covers img {
  border-radius: 14px;
  background: var(--ice-900);
}

.category-tile h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 1.25rem;
}

.category-tile p,
.page-hero p,
.footer-shell p,
.detail-copy p,
.detail-poster-card p,
.rank-content p {
  margin: 0;
  color: var(--ice-300);
  line-height: 1.75;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 70px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.24), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.52));
}

.page-hero p {
  max-width: 760px;
  margin-top: 16px;
  font-size: 1.06rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--ice-400);
}

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

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

.detail-primary {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: black;
}

.movie-player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.movie-player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: white;
  text-align: center;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.22), rgba(2, 6, 23, 0.86));
  cursor: pointer;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--frost-600), var(--glacier-500));
  box-shadow: var(--shadow-frost);
  font-size: 2.2rem;
}

.movie-player-cover strong {
  max-width: min(560px, 80%);
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.detail-copy,
.detail-poster-card,
.movie-info-box {
  border-radius: var(--radius-xl);
  padding: 26px;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-copy h2,
.detail-poster-card h2,
.movie-info-box h2 {
  font-size: 1.45rem;
}

.detail-tags {
  margin: 2px 0 6px;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-poster-card img {
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  background: var(--ice-900);
}

.detail-poster-card h2 {
  margin-top: 16px;
}

.detail-poster-card p {
  margin-top: 12px;
}

.movie-info-box dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 13px 16px;
  margin: 18px 0 0;
}

.movie-info-box dt {
  color: var(--ice-400);
}

.movie-info-box dd {
  margin: 0;
  color: var(--ice-100);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 92px 54px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.42);
}

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ice-900);
}

.rank-number {
  color: var(--frost-300);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.rank-content h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 1.12rem;
}

.rank-meta {
  margin-top: 12px;
  font-size: 0.84rem;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  border-radius: 18px;
  color: var(--ice-300);
  text-align: center;
  background: rgba(15, 23, 42, 0.76);
}

.empty-state.show {
  display: block;
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.74);
}

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 12px;
  color: white;
  font-size: 1.35rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--ice-300);
  background: rgba(30, 41, 59, 0.68);
}

.footer-links a:hover {
  color: white;
  background: rgba(14, 165, 233, 0.66);
}

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 26px;
  color: var(--ice-500);
  font-size: 0.9rem;
}

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

@media (max-width: 1180px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

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

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.95);
  }

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

  .hero-content {
    padding: 58px 0 96px;
  }

  .hero-control {
    display: none;
  }

  .search-strip-inner,
  .footer-shell,
  .detail-side {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .large-category-grid,
  .compact-ranks {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 72px 40px 1fr;
    gap: 12px;
  }

  .rank-number {
    font-size: 1.45rem;
  }

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

@media (max-width: 520px) {
  .nav-shell,
  .search-strip,
  .content-section,
  .page-main,
  .footer-shell,
  .copyright {
    width: min(100% - 22px, 1240px);
  }

  .brand-copy em {
    display: none;
  }

  .brand-copy strong {
    font-size: 1.08rem;
  }

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

  .hero-slider {
    min-height: 680px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(2.5rem, 14vw, 4.2rem);
  }

  .hero-meta span,
  .detail-meta span,
  .rank-meta span,
  .hero-meta strong,
  .detail-meta strong,
  .rank-meta strong {
    padding: 7px 10px;
  }

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

  .category-covers {
    height: 132px;
  }

  .detail-copy,
  .detail-poster-card,
  .movie-info-box,
  .page-hero {
    padding: 20px;
  }

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

  .rank-number {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    background: rgba(2, 6, 23, 0.7);
    width: 46px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
  }

  .rank-content {
    grid-column: 2;
  }
}
