:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --brand: #d97706;
  --brand-dark: #b45309;
  --brand-soft: #fff7ed;
  --danger: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #fff7ed 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 300px);
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  color: #4b5563;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brand);
}

.header-search {
  position: relative;
}

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

.header-search input:focus,
.local-filter:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 520px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}

.search-results.is-open {
  display: block;
}

.search-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
}

.search-item:hover {
  background: var(--brand-soft);
}

.search-item img {
  width: 54px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  background: #e5e7eb;
}

.search-item strong {
  display: block;
  color: #111827;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #111827;
  border-radius: 2px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 35%, rgba(245, 158, 11, 0.35), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(15, 23, 42, 0.64) 48%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.58), transparent 44%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100vw - 1280px) / 2 + 24px));
  top: 50%;
  transform: translateY(-50%);
  width: min(650px, calc(100% - 56px));
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  color: #f59e0b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 8px 0 16px;
  font-size: clamp(40px, 8vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 580px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tag-list span {
  display: inline-flex;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  font-size: 13px;
}

.dark-tags span {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.hero-actions,
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.btn.ghost.dark {
  color: #111827;
  background: #ffffff;
  border-color: var(--line);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  background: #f59e0b;
}

.home-search-panel,
.section-block,
.split-section,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.home-search-panel {
  margin-top: -48px;
  position: relative;
  z-index: 5;
  padding-top: 24px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 22px;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-panel h2,
.section-heading h2,
.page-hero h1,
.content-section h2,
.player-section h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

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

.category-chip,
.year-filter button {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: #ffffff;
  color: #4b5563;
  font-weight: 700;
  cursor: pointer;
}

.category-chip:hover,
.year-filter button:hover,
.year-filter button.is-active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.section-block {
  margin-top: 58px;
}

.section-block.no-margin {
  margin: 0;
  padding: 0;
}

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

.section-heading h2,
.home-search-panel h2 {
  font-size: clamp(24px, 3vw, 38px);
}

.section-more,
.text-link {
  color: var(--brand);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

.full-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 64px;
}

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

.movie-card {
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.14);
}

.poster-link,
.ranking-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #e5e7eb);
}

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

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

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

.year-badge,
.heat-badge {
  position: absolute;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.year-badge {
  left: 10px;
  background: rgba(15, 23, 42, 0.66);
}

.heat-badge {
  right: 10px;
  background: rgba(217, 119, 6, 0.88);
}

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

.movie-card h3,
.ranking-card h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-card h2 a:hover {
  color: var(--brand);
}

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

.movie-line {
  margin-top: 8px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 24px;
  margin-top: 58px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 54px 1fr auto;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: #f59e0b;
}

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

.rank-row img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  font-weight: 800;
}

.rank-heat {
  color: var(--muted);
  font-weight: 800;
}

.feature-panel {
  min-height: 100%;
  padding: 32px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.55), transparent 32%),
    linear-gradient(135deg, #111827, #431407);
  box-shadow: var(--shadow);
}

.feature-panel p:not(.section-kicker) {
  color: rgba(255, 255, 255, 0.82);
}

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

.category-card,
.category-overview-card {
  display: block;
  padding: 22px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fff7ed);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.category-card strong,
.category-overview-card span {
  color: var(--brand);
}

.page-main {
  padding-top: 38px;
}

.page-hero {
  margin-bottom: 30px;
  padding: 42px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid rgba(229, 231, 235, 0.88);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
}

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

.category-overview-grid {
  margin-bottom: 64px;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}

.category-preview img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.year-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 64px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 14px;
}

.ranking-poster span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(circle at 90% 16%, rgba(245, 158, 11, 0.4), transparent 28%),
    linear-gradient(135deg, #0f172a, #431407 88%);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.detail-copy h1 {
  margin: 4px 0 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 700px;
  margin: 24px 0 0;
}

.detail-meta div {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-meta dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.detail-meta dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.player-section,
.content-section {
  margin-top: 34px;
  padding: 28px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 26%),
    rgba(2, 6, 23, 0.24);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-size: 34px;
  box-shadow: 0 18px 46px rgba(217, 119, 6, 0.42);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  display: none;
}

.player-status.is-visible {
  display: block;
}

.content-section p {
  margin-bottom: 0;
  color: #374151;
  font-size: 17px;
}

.related-block {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 64px;
}

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: #0f172a;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.1fr 1.6fr;
  gap: 30px;
}

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

.footer-inner p {
  max-width: 460px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: flex-end;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 24px;
  text-align: center;
  color: #9ca3af;
}

.is-hidden-by-filter {
  display: none !important;
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto auto 1fr;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .main-nav a:hover,
  .main-nav a.active {
    background: var(--brand-soft);
  }

  .home-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .split-section,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 280px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .header-search {
    grid-column: 1 / -1;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    top: 54%;
  }

  .hero-control {
    display: none;
  }

  .home-search-panel,
  .filter-bar,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .home-search-panel {
    margin-top: -26px;
  }

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

  .home-grid,
  .full-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero,
  .detail-hero,
  .player-section,
  .content-section {
    padding: 22px;
    border-radius: 22px;
  }

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

  .rank-row {
    grid-template-columns: 30px 46px 1fr;
  }

  .rank-heat {
    display: none;
  }
}

@media (max-width: 460px) {
  .header-inner,
  .home-search-panel,
  .section-block,
  .split-section,
  .page-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-grid,
  .full-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
