:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c31;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --red: #ef4444;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.28);
}

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

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

.nav-link,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  color: var(--soft);
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.nav-dropdown {
  position: relative;
}

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

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--soft);
  border-radius: 10px;
}

.dropdown-menu a:hover {
  color: var(--cyan);
  background: rgba(148, 163, 184, 0.1);
}

.search-form {
  display: flex;
  align-items: center;
  min-width: 0;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.header-search {
  width: min(330px, 32vw);
  margin-left: auto;
}

.search-form input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 12px 10px 16px;
}

.search-form button {
  border: 0;
  color: var(--cyan);
  background: transparent;
  padding: 10px 15px;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  border-radius: 14px;
}

.mobile-panel {
  border-top: 1px solid var(--line);
}

.mobile-panel-inner {
  padding: 16px 0 18px;
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 38%, rgba(34, 211, 238, 0.18), transparent 25%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.6) 45%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.12) 48%, transparent);
}

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

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

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

.hero-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 22px;
  color: var(--soft);
  font-size: 19px;
}

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

.hero-tags span,
.tag-row span {
  padding: 5px 10px;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  box-shadow: 0 18px 42px rgba(8, 145, 178, 0.26);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
}

.text-link {
  min-height: 0;
  padding: 0;
  color: var(--cyan);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  cursor: pointer;
  font-size: 42px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.06);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.section-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.42));
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
}

.intro-strip h2,
.section-heading h2,
.inline-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.14;
}

.intro-strip p:last-child {
  margin: 0;
  color: var(--soft);
  font-size: 17px;
}

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

.section-heading a {
  color: var(--cyan);
  font-weight: 700;
}

.inline-heading {
  align-items: center;
}

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: 0 22px 58px rgba(8, 145, 178, 0.2);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.rank-badge,
.play-pill {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: #111827;
  background: var(--yellow);
}

.play-pill {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

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

.movie-card p {
  min-height: 47px;
  margin: 0 0 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.78));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-glow {
  position: absolute;
  right: -25px;
  top: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.14);
  filter: blur(2px);
}

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

.category-card em {
  position: relative;
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
}

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

.rank-item img {
  width: 76px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.page-hero,
.movie-detail-hero {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.16), transparent 32%),
    radial-gradient(circle at 82% 8%, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(180deg, #0f172a, var(--bg));
}

.small-hero {
  padding: 58px 0 46px;
}

.small-hero h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.small-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
}

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

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-poster-stack img {
  width: 100%;
  aspect-ratio: 1 / 0.74;
  object-fit: cover;
  border-radius: 10px;
}

.category-overview-card h2 {
  margin: 3px 0 8px;
}

.category-overview-card h2 a:hover {
  color: var(--cyan);
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.search-page-form input {
  width: 100%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 12px 14px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-page-form input:focus {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

.search-page-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  max-width: 680px;
  margin-top: 24px;
}

.search-page-form button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

.movie-detail-hero {
  padding: 34px 0 10px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.32));
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  box-shadow: 0 22px 52px rgba(34, 211, 238, 0.28);
  font-size: 30px;
}

.detail-main h1 {
  margin: 26px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

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

.detail-meta span {
  padding: 6px 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.detail-panel,
.aside-card {
  margin-bottom: 18px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-panel h2,
.aside-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.detail-panel p {
  margin: 0;
  color: var(--soft);
}

.detail-tags {
  margin: 22px 0 8px;
}

.detail-aside {
  position: sticky;
  top: 90px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.aside-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.aside-card dt {
  color: var(--muted);
}

.aside-card dd {
  margin: 0;
  color: var(--soft);
}

.aside-card a {
  color: var(--cyan);
}

.ranking-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.ranking-feature {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #0f172a;
}

.ranking-feature img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  opacity: 0.86;
  transition: transform 0.4s ease;
}

.ranking-feature:hover img {
  transform: scale(1.06);
}

.ranking-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 60%);
}

.ranking-feature span,
.ranking-feature strong,
.ranking-feature em {
  position: absolute;
  z-index: 2;
  left: 20px;
}

.ranking-feature span {
  top: 18px;
  padding: 4px 10px;
  color: #111827;
  background: var(--yellow);
  border-radius: 999px;
  font-weight: 900;
}

.ranking-feature strong {
  right: 20px;
  bottom: 44px;
  font-size: 24px;
}

.ranking-feature em {
  bottom: 20px;
  color: var(--soft);
  font-style: normal;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr);
  gap: 34px;
  padding: 44px 0;
}

.footer-about p {
  max-width: 560px;
  color: var(--muted);
}

.footer-brand {
  margin-bottom: 12px;
}

.footer-links h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 17px;
}

.footer-links a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

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

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

.is-filtered-out {
  display: none;
}

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

  .detail-layout,
  .split-layout,
  .intro-strip {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
  }

  .rank-list.wide {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

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

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

  .hero-control {
    width: 40px;
    height: 40px;
    font-size: 34px;
  }

  .hero-control.prev {
    left: 12px;
  }

  .hero-control.next {
    right: 12px;
  }

  .movie-grid,
  .category-grid,
  .category-grid.compact,
  .category-overview-grid,
  .ranking-feature-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-bar,
  .search-page-form {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero-copy p {
    font-size: 16px;
  }

  .section-block {
    padding: 46px 0;
  }

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

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

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