:root {
  --bg: #f8fafc;
  --bg-soft: #eef2f7;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --dark: #020617;
  --dark-soft: #0f172a;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.34);
}

.logo-text {
  color: #ffffff;
  font-size: 1.35rem;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #5eead4;
}

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

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
}

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

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.98);
}

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

.page-shell {
  padding: 34px 0 64px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  margin-bottom: 38px;
  border-radius: 36px;
  color: #ffffff;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 560px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.15);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.35), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 50%, rgba(15, 23, 42, 0.35) 100%);
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  max-width: 740px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
}

.hero-summary {
  max-width: 620px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 1.05rem;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tags span {
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(94, 234, 212, 0.22);
}

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

.primary-button,
.ghost-button,
.text-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #2563eb);
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.text-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.5);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  right: 32px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 0;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  opacity: 0.45;
}

.hero-dot.active {
  width: 28px;
  border-radius: 999px;
  background: var(--teal);
  opacity: 1;
}

.hero-category-strip {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: calc(100% - 220px);
}

.hero-category-strip span,
.hero-category-strip a {
  min-height: 32px;
  padding: 6px 12px;
  color: #ccfbf1;
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(94, 234, 212, 0.22);
}

.hero-category-strip a:hover {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.45);
}

.page-hero,
.search-panel,
.section-block,
.detail-main-card,
.detail-side-card,
.category-overview-card {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.page-hero {
  overflow: hidden;
  padding: 56px;
  margin-bottom: 30px;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.18), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.category-hero,
.ranking-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 20%, rgba(34, 211, 238, 0.35), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
}

.compact-hero h1,
.category-hero h1,
.ranking-hero h1 {
  font-size: clamp(2.2rem, 4vw, 4.3rem);
}

.page-hero p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.category-hero p,
.ranking-hero p {
  color: #dbeafe;
}

.search-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: end;
  padding: 26px;
  margin-bottom: 34px;
}

.search-panel h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.15;
}

.search-form {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 14px;
}

.search-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.search-form input,
.search-form select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #f8fafc;
}

.search-form input:focus,
.search-form select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.section-block {
  padding: 28px;
  margin-bottom: 34px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow) {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-button {
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 12px 30px 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(20, 184, 166, 0.42);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
}

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.poster-year {
  right: 12px;
  bottom: 12px;
  background: rgba(2, 6, 23, 0.7);
}

.rank-badge {
  left: 12px;
  top: 12px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.25);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 1.05rem;
  line-height: 1.28;
}

.movie-card h3 a:hover {
  color: var(--teal-dark);
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: #0f766e;
  background: #ccfbf1;
}

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

.category-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.13);
}

.category-thumbs,
.category-visual {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 8px;
  overflow: hidden;
  min-height: 118px;
  border-radius: 18px;
}

.category-thumbs img,
.category-visual img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
}

.category-card strong {
  font-size: 1.16rem;
}

.category-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.category-overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 1.8rem;
}

.category-overview-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-overview-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.category-overview-card li a {
  color: var(--teal-dark);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a {
  color: var(--teal-dark);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  padding: 36px;
  margin-bottom: 30px;
  color: #ffffff;
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.32), transparent 34%),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #115e59 100%);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 26px 56px rgba(2, 6, 23, 0.48);
}

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

.detail-copy {
  align-self: center;
}

.detail-copy h1 {
  font-size: clamp(2.3rem, 5vw, 4.8rem);
}

.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 1.08rem;
}

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

.detail-meta span {
  color: #e0f2fe;
  border: 1px solid rgba(224, 242, 254, 0.22);
  background: rgba(15, 23, 42, 0.46);
}

.large-tags span {
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.22);
}

.player-section {
  margin-bottom: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.28), rgba(2, 6, 23, 0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.45);
}

.player-start span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -18px;
  border-left: 30px solid var(--teal-dark);
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
}

.player-start.is-hidden,
.player-shell.is-playing .player-start {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

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

.detail-main-card,
.detail-side-card {
  padding: 28px;
}

.detail-main-card h2,
.detail-side-card h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}

.detail-main-card p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 1.02rem;
}

.detail-main-card p:last-child {
  margin-bottom: 0;
}

.side-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.side-link:last-child {
  border-bottom: 0;
}

.side-link img {
  width: 72px;
  aspect-ratio: 2 / 2.8;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  line-height: 1.35;
}

.side-link small {
  color: var(--muted);
}

.site-footer {
  padding: 52px 0 28px;
  color: #cbd5e1;
  background: #020617;
}

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

.footer-logo {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 1.35rem;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

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

.site-footer li {
  margin-bottom: 10px;
}

.site-footer a:hover {
  color: #5eead4;
}

.footer-bottom {
  padding-top: 24px;
  margin-top: 34px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 0.92rem;
  }

  .hero-content {
    grid-template-columns: 1fr 280px;
    padding: 48px;
  }

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

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

  .menu-button {
    display: block;
  }

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

  .hero-carousel,
  .hero-track {
    min-height: 690px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 690px;
    padding: 34px;
  }

  .hero-poster {
    width: min(260px, 72vw);
    transform: rotate(0);
  }

  .hero-category-strip {
    display: none;
  }

  .hero-controls {
    right: 22px;
    bottom: 22px;
  }

  .search-panel,
  .search-form,
  .detail-hero,
  .detail-layout,
  .category-overview-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 34px;
  }

  .detail-hero {
    padding: 28px;
  }

  .detail-poster {
    max-width: 300px;
  }

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

@media (max-width: 560px) {
  .container,
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

  .logo-text {
    font-size: 1.05rem;
  }

  .hero-carousel,
  .hero-track {
    min-height: 650px;
    border-radius: 24px;
  }

  .hero-content {
    min-height: 650px;
    padding: 26px;
  }

  .hero-copy h1 {
    font-size: 2.45rem;
  }

  .section-block,
  .search-panel,
  .detail-main-card,
  .detail-side-card {
    padding: 20px;
    border-radius: 22px;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

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

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

  .player-start span {
    width: 72px;
    height: 72px;
  }
}
