:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #ea580c;
  --accent: #eab308;
  --dark: #0f172a;
  --dark-soft: #334155;
  --muted: #64748b;
  --line: #e5e7eb;
  --surface: #ffffff;
  --page: #f9fafb;
  --radius: 18px;
  --shadow-soft: 0 2px 15px rgba(15, 23, 42, 0.06);
  --shadow-medium: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-hard: 0 20px 55px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--dark);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.section-container {
  width: min(1280px, 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(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-soft);
  font-size: 15px;
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

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

.nav-link,
.mobile-nav-link {
  color: #334155;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary);
}

.header-search {
  position: relative;
  width: min(280px, 28vw);
}

.header-search input,
.catalog-filter input,
.catalog-filter select,
.search-hero input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  color: var(--dark);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.catalog-filter input:focus,
.catalog-filter select:focus,
.search-hero input:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 88vw);
  max-height: 460px;
  overflow: auto;
  display: none;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-hard);
}

.search-panel.is-open {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: #f1f5f9;
}

.search-result-item img {
  width: 58px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
}

.search-result-item strong,
.search-result-item span {
  display: block;
}

.search-result-item span {
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--dark-soft);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 0;
}

.mobile-nav-link {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.hero-section {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.68) 44%, rgba(15, 23, 42, 0.14)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  color: #fff;
  padding: 72px 0 90px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
  font-weight: 700;
  font-size: 14px;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: var(--primary-dark);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  color: #fff;
  background: var(--secondary);
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.22);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-1px);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 16px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.hero-quick {
  position: absolute;
  z-index: 3;
  right: max(32px, calc((100vw - 1280px) / 2));
  bottom: 72px;
  width: min(390px, 34vw);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.54);
  color: #fff;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-hard);
}

.hero-quick h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.quick-grid a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
  transition: background 0.2s ease;
}

.quick-grid a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.section.warm {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin: 10px 0 0;
  max-width: 780px;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img,
.compact-card:hover img {
  transform: scale(1.05);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.02) 58%);
}

.movie-score,
.movie-type {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.movie-score {
  left: 10px;
  background: var(--secondary);
}

.movie-type {
  right: 10px;
  background: rgba(15, 23, 42, 0.72);
}

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

.movie-card h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--primary);
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin-top: 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

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

.category-card {
  display: block;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-weight: 900;
}

.rank-item img {
  width: 86px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy h2,
.rank-copy h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  color: var(--secondary);
  font-size: 22px;
  font-weight: 900;
}

.compact-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}

.compact-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 250px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

.compact-card img {
  width: 74px;
  height: 94px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding: 64px 0 42px;
  background:
    radial-gradient(circle at 18% 10%, rgba(37, 99, 235, 0.16), transparent 26%),
    radial-gradient(circle at 84% 2%, rgba(234, 88, 12, 0.14), transparent 28%),
    #fff;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

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

.catalog-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

.breadcrumb a {
  color: var(--primary);
  font-weight: 700;
}

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

.player-card,
.detail-panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

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

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

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

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

.play-badge {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.34);
  font-size: 34px;
}

.player-copy {
  padding: 22px;
}

.player-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.player-copy p {
  margin: 0;
  color: var(--muted);
}

.detail-panel {
  padding: 20px;
}

.detail-cover {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #0f172a;
}

.detail-meta-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--muted);
}

.detail-meta-list strong {
  color: var(--dark);
}

.article-block {
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-block p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.search-hero {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.search-hero input {
  border-radius: 18px;
  padding: 18px 20px;
  font-size: 18px;
}

.site-footer {
  margin-top: 72px;
  padding: 56px 0 24px;
  background: #0f172a;
  color: #cbd5e1;
}

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

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  max-width: 460px;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

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

  .header-search {
    margin-left: auto;
    width: min(320px, 38vw);
  }

  .menu-toggle {
    display: block;
  }

  .hero-quick {
    display: none;
  }
}

@media (max-width: 820px) {
  .header-inner {
    gap: 12px;
  }

  .brand-text {
    font-size: 18px;
  }

  .header-search {
    display: none;
  }

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

  .hero-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 54px 0;
  }

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

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

  .catalog-filter {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 40px 72px 1fr;
  }

  .rank-score {
    grid-column: 3;
    font-size: 18px;
  }

  .rank-item img {
    width: 72px;
    height: 92px;
  }

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

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

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

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 40px;
  }

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

  .movie-card h2 {
    font-size: 15px;
  }

  .movie-desc {
    display: none;
  }

  .article-block {
    padding: 20px;
  }
}
