:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #b45309;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.sr-only {
  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: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  color: #111827;
  font-size: 16px;
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.35);
}

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

.desktop-nav a,
.mobile-panel a,
.footer-inner nav a {
  color: var(--muted);
  font-weight: 700;
  transition: color 180ms ease, transform 180ms ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-inner nav a:hover {
  color: var(--accent-light);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
}

.header-search input,
.mobile-panel input,
.search-page-input input,
.filter-bar input {
  width: 220px;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
}

.header-search input::placeholder,
.mobile-panel input::placeholder,
.search-page-input input::placeholder,
.filter-bar input::placeholder {
  color: var(--subtle);
}

.header-search button,
.mobile-panel button,
.search-page-input button,
.filter-button,
.primary-button,
.secondary-button,
.player-start {
  border-radius: 13px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.header-search button {
  padding: 9px 14px;
}

.header-search button:hover,
.mobile-panel button:hover,
.search-page-input button:hover,
.filter-button:hover,
.primary-button:hover,
.secondary-button:hover,
.player-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.26);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 13px;
  background: rgba(30, 41, 59, 0.85);
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

.mobile-panel {
  display: none;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.9);
}

.mobile-panel input {
  width: 100%;
}

.mobile-panel button {
  padding: 8px 14px;
}

main {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  width: 100%;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: saturate(1.2) contrast(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 43%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 54px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.category-pill,
.corner-badge,
.score-badge,
.tag-row span,
.info-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-meta span,
.detail-meta span,
.info-chip {
  padding: 8px 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.84);
  border: 1px solid var(--line);
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

.secondary-button {
  color: var(--text);
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line);
}

.hero-poster {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.28), transparent 18rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.hero-poster::after,
.poster-wrap::after,
.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.72));
  pointer-events: none;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  width: min(1320px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-control {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  cursor: pointer;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.48);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--accent-light);
}

.section,
.category-page,
.detail-page,
.search-page {
  padding: 54px 0 0;
}

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

.section-heading h2,
.category-header h1,
.detail-info h1,
.search-page h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading p,
.category-header p,
.search-page p,
.detail-info p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  color: var(--accent-light);
  font-weight: 900;
  white-space: nowrap;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.poster-wrap,
.detail-cover,
.related-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(245, 158, 11, 0.25), transparent 12rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

.poster-wrap {
  aspect-ratio: 2 / 3;
}

.poster-wrap img,
.related-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease, opacity 180ms ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.04);
}

.corner-badge,
.score-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  font-size: 12px;
}

.corner-badge {
  left: 10px;
  top: 10px;
  color: #111827;
  background: var(--accent-light);
}

.score-badge {
  right: 10px;
  bottom: 10px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid var(--line);
}

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

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

.movie-card h3 a:hover {
  color: var(--accent-light);
}

.movie-meta {
  margin: 7px 0 0;
  color: var(--subtle);
  font-size: 13px;
}

.movie-line {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.tag-row span {
  padding: 4px 8px;
  color: var(--subtle);
  background: rgba(30, 41, 59, 0.78);
  font-size: 12px;
}

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

.category-tile,
.panel,
.filter-bar,
.search-box,
.no-results {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.20);
}

.category-tile {
  position: relative;
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -90px -90px auto auto;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.category-tile a {
  position: relative;
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent-light);
  font-weight: 900;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.54);
}

.rank-item span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #111827;
  background: var(--accent-light);
  font-weight: 900;
}

.rank-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em {
  color: var(--accent-light);
  font-style: normal;
  font-weight: 900;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 26px 0;
  padding: 14px;
}

.filter-bar input {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
}

.filter-button {
  padding: 10px 14px;
}

.filter-button.is-active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.category-header,
.search-hero {
  padding: 56px 0 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 26px 0 0;
  color: var(--subtle);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.breadcrumb b {
  color: rgba(148, 163, 184, 0.42);
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: start;
  padding: 34px 0 0;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info {
  min-width: 0;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-meta {
  margin-top: 18px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.panel {
  padding: 26px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding-top: 28px;
}

.stack {
  display: grid;
  gap: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  font-size: 18px;
  z-index: 3;
}

.player-start:hover {
  transform: translate(-50%, calc(-50% - 1px));
}

.player-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.22);
}

.video-shell.is-playing .player-start,
.video-shell.is-ready .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.related-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.32);
  border: 1px solid var(--line);
}

.related-card:hover {
  border-color: rgba(245, 158, 11, 0.54);
}

.related-cover {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
}

.related-card h3 {
  margin: 0;
  font-size: 15px;
}

.related-card p {
  margin: 6px 0 0;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.5;
}

.search-box {
  padding: 24px;
}

.search-page-input {
  display: flex;
  gap: 10px;
}

.search-page-input input {
  flex: 1;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.44);
  border: 1px solid var(--line);
}

.search-page-input button {
  padding: 0 22px;
}

.search-summary {
  color: var(--muted);
  margin: 18px 0 0;
}

.no-results {
  padding: 46px;
  text-align: center;
  color: var(--muted);
}

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

.footer-inner {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.footer-inner p {
  max-width: 620px;
  color: var(--subtle);
  line-height: 1.75;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

@media (max-width: 1120px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner,
  main,
  .hero-content,
  .hero-controls,
  .footer-inner,
  .mobile-panel {
    width: min(100% - 24px, 1320px);
  }

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-content {
    padding: 54px 0 84px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: clamp(36px, 13vw, 58px);
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

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

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

  .movie-line {
    display: none;
  }

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

  .rank-item {
    grid-template-columns: 40px 1fr auto;
    padding: 10px;
  }

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

  .detail-cover {
    width: min(260px, 80vw);
  }

  .panel {
    padding: 18px;
  }

  .player-start {
    width: calc(100% - 48px);
    justify-content: center;
    padding: 14px 18px;
  }

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

  .footer-inner nav {
    justify-content: flex-start;
  }
}
