* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #0f172a;
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.22);
  --emerald: #34d399;
  --cyan: #22d3ee;
  --rose: #fb7185;
  --amber: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.3);
}

.header-inner,
.shell,
.footer-inner,
.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(45, 212, 191, 0.28);
  font-size: 14px;
}

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link,
.dropdown-panel a {
  color: var(--soft);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border: 0;
  background: transparent;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(52, 211, 153, 0.12);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 180px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
}

.dropdown-panel a:hover {
  background: rgba(51, 65, 85, 0.72);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  color: white;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: 0;
}

.header-search input {
  width: 190px;
  padding: 10px 14px;
  border-radius: 999px;
}

.header-search button,
.mobile-search button,
.filter-panel button {
  border: 0;
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  padding: 10px 15px;
  border-radius: 999px;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  color: white;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.mobile-search {
  margin-top: 10px;
}

.mobile-search input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
}

.hero-wrap {
  position: relative;
  min-height: 740px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.25), transparent 30rem),
    radial-gradient(circle at 30% 80%, rgba(52, 211, 153, 0.22), transparent 28rem);
}

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

.eyebrow,
.section-title span,
.page-hero span,
.detail-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--emerald);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy p {
  margin: 0;
  max-width: 700px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.88;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
}

.hero-actions,
.center-actions,
.small-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

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

.primary-btn {
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 32px rgba(45, 212, 191, 0.24);
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.56);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 900;
}

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

.hero-prev,
.hero-next,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.66);
  color: white;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.active {
  width: 34px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.section {
  padding: 72px 0;
}

.section-title {
  margin-bottom: 28px;
}

.section-title h2,
.page-hero h1,
.detail-info h1,
.story-card h2,
.side-card h2 {
  margin: 12px 0 0;
  letter-spacing: -0.04em;
}

.section-title h2,
.page-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(52, 211, 153, 0.42);
  box-shadow: 0 22px 50px rgba(16, 185, 129, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.76));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  padding: 7px 11px;
  font-size: 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 12px 28px rgba(251, 113, 133, 0.32);
}

.card-body {
  padding: 18px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--emerald);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--soft);
  line-height: 1.65;
  font-size: 14px;
}

.compact-card .card-body p {
  min-height: auto;
}

.category-band {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.96)),
    radial-gradient(circle at center, rgba(16, 185, 129, 0.2), transparent 40rem);
  border-block: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  mix-blend-mode: screen;
}

.tile-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile em {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.grad-rose { background: linear-gradient(135deg, #fb7185, #a855f7); }
.grad-violet { background: linear-gradient(135deg, #8b5cf6, #3b82f6); }
.grad-cyan { background: linear-gradient(135deg, #06b6d4, #14b8a6); }
.grad-amber { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.grad-emerald { background: linear-gradient(135deg, #10b981, #22d3ee); }
.grad-pink { background: linear-gradient(135deg, #ec4899, #f97316); }
.grad-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.grad-indigo { background: linear-gradient(135deg, #4f46e5, #a855f7); }
.grad-orange { background: linear-gradient(135deg, #f97316, #facc15); }
.grad-lime { background: linear-gradient(135deg, #65a30d, #14b8a6); }

.two-column-layout,
.rank-page-grid,
.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.story-card,
.side-card,
.filter-panel,
.player-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.ranking-panel,
.story-card,
.side-card {
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.58);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(51, 65, 85, 0.86);
  transform: translateX(3px);
}

.rank-num {
  color: var(--amber);
  font-weight: 900;
}

.rank-item img {
  width: 52px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-text {
  min-width: 0;
}

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

.rank-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  margin-top: 5px;
}

.center-actions {
  justify-content: center;
  margin-top: 30px;
}

.strong {
  border-color: rgba(52, 211, 153, 0.42);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 98px 0 70px;
  background:
    radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.12), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero p {
  max-width: 760px;
  color: var(--soft);
  line-height: 1.85;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 150px auto auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 14px;
}

.filter-panel button {
  min-height: 44px;
}

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

.sticky-panel {
  position: sticky;
  top: 92px;
}

.detail-top {
  position: relative;
  overflow: hidden;
  padding: 42px 0 70px;
  min-height: 560px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.08);
  transform: scale(1.1);
  opacity: 0.34;
}

.detail-top::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.7), #020617);
}

.detail-shell {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 32px;
}

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

.detail-main {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  width: 300px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-info h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
}

.detail-line {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.82;
  max-width: 820px;
}

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

.detail-meta span {
  color: white;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
}

.jump-player {
  margin-top: 24px;
}

.content-main h2 {
  margin-top: 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 22px;
  background: black;
}

.player-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.24), rgba(2, 6, 23, 0.66));
  border: 0;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 18px 42px rgba(45, 212, 191, 0.35);
  font-size: 28px;
  padding-left: 4px;
}

.story-card {
  line-height: 1.9;
  color: var(--soft);
}

.story-card h2,
.side-card h2 {
  color: white;
  font-size: 24px;
  margin-bottom: 12px;
}

.side-card + .side-card {
  margin-top: 18px;
}

.side-tags {
  margin-top: 12px;
}

.no-results {
  grid-column: 1 / -1;
  color: var(--soft);
  text-align: center;
  padding: 38px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 20px;
}

.site-footer {
  margin-top: 60px;
  background: rgba(2, 6, 23, 0.86);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0;
}

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

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

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

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

.footer-bottom {
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px 0;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .four-col,
  .large-categories,
  .category-grid,
  .rank-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .ranking-panel,
  .sticky-panel {
    position: static;
  }
}

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

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

  .mobile-nav.open {
    display: block;
  }

  .hero-wrap,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 52px;
  }

  .hero-poster {
    display: none;
  }

  .three-col,
  .four-col,
  .category-grid,
  .large-categories,
  .rank-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .detail-poster {
    width: min(260px, 100%);
  }

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

@media (max-width: 560px) {
  .header-inner,
  .shell,
  .footer-inner,
  .footer-bottom,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-copy h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

  .three-col,
  .four-col,
  .category-grid,
  .large-categories,
  .rank-cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }

  .page-hero {
    padding: 72px 0 52px;
  }

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