:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --deep: #020617;
  --slate: #0f172a;
  --gold: #facc15;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem), var(--bg);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 50%;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.96rem;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--cyan);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
  background: var(--deep);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(15, 23, 42, 0.18) 100%),
    radial-gradient(circle at 24% 18%, rgba(34, 211, 238, 0.3), transparent 30rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 70vh;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 340px;
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
}

.hero-copy p {
  max-width: 740px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  color: #0e7490;
  background: #ecfeff;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

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

.btn,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary,
.quick-search button {
  color: #001018;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.25);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--slate);
}

.btn:hover,
.quick-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  min-height: 46px;
  color: #001018;
  font-weight: 900;
  background: rgba(34, 211, 238, 0.92);
  border-radius: 999px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

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

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

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

.hero-dots button {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--cyan);
}

.quick-panel {
  position: relative;
  z-index: 5;
  margin-top: -34px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.filter-bar select {
  max-width: 180px;
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-cats a {
  padding: 8px 13px;
  color: var(--muted);
  background: var(--panel-soft);
  border-radius: 999px;
  font-weight: 700;
}

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

.page-hero {
  margin-bottom: 30px;
  padding: 42px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 15%, rgba(34, 211, 238, 0.24), transparent 26rem),
    linear-gradient(135deg, #020617, #0f172a 54%, #1e293b);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.small-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

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

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

.section-head h2,
.side-panel h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.18;
}

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

.section-more {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.14);
}

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

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

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

.score,
.rank-no {
  position: absolute;
  top: 12px;
  z-index: 2;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #001018;
  background: var(--gold);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
}

.score {
  right: 12px;
}

.rank-no {
  left: 12px;
  background: var(--cyan);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 3.15em;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
}

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

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

.category-tile {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.07);
}

.category-tile.large {
  padding: 24px;
}

.category-title {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 900;
}

.category-tile p {
  margin: 0 0 14px;
  color: var(--muted);
}

.category-tile div a {
  display: block;
  margin-top: 6px;
  color: var(--blue);
  font-weight: 700;
}

.tile-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.tile-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

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

.rank-item,
.side-rank {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.rank-item span,
.side-rank span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #001018;
  background: var(--cyan);
  font-weight: 900;
}

.rank-item strong,
.side-rank strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em,
.side-rank em {
  color: #ca8a04;
  font-style: normal;
  font-weight: 900;
}

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

.breadcrumb a {
  color: var(--blue);
  font-weight: 800;
}

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

.detail-card,
.side-panel {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  background: #000000;
}

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

.player-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.16));
  cursor: pointer;
}

.player-button span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding-left: 6px;
  color: #001018;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  border-radius: 50%;
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.32);
  font-size: 2rem;
}

.player-shell.is-playing .player-button {
  display: none;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.detail-meta,
.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span,
.info-grid span {
  padding: 8px 12px;
  color: #0e7490;
  background: #ecfeff;
  border-radius: 999px;
  font-weight: 800;
}

.lead {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 700;
}

.detail-content p {
  color: #334155;
  font-size: 1rem;
}

.large-tags {
  margin: 16px 0 24px;
}

.side-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

.side-panel h2 {
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.side-rank {
  margin-top: 10px;
  box-shadow: none;
}

.site-footer {
  padding: 38px 0;
  color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(90deg, #020617, #0f172a);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid strong {
  color: #ffffff;
  font-size: 1.15rem;
}

.footer-grid p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 1060px) {
  .main-nav {
    gap: 14px;
    font-size: 0.9rem;
  }

  .hero-content {
    grid-template-columns: 1fr 260px;
    gap: 32px;
  }

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: auto;
    min-height: 62px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0 6px;
  }

  .main-nav.open {
    display: flex;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    height: auto;
    min-height: 760px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: 78px 0 86px;
  }

  .hero-poster {
    width: min(280px, 72vw);
    transform: none;
  }

  .hero-control {
    display: none;
  }

  .quick-search,
  .filter-bar,
  .footer-grid,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar select {
    max-width: none;
  }

  .movie-grid,
  .wide-grid,
  .category-showcase,
  .category-showcase.wide,
  .rank-strip {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 28px;
    border-radius: 24px;
  }

  .detail-content {
    padding: 22px;
  }
}

@media (min-width: 761px) and (max-width: 1060px) {
  .rank-strip {
    grid-template-columns: 1fr;
  }
}
