:root {
  color-scheme: dark;
  --bg: #0b1018;
  --panel: #111827;
  --panel-soft: #172033;
  --card: #141c2b;
  --card-hover: #1f2937;
  --line: #263244;
  --text: #f8fafc;
  --muted: #aeb8ca;
  --soft: #7b879d;
  --accent: #facc15;
  --accent-strong: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  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(250, 204, 21, 0.10), transparent 28rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 26rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 24, 39, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand:hover,
.footer-brand:hover {
  color: var(--accent);
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: 11px;
  box-shadow: 0 12px 25px rgba(250, 204, 21, 0.22);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

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

.nav-link {
  color: #cbd5e1;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

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

.nav-search {
  width: 250px;
  position: relative;
  flex: 0 0 auto;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #7b879d;
}

.search-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.nav-search input,
.search-panel input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
  height: 42px;
  padding: 0 14px 0 42px;
}

.nav-search input:focus,
.search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(250, 204, 21, 0.7);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
  background: rgba(15, 23, 42, 1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 99px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-slide img.is-missing {
  opacity: 0;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(11, 16, 24, 0.96) 0%, rgba(11, 16, 24, 0.88) 42%, rgba(11, 16, 24, 0.34) 72%, rgba(11, 16, 24, 0.75) 100%),
    radial-gradient(circle at 72% 45%, rgba(250, 204, 21, 0.18), transparent 24rem);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 72px 0 80px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 18px;
  max-width: 780px;
  color: #ffffff;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-desc {
  max-width: 720px;
  color: #dbe4f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 36px rgba(250, 204, 21, 0.22);
}

.btn-ghost {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-poster img {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
  background: linear-gradient(135deg, #1f2937, #0f172a);
}

.hero-poster .poster-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.poster-caption strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.poster-caption span {
  color: #cbd5e1;
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--accent);
}

.main-section,
.page-hero,
.content-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.main-section {
  padding: 64px 0;
}

.page-hero {
  padding: 64px 0 32px;
}

.page-hero.compact {
  padding-bottom: 8px;
}

.page-hero h1,
.section-title h2,
.detail-title h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.page-hero p,
.section-title p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

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

.section-link {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.category-strip a,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  color: #dbe4f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  font-weight: 750;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-strip a:hover,
.filter-chip:hover,
.filter-chip.is-active {
  color: #111827;
  background: var(--accent);
  transform: translateY(-1px);
}

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

.movie-card {
  min-width: 0;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.74), rgba(17, 24, 39, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.20);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, 0.45);
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.35);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #0f172a);
}

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

.poster-frame img.is-missing {
  opacity: 0;
}

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

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

.type-badge,
.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

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

.score-badge {
  right: 10px;
  bottom: 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.88);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

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

.movie-meta,
.movie-line,
.card-desc,
.detail-meta {
  color: var(--muted);
}

.movie-meta {
  margin: 0 0 10px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-line {
  min-height: 44px;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.14), transparent 45%),
    linear-gradient(180deg, rgba(31, 41, 55, 0.82), rgba(17, 24, 39, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.42);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 27px;
  line-height: 1.18;
  font-weight: 900;
}

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

.category-card span {
  color: var(--accent);
  font-weight: 850;
}

.filter-panel,
.search-panel {
  margin: 30px 0 28px;
  padding: 22px;
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

.filter-panel input,
.filter-panel select,
.search-panel input {
  min-height: 48px;
  padding: 0 16px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip {
  border: 0;
  cursor: pointer;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(250, 204, 21, 0.4);
}

.rank-num {
  color: var(--accent);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.rank-thumb {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #1f2937;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body h2,
.rank-body h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.rank-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-score {
  color: #111827;
  background: var(--accent);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 22px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  overflow: hidden;
  background: #1f2937;
  box-shadow: var(--shadow);
}

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

.detail-title h1 {
  margin-bottom: 16px;
}

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

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

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.11);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-intro {
  margin: 0;
  max-width: 860px;
  color: #dbe4f0;
  font-size: 18px;
  line-height: 1.8;
}

.player-section {
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #111827;
  background:
    radial-gradient(circle at center, rgba(250, 204, 21, 0.28), transparent 16rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.66));
  border: 0;
  cursor: pointer;
  z-index: 4;
}

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

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 950;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.play-overlay svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
}

.article-box,
.side-box {
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  padding: 26px;
}

.article-box h2,
.side-box h2 {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 900;
}

.article-box p {
  margin: 0 0 18px;
  color: #d4deec;
  font-size: 17px;
  line-height: 1.9;
}

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

.related-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 70px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #1f2937;
}

.related-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.empty-state {
  padding: 42px;
  color: var(--muted);
  text-align: center;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(10, 15, 24, 0.94);
}

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

.footer-inner p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-links a {
  color: #cbd5e1;
  font-weight: 750;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 1180px) {
  .nav-menu {
    gap: 0;
  }

  .nav-link {
    padding: 10px 9px;
  }

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

@media (max-width: 980px) {
  .nav-wrap {
    min-height: 66px;
    justify-content: space-between;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

  .nav-search {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    max-width: 320px;
  }

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

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

  .detail-hero {
    grid-template-columns: 220px minmax(0, 1fr);
  }

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

@media (max-width: 720px) {
  .hero,
  .hero-inner {
    min-height: 660px;
  }

  .hero-inner {
    padding: 48px 0 74px;
  }

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

  .section-title {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 14px;
  }

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

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

  .rank-item {
    grid-template-columns: 46px 74px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

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

  .detail-cover {
    width: min(270px, 76vw);
  }

  .article-box,
  .side-box {
    padding: 20px;
  }

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

@media (max-width: 420px) {
  .movie-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

  .brand,
  .footer-brand {
    font-size: 19px;
  }
}
