:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --yellow: #facc15;
  --red: #ef4444;
  --shadow: 0 18px 48px rgba(8, 145, 178, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-size: 14px;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.45);
}

.brand-text,
.footer-brand {
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: #e2e8f0;
}

.desktop-nav a,
.nav-dropdown > button {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 20px 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% - 6px);
  left: -18px;
  min-width: 168px;
  padding: 8px;
  background: #1e293b;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 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: 9px 12px;
  border-radius: 8px;
}

.dropdown-panel a:hover {
  background: #334155;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: min(270px, 28vw);
}

.search-form input {
  width: 100%;
  border: 1px solid transparent;
  outline: 0;
  color: white;
  background: #1e293b;
  border-radius: 999px;
  padding: 10px 44px 10px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.search-form button {
  position: absolute;
  right: 7px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--cyan);
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: white;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 18px;
  background: #0f172a;
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: #e2e8f0;
}

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

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

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 76px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  max-width: 760px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-tags span,
.tag-pill,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #a5f3fc;
  font-size: 13px;
}

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

.btn {
  background: var(--cyan);
  color: #06202a;
  box-shadow: 0 14px 38px rgba(34, 211, 238, 0.28);
}

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

.btn:hover {
  background: #67e8f9;
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.36);
}

.btn-soft {
  color: #cffafe;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: white;
  font-size: 30px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.78);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.content-section,
.page-section {
  padding: 70px 0;
}

.section-dark {
  background: #0f172a;
}

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.section-heading p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.24), transparent 34%),
    linear-gradient(135deg, #0f172a, #111827 52%, #083344);
}

.card-large .poster-frame {
  aspect-ratio: 21 / 9;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.poster-summary {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.45;
  transform: translateY(120%);
  transition: transform 0.28s ease;
}

.movie-card:hover .poster-summary {
  transform: translateY(0);
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  color: white;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  display: block;
  padding: 15px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 48px;
  color: white;
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span:first-child {
  padding: 4px 8px;
  border-radius: 7px;
  background: #334155;
  color: var(--cyan);
}

.scroll-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

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

.category-card {
  display: block;
  min-height: 164px;
  padding: 24px;
  border-radius: 16px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: var(--shadow);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
}

.category-card:hover p {
  color: #eff6ff;
}

.feature-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.stack-list {
  display: grid;
  gap: 18px;
}

.mini-card {
  display: flex;
  gap: 14px;
  overflow: hidden;
  border-radius: 14px;
  background: #1e293b;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: #334155;
}

.mini-poster {
  flex: 0 0 132px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

.mini-info {
  display: grid;
  align-content: center;
  padding: 10px 12px 10px 0;
}

.mini-info strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 26px 0 4px;
  color: var(--muted);
  font-size: 14px;
}

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

.breadcrumb .sep {
  color: #64748b;
}

.page-title {
  padding: 26px 0 34px;
}

.filter-bar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0f172a;
}

.filter-bar input {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 12px 16px;
  color: white;
  background: #1e293b;
}

.filter-bar span {
  color: var(--muted);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: #0f172a;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: var(--cyan);
}

.rank-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #1e293b;
}

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

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  padding: 6px 12px;
  border-radius: 999px;
  color: #052e33;
  background: var(--cyan);
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 32px;
  padding: 28px 0 70px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(0, 0, 0, 0.2) 38%, rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.video-player.is-started .play-cover {
  display: none;
}

.play-circle {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.94);
  color: #06202a;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.38);
}

.detail-title {
  margin: 28px 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

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

.info-box {
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 16px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.info-box h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.info-box p {
  margin: 0;
  color: #cbd5e1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.side-panel {
  position: sticky;
  top: 88px;
  padding: 20px;
  border-radius: 16px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.search-hero {
  padding: 70px 0 36px;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.24), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.24), transparent 32%),
    #020617;
}

.search-results-empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0f172a;
}

.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--line);
  background: #0f172a;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  max-width: 560px;
  margin: 10px 0 0;
}

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

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .mobile-panel .mobile-search {
    display: flex;
  }

  .hero {
    height: 580px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

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

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

  .rank-score {
    grid-column: 2 / -1;
    width: max-content;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .hero {
    min-height: 560px;
    height: 70vh;
  }

  .hero-content {
    padding-bottom: 70px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-tags {
    display: none;
  }

  .content-section,
  .page-section {
    padding: 46px 0;
  }

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

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

  .scroll-row .movie-card {
    flex-basis: 84vw;
  }

  .filter-bar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-poster {
    grid-column: 1 / -1;
  }

  .play-circle {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
