:root {
  --bg: #07111f;
  --bg-soft: #0f1c31;
  --bg-card: rgba(15, 30, 52, 0.72);
  --line: rgba(34, 211, 238, 0.22);
  --line-strong: rgba(34, 211, 238, 0.44);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #1d4ed8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    linear-gradient(135deg, #07111f 0%, #0f2144 45%, #07111f 100%);
}

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

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

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 17, 31, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-text {
  font-size: 1.38rem;
  letter-spacing: 0.03em;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 30, 52, 0.8);
  color: white;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 17, 31, 0.96);
}

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

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-category-links a {
  padding: 10px;
  border-radius: 12px;
  color: var(--muted-soft);
  background: rgba(15, 30, 52, 0.56);
}

.hero {
  position: relative;
}

.hero-stage {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.96), rgba(7, 17, 31, 0.72) 48%, rgba(7, 17, 31, 0.08)),
    linear-gradient(0deg, rgba(7, 17, 31, 0.92), transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: none;
}

.hero-content > * {
  max-width: 680px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  backdrop-filter: blur(12px);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 20px 0 0;
  color: var(--muted-soft);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 26px 0 34px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted-soft);
  background: rgba(15, 30, 52, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

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

.ghost-button {
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  background: rgba(15, 30, 52, 0.64);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: rgba(7, 17, 31, 0.72);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 2.3rem;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

.section-heading h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.section-heading h2::before {
  content: "";
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: var(--cyan);
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
  backdrop-filter: blur(16px);
}

.movie-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 22px 56px rgba(34, 211, 238, 0.18);
}

.card-poster {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.movie-card-large .card-poster {
  height: 420px;
}

.card-poster img,
.ranking-thumb img,
.detail-poster img,
.detail-backdrop img,
.category-cover-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card:hover .card-poster img,
.ranking-item:hover .ranking-thumb img {
  transform: scale(1.08);
}

.card-poster img,
.ranking-thumb img {
  transition: transform 0.45s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 17, 31, 0.9), rgba(7, 17, 31, 0.1));
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: rgba(34, 211, 238, 0.88);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-year {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(7, 17, 31, 0.72);
  font-size: 0.8rem;
  font-weight: 800;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  color: white;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body em {
  min-height: 3.2em;
  color: var(--muted);
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.6;
}

.card-meta {
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
}

.card-meta span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 24px;
  align-items: stretch;
}

.stacked-list,
.ranking-list {
  display: grid;
  gap: 14px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 30, 52, 0.62);
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
  border-color: var(--line-strong);
  background: rgba(15, 30, 52, 0.82);
  transform: translateX(3px);
}

.ranking-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  font-weight: 900;
}

.ranking-thumb {
  height: 76px;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.ranking-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.ranking-copy strong,
.ranking-copy em,
.ranking-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy strong {
  color: white;
}

.ranking-copy em {
  color: var(--muted-soft);
  font-style: normal;
  font-size: 0.92rem;
}

.ranking-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.category-tile,
.category-panel-link {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.1)),
    rgba(15, 30, 52, 0.6);
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-tile:hover,
.category-panel-link:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.category-tile span,
.category-panel-body span {
  color: var(--cyan);
  font-weight: 800;
}

.category-tile strong,
.category-panel-body h2 {
  margin: 0;
  font-size: 1.35rem;
  color: white;
}

.category-tile em,
.category-panel-body p {
  margin: 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

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

.category-panel-link {
  min-height: auto;
  padding: 0;
  overflow: hidden;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 150px;
  background: #0f172a;
}

.category-panel-body {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(90deg, rgba(7, 17, 31, 1), rgba(30, 58, 138, 0.45), rgba(7, 17, 31, 1));
}

.small-hero {
  padding: 74px 0;
}

.page-hero h1 {
  max-width: 880px;
  margin-bottom: 18px;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted-soft);
  line-height: 1.8;
  font-size: 1.08rem;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 680px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.7);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 18px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box button {
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
  font-weight: 800;
}

.search-status {
  margin-bottom: 22px;
  color: var(--muted-soft);
  font-weight: 700;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  filter: blur(8px);
  transform: scale(1.05);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.98), rgba(7, 17, 31, 0.72)),
    linear-gradient(0deg, #07111f, transparent 44%);
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  height: 450px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-copy {
  display: grid;
  gap: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-one-line {
  margin: 0;
  color: var(--muted-soft);
  font-size: 1.18rem;
  line-height: 1.75;
}

.detail-meta {
  gap: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
  cursor: pointer;
}

.player-cover[hidden] {
  display: none;
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.9);
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.28);
  font-size: 2rem;
  transform: translateX(3px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-cover:hover span {
  background: var(--cyan);
  transform: translateX(3px) scale(1.06);
}

.detail-text {
  display: grid;
  gap: 18px;
}

.detail-text h2 {
  margin: 0;
  font-size: 1.7rem;
}

.detail-text p {
  margin: 0;
  color: var(--muted-soft);
  line-height: 1.95;
  font-size: 1.03rem;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 30, 52, 0.56);
}

.center-actions {
  justify-content: center;
  margin-top: 28px;
}

.site-footer {
  margin-top: 82px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(180px, 0.5fr));
  gap: 36px;
}

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-logo {
  font-size: 1.25rem;
}

.footer-group h2 {
  margin: 0 0 16px;
  font-size: 1rem;
}

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

.footer-group a {
  color: var(--muted);
}

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

.footer-bottom {
  padding: 18px 16px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-grid,
  .ranking-list.two-columns {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-stage {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

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

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

  .detail-poster {
    width: min(310px, 100%);
    height: 430px;
  }

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

@media (max-width: 560px) {
  .container,
  .header-inner,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .hero-stage {
    height: 520px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.35rem;
  }

  .hero p,
  .page-hero p,
  .detail-one-line {
    font-size: 1rem;
  }

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

  .ranking-item {
    grid-template-columns: 44px 88px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .ranking-thumb {
    height: 66px;
  }

  .card-poster {
    height: 280px;
  }

  .search-box {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .search-box input {
    min-height: 44px;
  }

  .player-cover span {
    width: 68px;
    height: 68px;
  }
}
