:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #9333ea);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

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

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

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #60a5fa;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.top-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 9px 12px;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.top-search button {
  border: 0;
  color: #ffffff;
  background: var(--primary);
  padding: 9px 14px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(37, 99, 235, 0.36), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.1) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding: 110px 0 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 12px;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--primary);
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-actions,
.detail-actions,
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.32);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.quick-search-section {
  position: relative;
  z-index: 8;
  margin-top: -50px;
}

.quick-search-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-card h2,
.section-title-row h2,
.page-hero h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

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

.quick-search-form input,
.search-panel input,
.filter-input-wrap input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: #ffffff;
  padding: 0 14px;
}

.quick-search-form button,
.search-panel button {
  min-width: 118px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--primary);
  cursor: pointer;
}

.section-wrap {
  padding: 72px 0 0;
}

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

.section-title-row h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-title-row a,
.text-link {
  color: var(--primary);
  font-weight: 700;
}

.section-title-row.light,
.section-title-row.light a {
  color: #ffffff;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img,
.rank-poster img,
.detail-poster img,
.category-card img,
.category-overview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.category-card img,
.rank-poster img {
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.rank-card:hover .rank-poster img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent);
}

.poster-year {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 700;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.movie-card h3,
.rank-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover {
  color: var(--primary);
}

.movie-card p,
.rank-content p,
.category-overview-body p,
.page-hero p,
.content-card p,
.side-card dd,
.site-footer p {
  color: var(--muted);
}

.movie-card p {
  min-height: 68px;
  margin: 0 0 14px;
  font-size: 14px;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.soft-panel {
  width: min(1180px, calc(100% - 32px));
  margin-top: 72px;
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #f1f5f9, #eff6ff);
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.18));
}

.category-card strong,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-card strong {
  bottom: 54px;
  font-size: 20px;
  font-style: normal;
}

.category-card em {
  bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

.editorial-panel {
  width: min(1180px, calc(100% - 32px));
  margin-top: 72px;
  margin-bottom: 72px;
  padding: 36px;
  border-radius: 30px;
  background: linear-gradient(135deg, #0f172a, #1e293b 54%, #111827);
  box-shadow: var(--shadow);
}

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

.movie-card-large .poster-link {
  aspect-ratio: 16 / 10;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 16% 20%, rgba(37, 99, 235, 0.42), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b 52%, #111827);
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0;
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(34px, 6vw, 62px);
}

.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.filter-panel {
  align-items: center;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.filter-input-wrap {
  flex: 1 1 auto;
}

.filter-panel select {
  width: 160px;
}

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

.category-overview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.category-overview-media {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 180px;
  overflow: hidden;
  background: #0f172a;
}

.category-overview-body {
  padding: 22px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
}

.category-overview-body p {
  margin: 0 0 14px;
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.rank-card {
  display: grid;
  grid-template-columns: 100px 72px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 15px;
  background: #0f172a;
}

.rank-number {
  font-size: 34px;
  font-weight: 900;
  color: #cbd5e1;
}

.rank-content h3 {
  font-size: 22px;
}

.rank-content p {
  margin: 0 0 12px;
}

.rank-score {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(18px);
  transform: scale(1.08);
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.4), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  font-size: 13px;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.player-section,
.content-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.player-section {
  padding: 20px;
}

.section-title-row.compact {
  margin-bottom: 18px;
}

.section-title-row.compact h2 {
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #020617;
}

.site-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.42);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-start span {
  display: inline-block;
  margin-left: 5px;
  font-size: 32px;
}

.player-start:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  color: #ffffff;
  font-size: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.content-card,
.side-card {
  padding: 24px;
}

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

.content-card p {
  margin: 0;
  font-size: 16px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--text);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
}

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

.site-footer {
  margin-top: 84px;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  max-width: 560px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.64);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-content: start;
}

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

.hidden {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

  .top-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 820px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .top-search {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 96px;
  }

  .quick-search-card {
    grid-template-columns: 1fr;
  }

  .quick-search-form,
  .search-panel,
  .filter-panel,
  .footer-inner,
  .section-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-panel select {
    width: 100%;
  }

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

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

  .detail-poster {
    max-width: 240px;
  }

  .rank-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .rank-number {
    grid-column: 1 / -1;
    font-size: 24px;
  }
}

@media (max-width: 540px) {
  .movie-grid,
  .archive-grid,
  .large-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-controls {
    bottom: 20px;
  }

  .soft-panel,
  .editorial-panel {
    padding: 22px;
  }

  .category-overview-media {
    height: 150px;
  }

  .player-start {
    width: 68px;
    height: 68px;
  }
}
