* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --pink: #f472b6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.20), transparent 38rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
}

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

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #67e8f9, #38bdf8, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

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

.desktop-nav a,
.nav-dropdown button {
  color: #cbd5e1;
  font: inherit;
  font-weight: 650;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  right: 0;
  top: 34px;
  width: 190px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav-dropdown-menu a:hover {
  background: rgba(34, 211, 238, 0.10);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search input,
.mobile-nav input,
.search-panel input {
  width: 220px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  outline: none;
}

.site-search input:focus,
.mobile-nav input:focus,
.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

.site-search button,
.mobile-nav button,
.primary-button,
.secondary-button,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 15px 38px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary-button {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: none;
}

.site-search button:hover,
.mobile-nav button:hover,
.primary-button:hover,
.secondary-button:hover,
.search-panel button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.26);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav a {
  padding: 10px 0;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.24), transparent 24rem),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 90px;
  max-width: 820px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 18px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.11);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #cffafe, #38bdf8, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(18px, 2.2vw, 24px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

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

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

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

.hero-dots button {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section-shell {
  padding: 58px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-title p,
.category-hero p,
.detail-copy p,
.search-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.horizontal-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 4px 20px;
  scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
  width: 312px;
  min-width: 312px;
  scroll-snap-align: start;
}

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

.movie-card,
.category-tile,
.rank-card,
.index-card,
.detail-panel,
.player-panel,
.search-panel {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.86));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.26), transparent 12rem),
    linear-gradient(135deg, #172554, #0f172a 55%, #111827);
}

.poster-wrap.img-missing::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
}

.movie-poster,
.rank-card img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

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

.poster-badge,
.poster-type {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.poster-badge {
  left: 12px;
}

.poster-type {
  right: 12px;
}

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

.movie-card h3,
.rank-card h3,
.category-tile h2,
.index-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-meta,
.movie-one-line,
.rank-card p,
.index-card p,
.category-tile p {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 14px;
}

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

.category-tile,
.index-card {
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.index-card:hover,
.movie-card:hover,
.rank-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.36);
}

.category-tile strong {
  display: inline-flex;
  margin-top: 14px;
  color: var(--cyan);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-card a {
  display: grid;
  grid-template-columns: 54px 86px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-no {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.rank-card img {
  height: 118px;
  border-radius: 14px;
  background: #172554;
}

.rank-card strong {
  color: #67e8f9;
}

.page-title,
.category-hero,
.search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 42px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 20%, rgba(34, 211, 238, 0.16), transparent 26rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

.category-hero {
  margin-top: 34px;
}

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

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

.breadcrumb a {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  align-items: stretch;
}

.detail-cover {
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.26), transparent 12rem),
    linear-gradient(135deg, #172554, #0f172a 55%, #111827);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

.detail-cover img {
  aspect-ratio: 2 / 3;
}

.detail-copy,
.detail-panel,
.player-panel {
  padding: 30px;
}

.detail-copy {
  min-height: 100%;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 22rem),
    linear-gradient(180deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

.player-panel,
.detail-panel {
  margin-top: 28px;
}

.player-panel h2,
.detail-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.player-frame {
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.42);
}

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

.copy-block {
  color: #cbd5e1;
  white-space: pre-wrap;
}

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

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

.search-panel form {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.search-panel input {
  width: min(520px, 100%);
}

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

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.86);
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 0;
  color: var(--muted);
}

.footer-shell strong {
  color: var(--text);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: #67e8f9;
}

@media (max-width: 1080px) {
  .site-search {
    display: none;
  }

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

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

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

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero {
    min-height: 78vh;
  }

  .movie-grid,
  .rank-list,
  .category-grid,
  .index-grid,
  .related-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .horizontal-scroll .movie-card {
    width: 260px;
    min-width: 260px;
  }

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

  .page-title,
  .category-hero,
  .search-panel,
  .detail-copy,
  .detail-panel,
  .player-panel {
    padding: 24px;
  }

  .search-panel form {
    flex-direction: column;
  }
}
