
:root {
  color-scheme: dark;
  --night-950: #071829;
  --night-900: #102a43;
  --night-850: #17324d;
  --night-800: #243b53;
  --night-700: #334e68;
  --night-600: #486581;
  --text-main: #f3f4f6;
  --text-muted: #b6c2d1;
  --text-soft: #8fa3b9;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --card: rgba(36, 59, 83, 0.72);
  --card-strong: rgba(36, 59, 83, 0.94);
  --border: rgba(255, 255, 255, 0.08);
  --shadow-night: 0 18px 48px rgba(0, 0, 0, 0.34);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.12), transparent 28rem),
    radial-gradient(circle at 92% 4%, rgba(87, 120, 255, 0.14), transparent 30rem),
    var(--night-900);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 42, 67, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #fff;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.32);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: color 0.25s ease, background 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  padding: 0 20px 20px;
  gap: 10px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  isolation: isolate;
  background: var(--night-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease;
}

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

.hero-slide::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 24, 41, 0.95) 0%, rgba(16, 42, 67, 0.8) 44%, rgba(16, 42, 67, 0.2) 100%),
    linear-gradient(0deg, var(--night-900) 0%, rgba(16, 42, 67, 0) 34%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
  gap: 48px;
  align-items: center;
  padding: 104px 0 84px;
}

.hero-kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--text-soft);
}

.hero-meta span,
.detail-meta span,
.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.24);
}

.btn-primary:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.36);
}

.btn-secondary,
.btn-ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  gap: 12px;
  max-width: 640px;
  margin-top: 30px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(7, 24, 41, 0.62);
  box-shadow: var(--shadow-night);
}

.hero-search input,
.search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-search input {
  min-height: 46px;
  padding: 0 16px;
}

.hero-search input::placeholder,
.search-panel input::placeholder {
  color: rgba(214, 226, 240, 0.72);
}

.hero-poster {
  align-self: center;
  border-radius: 28px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-night);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: var(--amber);
}

.main-content {
  padding: 54px 0 80px;
}

.content-section {
  margin-top: 62px;
}

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

.section-heading h2,
.page-title,
.detail-title {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-more {
  color: #fcd34d;
  font-weight: 800;
}

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

.movie-card,
.category-card,
.info-panel,
.search-panel,
.player-shell,
.detail-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.05);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(0deg, rgba(7, 24, 41, 0.9), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: var(--amber);
  color: #fff;
}

.rank-badge {
  left: 12px;
  top: 12px;
  padding: 7px 10px;
  background: rgba(7, 24, 41, 0.78);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

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

.movie-card h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.28;
}

.movie-card h3 a:hover {
  color: #fcd34d;
}

.movie-card p {
  min-height: 48px;
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.card-tags span,
.detail-tags span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #dbeafe;
  font-size: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 42px;
  padding: 84px 0 74px;
  background-position: center;
  background-size: cover;
}

.page-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 24, 41, 0.92), rgba(16, 42, 67, 0.72)),
    linear-gradient(0deg, var(--night-900), rgba(16, 42, 67, 0));
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero p {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 18px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: 26px;
  display: flex;
  align-items: end;
  background-position: center;
  background-size: cover;
}

.category-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(7, 24, 41, 0.92), rgba(7, 24, 41, 0.26));
}

.category-card > div {
  position: relative;
  z-index: 2;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.category-card p {
  max-width: 620px;
  margin: 0 0 18px;
  color: var(--text-muted);
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
}

.search-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px;
}

.search-panel input {
  min-height: 50px;
  padding: 0 16px;
}

.search-panel .btn-primary {
  white-space: nowrap;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 86px 118px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.rank-number {
  color: #fcd34d;
  font-size: 28px;
  font-weight: 900;
}

.rank-item img {
  width: 118px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.rank-item p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--text-soft);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fcd34d;
}

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

.player-shell {
  overflow: hidden;
  margin-bottom: 24px;
  background: #000;
}

.movie-player {
  position: relative;
  background: #000;
}

.movie-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18));
  color: #fff;
  cursor: pointer;
  z-index: 3;
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay span {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 34px;
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.45);
  transition: transform 0.25s ease;
}

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

.detail-panel {
  padding: 26px;
}

.detail-title {
  margin-bottom: 18px;
}

.detail-panel h2,
.info-panel h2 {
  margin: 28px 0 12px;
  color: #fff;
  font-size: 24px;
}

.detail-panel p,
.info-panel p {
  margin: 0;
  color: var(--text-muted);
}

.info-panel {
  padding: 22px;
}

.info-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 18px;
}

.info-list {
  display: grid;
  gap: 10px;
  color: var(--text-muted);
}

.info-list strong {
  color: #fff;
}

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

.compact-card .movie-card-body {
  padding: 13px;
}

.compact-card h3 {
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(7, 24, 41, 0.82);
  padding: 48px 0 24px;
}

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

.footer-grid p,
.footer-bottom {
  color: var(--text-soft);
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
}

.footer-bottom {
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
}

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

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

  .hero-poster {
    display: none;
  }

  .rank-list,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  body.menu-open .mobile-nav {
    display: grid;
  }

  .hero-carousel {
    min-height: 86vh;
  }

  .hero-inner {
    padding: 82px 0 78px;
  }

  .hero-search,
  .search-panel {
    flex-direction: column;
  }

  .hero-search .btn-primary,
  .search-panel .btn-primary {
    width: 100%;
  }

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

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

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

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

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

  .rank-item img {
    width: 90px;
  }

  .rank-number {
    font-size: 22px;
  }

  .detail-panel,
  .info-panel {
    padding: 18px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 240px;
    padding: 20px;
  }
}
