:root {
  --bg: #050505;
  --bg-soft: #111827;
  --bg-card: rgba(17, 24, 39, 0.76);
  --text: #f9fafb;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.1);
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --danger: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  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:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.2), transparent 34rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.15), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #050505 38%, #0b0b0b 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.35);
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #d1d5db;
  font-size: 0.95rem;
}

.nav a {
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--gold-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  position: relative;
  width: 230px;
}

.header-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border-radius: 999px;
  padding: 12px 16px;
}

.header-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  border-radius: 14px;
  padding: 10px 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-position: center;
  background-size: cover;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.2) 58%, rgba(2, 6, 23, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 390px;
  align-items: center;
  gap: 42px;
  min-height: 680px;
  padding: 80px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--gold-2);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero h1 {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 1.08rem;
  line-height: 1.8;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f3f4f6;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(245, 158, 11, 0.34);
}

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 24, 39, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

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

.hero-card-body {
  position: absolute;
  inset: auto 18px 18px 18px;
  border-radius: 22px;
  padding: 16px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--gold-2);
}

.section {
  padding: 64px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #111827;
}

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

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

.rating {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #111827;
  background: var(--gold-2);
  font-weight: 900;
  font-size: 0.8rem;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
}

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

.category-card {
  display: block;
  min-height: 184px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent),
    rgba(17, 24, 39, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.48);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr 0.8fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.62);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: rgba(17, 24, 39, 0.72);
}

.rank-num {
  color: var(--gold-2);
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 72px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-main strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.rank-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.breadcrumb {
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #d1d5db;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
  padding: 44px 0 30px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.detail-main h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-main .lead {
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 1.08rem;
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.info-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.info-box span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.info-box strong {
  font-size: 0.98rem;
}

.player-section {
  padding: 28px 0 64px;
}

.player-shell {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: #000;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 18rem),
    rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.play-button {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-size: 2rem;
  box-shadow: 0 18px 60px rgba(245, 158, 11, 0.4);
}

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

.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(17, 24, 39, 0.68);
}

.content-card h2 {
  margin: 0 0 14px;
}

.content-card p {
  color: #d1d5db;
  line-height: 1.9;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  padding: 42px 0;
  color: var(--muted);
}

.footer-inner h3,
.footer-inner h4 {
  color: var(--text);
  margin: 0 0 12px;
}

.footer-inner p,
.footer-inner li {
  line-height: 1.75;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 0 24px;
  color: var(--muted);
}

.empty-state {
  display: none;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

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

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

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

  .hero-card {
    max-width: 380px;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .nav.mobile-open {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .category-grid,
  .search-panel,
  .info-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 60px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-card {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

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

  .movie-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .section {
    padding: 46px 0;
  }

  .hero h1 {
    font-size: 2.7rem;
  }
}
