* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --blue-600: #2563eb;
  --white: #ffffff;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 28px 65px rgba(8, 145, 178, 0.22);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--slate-900);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 48%, #ecfeff 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, #020617 0%, #0f172a 52%, #083344 100%);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.25);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--cyan-400), #60a5fa);
  border-radius: 12px;
  transition: transform 0.35s ease;
}

.brand:hover .brand-mark {
  transform: rotate(12deg) scale(1.06);
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, var(--cyan-400), #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan-400);
  transform: translateY(-1px);
}

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

.nav-search input,
.mobile-menu input,
.search-main input,
.filter-box input {
  border: 0;
  outline: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  padding: 10px 16px;
  min-width: 190px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  transition: box-shadow 0.2s ease, background 0.2s ease, width 0.2s ease;
}

.nav-search input:focus,
.mobile-menu input:focus,
.search-main input:focus,
.filter-box input:focus {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 2px rgba(34, 211, 238, 0.9);
}

.nav-search button,
.mobile-menu button,
.search-main button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #082f49;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan-400), #93c5fd);
  cursor: pointer;
}

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

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

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-menu a {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-menu form {
  display: flex;
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 12% 20%, rgba(34, 211, 238, 0.18), transparent 30%), linear-gradient(135deg, #020617 0%, #0f172a 54%, #164e63 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(255, 255, 255, 0.34) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.45;
}

.hero-glow-one {
  width: 360px;
  height: 360px;
  right: 10%;
  top: 12%;
  background: rgba(34, 211, 238, 0.36);
}

.hero-glow-two {
  width: 260px;
  height: 260px;
  left: 8%;
  bottom: 8%;
  background: rgba(37, 99, 235, 0.28);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.65fr);
  gap: 56px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  color: var(--cyan-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(36px, 5.4vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 700px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

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

.btn {
  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, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.32);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.btn-soft {
  color: #0e7490;
  background: rgba(255, 255, 255, 0.92);
}

.hero-poster {
  position: relative;
  min-height: 430px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.38);
  transform: rotate(1.5deg);
  isolation: isolate;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.88) 100%);
  z-index: 1;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-poster-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-poster-info strong {
  display: block;
  font-size: 26px;
  margin-bottom: 8px;
}

.hero-poster-info span {
  color: #bae6fd;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

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

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

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

.stats-band {
  margin-top: -42px;
  position: relative;
  z-index: 3;
}

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

.stat-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 26px;
  color: var(--slate-900);
}

.stat-card span {
  color: var(--slate-600);
}

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

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

.section-head h2,
.panel-head h2,
.content-card h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--slate-600);
}

.section-more,
.panel-head a {
  color: var(--cyan-600);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--cyan-600));
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.50));
}

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(6, 182, 212, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(15, 23, 42, 0.88);
}

.card-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--cyan-600);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card a:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--slate-600);
  line-height: 1.65;
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

.card-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--slate-100);
}

.category-section {
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
}

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

.category-tile,
.category-card-large a {
  display: block;
  height: 100%;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.category-tile span,
.category-card-large h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--slate-900);
  font-weight: 900;
}

.category-tile p,
.category-card-large p,
.category-card-large span {
  color: var(--slate-600);
  line-height: 1.7;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

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

.ranking-panel,
.content-card {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #ecfeff;
  transform: translateX(4px);
}

.rank-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  font-weight: 900;
}

.rank-row img {
  width: 66px;
  height: 46px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--slate-200);
}

.rank-text {
  min-width: 0;
}

.rank-text strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  display: block;
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
  margin-top: 3px;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.22), transparent 30%), linear-gradient(135deg, #020617, #0f172a 58%, #164e63);
}

.compact-hero {
  padding: 76px 0;
}

.page-hero h1,
.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.5vw, 58px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.page-hero p,
.detail-line {
  max-width: 820px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: #bae6fd;
  font-size: 14px;
}

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

.filter-box {
  margin-top: 26px;
}

.filter-box input,
.search-main input {
  width: min(560px, 100%);
  min-height: 50px;
  color: var(--white);
}

.search-main {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.search-main button {
  min-height: 50px;
  padding: 0 26px;
}

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

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

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

.search-summary {
  margin-bottom: 22px;
  color: var(--slate-600);
  font-weight: 700;
}

.detail-hero {
  padding: 62px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 36px 88px rgba(0, 0, 0, 0.34);
  background: var(--slate-800);
}

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

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dff7ff;
  background: rgba(255, 255, 255, 0.10);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 36px 90px rgba(2, 6, 23, 0.28);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
}

.player-play-button {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-play-button span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #083344;
  background: var(--white);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  font-size: 32px;
}

.player-play-button strong {
  font-size: 20px;
}

.player-shell.is-playing .player-play-button {
  opacity: 0;
  pointer-events: none;
}

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

.content-card {
  padding: 28px;
}

.content-card p {
  color: var(--slate-700);
  line-height: 1.95;
  font-size: 16px;
}

.content-card dl {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.content-card dt {
  color: var(--slate-500);
}

.content-card dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 700;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #020617, #0f172a 55%, #083344);
}

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

.footer-brand {
  color: var(--white);
  font-size: 24px;
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: #94a3b8;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

  .nav-search {
    margin-left: auto;
  }

  .hero-slide,
  .detail-grid,
  .two-column,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    gap: 28px;
    padding: 44px 0 86px;
  }

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

  .hero-poster {
    min-height: 360px;
  }

  .stats-grid,
  .movie-grid,
  .category-movie-grid,
  .ranking-grid,
  .related-grid,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-search {
    order: 3;
    width: 100%;
  }

  .nav-search input {
    flex: 1;
    min-width: 0;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-poster {
    min-height: 310px;
  }

  .hero-actions,
  .mobile-menu form,
  .search-main {
    flex-direction: column;
  }

  .btn,
  .search-main button,
  .mobile-menu button {
    width: 100%;
  }

  .stats-grid,
  .movie-grid,
  .featured-grid,
  .mini-grid,
  .category-grid,
  .category-overview-grid,
  .wide-rank-list,
  .category-movie-grid,
  .ranking-grid,
  .related-grid,
  .search-results,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-grid {
    gap: 24px;
  }

  .detail-cover {
    max-width: 280px;
  }

  .content-card dl {
    grid-template-columns: 1fr;
  }
}
