:root {
  --ice-950: #020617;
  --ice-900: #0f172a;
  --ice-850: #142036;
  --ice-800: #1e293b;
  --ice-700: #334155;
  --ice-500: #64748b;
  --ice-400: #94a3b8;
  --ice-300: #cbd5e1;
  --ice-200: #e2e8f0;
  --ice-50: #f8fafc;
  --frost-600: #0284c7;
  --frost-500: #0ea5e9;
  --frost-400: #38bdf8;
  --glacier-600: #0891b2;
  --glacier-500: #06b6d4;
  --gold: #facc15;
  --shadow-ice: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.18), transparent 30rem),
    radial-gradient(circle at 90% 10%, rgba(6, 182, 212, 0.12), transparent 34rem),
    var(--ice-950);
  color: var(--ice-50);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.92);
  background: rgba(15, 23, 42, 0.93);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-ice);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--frost-600), var(--glacier-600));
  color: #fff;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.35);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

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

.brand-copy strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--ice-400);
  font-size: 0.76rem;
}

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

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: #fff;
  background: rgba(2, 132, 199, 0.9);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

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

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  padding: 12px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(30, 41, 59, 0.75);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.73), rgba(2, 6, 23, 0.46)),
    radial-gradient(circle at 72% 28%, rgba(14, 165, 233, 0.18), transparent 34rem);
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 1.2s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.76);
}

.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-items: center;
  pointer-events: none;
}

.hero-copy {
  width: min(100%, 760px);
  padding: 74px 0 88px;
  pointer-events: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 13px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 999px;
  color: var(--frost-400);
  background: rgba(2, 132, 199, 0.14);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero h1,
.hero h2,
.compact-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--ice-50);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1,
.hero h2 {
  font-size: clamp(2.4rem, 6vw, 5.6rem);
}

.hero h1 span,
.hero h2 span,
.gradient-text {
  background: linear-gradient(135deg, var(--frost-400), var(--glacier-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--ice-300);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--ice-400);
  font-size: 0.88rem;
}

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

.hero-meta span,
.card-meta span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--frost-600), var(--glacier-600));
  box-shadow: 0 14px 32px rgba(2, 132, 199, 0.32);
}

.btn-ghost {
  color: var(--ice-200);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.64);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.hero-search {
  display: flex;
  align-items: center;
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
}

.hero-search input,
.search-box input,
.year-filter {
  border: 0;
  outline: 0;
  color: var(--ice-50);
  background: transparent;
}

.hero-search input,
.search-box input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
}

.hero-search button,
.search-clear {
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--frost-600);
  padding: 11px 16px;
  font-weight: 700;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: max(16px, calc((100vw - 1280px) / 2 + 16px));
  bottom: 44px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.category-strip a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ice-300);
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.category-strip a:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.42);
}

.page-main {
  padding: 48px 0 78px;
}

.section {
  margin-top: 62px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--ice-400);
}

.section-more {
  color: var(--frost-400);
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow-ice);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

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

.movie-card.hidden {
  display: none;
}

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

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent);
}

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.score {
  right: 10px;
  bottom: 10px;
  min-width: 46px;
  height: 30px;
  color: var(--ice-950);
  background: var(--gold);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 38px;
  height: 30px;
  color: #fff;
  background: rgba(2, 132, 199, 0.92);
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  min-height: 214px;
  padding: 16px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: var(--ice-50);
  font-size: 1.05rem;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--ice-400);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 14px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ice-300);
  background: rgba(30, 41, 59, 0.86);
  font-size: 0.78rem;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 30px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
}

.year-filter {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
}

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

.category-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 132, 199, 0.16)),
    radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.22), transparent 52%);
  box-shadow: var(--shadow-ice);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.category-card p {
  margin: 0;
  color: var(--ice-300);
}

.category-card span {
  display: inline-flex;
  margin-top: 20px;
  color: var(--frost-400);
  font-weight: 800;
}

.compact-hero {
  padding: 58px 0 36px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.75);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.82)),
    radial-gradient(circle at 78% 24%, rgba(14, 165, 233, 0.18), transparent 28rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ice-400);
  font-size: 0.9rem;
}

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

.compact-hero h1,
.detail-title h1 {
  font-size: clamp(2.1rem, 4vw, 4.1rem);
}

.compact-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--ice-300);
  font-size: 1.08rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--frost-600), var(--glacier-600));
  font-weight: 900;
}

.rank-cover img {
  width: 112px;
  height: 150px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-content h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.rank-content p {
  margin: 10px 0 0;
  color: var(--ice-400);
}

.rank-action {
  white-space: nowrap;
}

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

.player-card,
.info-card,
.related-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow-ice);
}

.player-shell {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.6), rgba(2, 6, 23, 0.28));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--frost-600), var(--glacier-600));
  box-shadow: 0 18px 42px rgba(2, 132, 199, 0.44);
  font-size: 2.1rem;
  transition: transform 0.25s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.detail-title,
.info-card,
.related-card {
  padding: 24px;
}

.detail-title p {
  margin: 14px 0 0;
  color: var(--ice-300);
  font-size: 1.04rem;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: var(--ice-900);
}

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

.info-card h2,
.related-card h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.info-card p {
  margin: 0;
  color: var(--ice-300);
  white-space: pre-line;
}

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

.info-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.info-list small {
  display: block;
  margin-bottom: 5px;
  color: var(--ice-500);
}

.info-list strong {
  color: var(--ice-200);
}

.related-card {
  margin-top: 24px;
}

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

.site-footer {
  padding: 44px 0 22px;
  border-top: 1px solid rgba(30, 41, 59, 0.85);
  background: rgba(2, 6, 23, 0.94);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.footer-brand p {
  max-width: 440px;
  margin: 18px 0 0;
  color: var(--ice-400);
}

.footer-links {
  display: grid;
  gap: 9px;
  align-content: start;
}

.footer-links h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.footer-links a {
  color: var(--ice-400);
}

.footer-links a:hover {
  color: var(--frost-400);
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(30, 41, 59, 0.72);
  color: var(--ice-500);
}

.empty-state {
  display: none;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  color: var(--ice-300);
  background: rgba(15, 23, 42, 0.84);
  text-align: center;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .site-nav {
    min-height: 66px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-search,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

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

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

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

  .rank-item {
    grid-template-columns: 48px 86px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-cover img {
    width: 86px;
    height: 116px;
  }

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

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

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

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

  .brand-copy small {
    display: none;
  }

  .hero h1,
  .hero h2,
  .compact-hero h1,
  .detail-title h1 {
    font-size: 2.15rem;
  }

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

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