:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #f97316;
  --accent-2: #f59e0b;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #111827, #020617);
}

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

button,
input {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.36);
}

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

.nav-links a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search,
.hero-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.hero-search input,
.search-page-form input,
.filter-bar input {
  color: #fff;
  border: 1px solid var(--border);
  outline: none;
  background: rgba(15, 23, 42, 0.76);
  border-radius: 999px;
}

.nav-search input {
  width: 210px;
  padding: 10px 14px;
}

.nav-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  cursor: pointer;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.25);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: #fff;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 43%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 52%, rgba(2, 6, 23, 0.22) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 70px;
  width: min(760px, calc(100% - 48px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: #fed7aa;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  color: #fff;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  text-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

.hero p {
  width: min(680px, 100%);
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.85;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.34);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 44px;
  display: flex;
  gap: 8px;
}

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

.hero-dots button.active {
  width: 34px;
  background: var(--accent-2);
}

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

.quick-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: -34px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.quick-panel p {
  margin: 0;
  color: var(--muted);
}

.hero-search input,
.search-page-form input {
  min-width: min(420px, 60vw);
  padding: 14px 18px;
}

.hero-search button,
.search-page-form button {
  padding: 14px 20px;
}

.chip-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip-row a {
  white-space: nowrap;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #fed7aa;
  background: var(--accent-soft);
}

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

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

.section-head.compact {
  display: block;
}

.section-head span {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  letter-spacing: -0.03em;
}

.section-head a,
.filter-bar a {
  color: #fed7aa;
  font-weight: 700;
}

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

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.62);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.84) 100%);
  opacity: 0.74;
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.movie-info {
  display: block;
  padding: 15px;
}

.movie-info strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info strong {
  color: #fed7aa;
}

.movie-info em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.88rem;
}

.movie-info small {
  display: -webkit-box;
  min-height: 42px;
  margin-top: 9px;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 0.86rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  padding: 4px 8px;
  color: #cbd5e1;
  font-size: 0.76rem;
}

.tag-row.large span {
  padding: 7px 12px;
  color: #fed7aa;
  background: var(--accent-soft);
}

.glow-section {
  position: relative;
}

.wide-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.wide-card {
  flex: 0 0 260px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.wide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.62);
}

.wide-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.wide-card span {
  display: block;
  padding: 14px;
}

.wide-card strong,
.wide-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wide-card em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
}

.rank-list,
.category-grid,
.ranking-grid,
.story-card,
.search-results {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
}

.rank-list {
  overflow: hidden;
}

.rank-item {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-num {
  color: #fed7aa;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.rank-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

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

.category-card {
  display: block;
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(15, 23, 42, 0.46)),
    rgba(2, 6, 23, 0.46);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.56);
}

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

.category-card span {
  display: block;
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 0.92rem;
}

.page-main {
  padding-bottom: 80px;
}

.page-hero {
  padding: 70px 0 20px;
}

.page-hero.slim h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.page-hero p {
  width: min(760px, 100%);
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.85;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.filter-bar input {
  width: min(420px, 72vw);
  padding: 12px 16px;
}

.ranking-grid {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.ranking-card {
  display: grid;
  grid-template-columns: 58px 104px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.ranking-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ranking-card:last-child {
  border-bottom: 0;
}

.ranking-index {
  color: #fed7aa;
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.ranking-card img {
  width: 104px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-body strong,
.ranking-body em,
.ranking-body small {
  display: block;
}

.ranking-body strong {
  font-size: 1.15rem;
}

.ranking-body em {
  margin: 6px 0 8px;
  color: var(--muted);
  font-style: normal;
}

.ranking-body small {
  color: #cbd5e1;
  line-height: 1.6;
}

.detail-main {
  padding: 28px 0 80px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin: 18px 0 24px;
}

.breadcrumb a {
  color: #fed7aa;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: stretch;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #fff;
  background:
    radial-gradient(circle, rgba(249, 115, 22, 0.22), rgba(0, 0, 0, 0.5) 58%, rgba(0, 0, 0, 0.72));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.38);
}

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

.detail-intro {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-intro h1 {
  font-size: clamp(2rem, 4vw, 3.7rem);
}

.lead {
  color: #dbeafe;
  line-height: 1.85;
  font-size: 1.06rem;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.story-card {
  padding: 28px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.story-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.95;
}

.search-page-form {
  margin-top: 24px;
}

.search-status {
  margin-bottom: 18px;
  color: var(--muted);
}

.search-results {
  min-height: 140px;
  padding: 16px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.search-result-card:last-child {
  border-bottom: 0;
}

.search-result-card img {
  width: 104px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

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

.search-result-card em {
  margin: 7px 0;
  color: var(--muted);
  font-style: normal;
}

.search-result-card span {
  color: #cbd5e1;
  line-height: 1.7;
}

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

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

.footer-inner p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 14px;
  color: #fed7aa;
  font-weight: 700;
}

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

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

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

  .nav-search {
    display: none;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 64px;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-strong);
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-meta span {
    font-size: 0.86rem;
  }

  .hero-dots {
    left: 24px;
    right: auto;
  }

  .quick-panel {
    grid-template-columns: 1fr;
    margin-top: -22px;
  }

  .hero-search,
  .search-page-form {
    width: 100%;
  }

  .hero-search input,
  .search-page-form input {
    min-width: 0;
    width: 100%;
  }

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

  .section-head {
    display: block;
  }

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

  .rank-meta {
    grid-column: 2;
  }

  .ranking-card,
  .search-result-card {
    grid-template-columns: 82px 1fr;
  }

  .ranking-card img,
  .search-result-card img {
    width: 82px;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner p,
  .footer-links {
    margin-top: 16px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.dense,
  .movie-grid.related,
  .category-grid,
  .category-grid.small {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    display: block;
  }

  .filter-bar a {
    display: inline-block;
    margin-top: 14px;
  }

  .hero-actions,
  .footer-links {
    flex-direction: column;
    align-items: stretch;
  }
}
