:root {
  --page-bg: #f5f7fb;
  --text-main: #111827;
  --text-soft: #6b7280;
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-blue: #2563eb;
  --dark: #0f172a;
  --card-bg: #ffffff;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-main);
  background: var(--page-bg);
}

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;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #111827;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.34);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  color: #374151;
}

.nav-links a:hover {
  color: var(--brand);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 100%);
}

.header-search input,
.search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  outline: none;
  background: #fff;
  color: #111827;
}

.header-search input:focus,
.search-panel input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

button,
.btn {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.btn-primary {
  color: #fff;
  background: var(--brand);
  padding: 11px 16px;
}

.btn-primary:hover,
.header-search button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  background: #111827;
  color: #fff;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.hero-slide {
  display: none;
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  display: block;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.52) 48%, rgba(3, 7, 18, 0.18));
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 560px;
  align-items: center;
  padding: 70px 0;
}

.hero-content {
  max-width: 720px;
}

.hero-kicker,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(17, 24, 39, 0.70);
  border: 1px solid rgba(251, 191, 36, 0.28);
  padding: 7px 12px;
  font-weight: 800;
  font-size: 14px;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -1.5px;
}

.hero-text {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

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

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

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

.main-section {
  padding: 56px 0;
}

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

.section-head h2,
.page-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.8px;
}

.section-head p,
.lead {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #111827);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #f97316, #2563eb);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.58));
}

.card-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.78);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  min-height: 44px;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
}

.card-meta {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.info-card,
.rank-row,
.detail-panel,
.search-panel {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.category-tile {
  padding: 22px;
}

.category-tile h3 {
  margin: 0 0 9px;
}

.category-tile p {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.7;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 84px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
}

.rank-number {
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-poster {
  width: 84px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(249, 115, 22, 0.32), transparent 30%),
    linear-gradient(135deg, #111827, #1e3a8a 58%, #7c2d12);
  padding: 64px 0;
}

.breadcrumb {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  margin-bottom: 18px;
}

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

.detail-hero {
  color: #fff;
  background: #111827;
  padding: 46px 0 64px;
}

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

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

.player-wrap video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.play-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(3, 7, 18, 0.56), rgba(3, 7, 18, 0.86));
}

.play-overlay span {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.36);
  font-size: 34px;
}

.player-title {
  padding: 20px 22px;
}

.player-title h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 46px);
}

.player-title p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.8;
}

.side-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.side-info {
  padding: 20px;
  color: #111827;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span,
.tag-link {
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
}

.detail-panel {
  padding: 28px;
  line-height: 1.9;
}

.detail-panel h2 {
  margin: 0 0 14px;
}

.detail-panel p {
  margin: 0 0 16px;
  color: #374151;
}

.search-panel {
  padding: 24px;
  margin-bottom: 28px;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.site-footer {
  margin-top: 56px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

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

.site-footer p,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.8;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0;
  color: #94a3b8;
}

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

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

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

@media (max-width: 780px) {
  .nav-wrap {
    flex-wrap: wrap;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links,
  .header-search {
    display: none;
    width: 100%;
  }

  .nav-links.open,
  .header-search.open {
    display: flex;
  }

  .nav-links.open {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 12px;
  }

  .hero,
  .hero-inner {
    min-height: 520px;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 68px 1fr;
  }

  .rank-row .btn {
    grid-column: 2 / 4;
    justify-content: center;
    text-align: center;
  }

  .search-panel form {
    flex-direction: column;
  }
}
