:root {
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.88);
  --card-bg: rgba(15, 23, 42, 0.72);
  --card-border: rgba(148, 163, 184, 0.18);
  --soft-border: rgba(34, 211, 238, 0.25);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --accent: #22d3ee;
  --accent-strong: #2563eb;
  --accent-warm: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.25), transparent 34rem),
    radial-gradient(circle at 78% 12%, rgba(34, 211, 238, 0.18), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(18px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #60a5fa 55%, #a78bfa);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.22);
}

.brand-text {
  font-size: 1.18rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 14px;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
}

.header-search input,
.filter-input,
.filter-select {
  color: #ffffff;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.2);
  outline: none;
}

.header-search input {
  width: 190px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
}

.header-search button,
.primary-button,
.secondary-button,
.play-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  color: #03111d;
  font-weight: 800;
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.play-button:hover,
.filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(34, 211, 238, 0.3);
}

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

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
}

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

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.42) 100%),
    radial-gradient(circle at 72% 18%, rgba(34, 211, 238, 0.24), transparent 25rem);
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.9s ease;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  min-height: 680px;
  padding: 78px 0;
}

.hero-kicker,
.section-kicker,
.movie-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: #67e8f9;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
}

.hero h1,
.page-title,
.movie-title {
  margin-top: 20px;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero h1 span,
.gradient-text {
  color: transparent;
  background: linear-gradient(135deg, #22d3ee, #ffffff 46%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead,
.page-lead,
.movie-lead {
  max-width: 760px;
  margin-top: 24px;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta a,
.hero-meta span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

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

.hero-panel {
  align-self: end;
  padding: 18px;
  background: rgba(2, 6, 23, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 24px;
}

.hero-poster::after,
.movie-card-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.78));
}

.hero-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.hero-caption strong {
  display: block;
  font-size: 1.1rem;
}

.hero-caption span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.hero-dot {
  width: 36px;
  height: 6px;
  background: rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: #22d3ee;
}

.main-content {
  padding: 64px 0 84px;
}

.section {
  margin-top: 64px;
}

.section:first-child {
  margin-top: 0;
}

.section-head,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-title,
.page-head h1 {
  margin-top: 12px;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 720px;
  margin-top: 12px;
  color: var(--text-muted);
  line-height: 1.75;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.08)),
    rgba(15, 23, 42, 0.75);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 16px 52px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile::after {
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 126px;
  height: 126px;
  content: "";
  background: radial-gradient(circle, rgba(34, 211, 238, 0.26), transparent 68%);
}

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

.category-tile h3 {
  position: relative;
  z-index: 1;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--card-border);
  border-radius: 22px;
}

.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 15px;
}

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

.movie-card {
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 24px 64px rgba(34, 211, 238, 0.1);
}

.movie-card-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(15, 23, 42, 0.88);
}

.movie-card-poster img {
  transition: transform 0.45s ease;
}

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

.movie-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  padding: 6px 9px;
  color: #001018;
  font-size: 0.78rem;
  font-weight: 900;
  background: linear-gradient(135deg, #22d3ee, #fef08a);
  border-radius: 999px;
}

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

.movie-card h3 {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.3em;
  margin-top: 8px;
  overflow: hidden;
  color: var(--text-muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.card-meta span {
  padding: 4px 8px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 999px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #03111d;
  font-size: 1.1rem;
  font-weight: 950;
  background: linear-gradient(135deg, #facc15, #22d3ee);
  border-radius: 15px;
}

.rank-thumb {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
}

.rank-info h3 {
  font-size: 1rem;
  font-weight: 900;
}

.rank-info p {
  margin-top: 6px;
  color: var(--text-muted);
  line-height: 1.6;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 46px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.18), transparent 23rem),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.16), transparent 25rem);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: #67e8f9;
}

.movie-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 360px;
  gap: 28px;
}

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  min-width: 148px;
  min-height: 52px;
  font-size: 1rem;
}

.player-message {
  padding: 14px 18px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.28);
  border-top: 1px solid rgba(248, 113, 113, 0.18);
}

.player-message:empty {
  display: none;
}

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h2,
.side-card h2 {
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-card p {
  margin-top: 16px;
  color: var(--text-soft);
  line-height: 1.9;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-cloud a,
.tag-cloud span {
  padding: 8px 11px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 999px;
}

.side-card {
  padding: 18px;
}

.side-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  margin-bottom: 16px;
  border-radius: 22px;
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.related-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(2, 6, 23, 0.36);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
}

.related-thumb {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
}

.related-item strong {
  display: block;
  line-height: 1.35;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.empty-state {
  display: none;
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--card-border);
  border-radius: 22px;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  padding: 46px 0;
  color: var(--text-muted);
  background: rgba(2, 6, 23, 0.72);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-title {
  color: #ffffff;
  font-weight: 900;
}

.footer-links {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

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

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

@media (max-width: 920px) {
  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 84px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  body.menu-open .nav-links {
    display: flex;
  }

  .header-search {
    display: none;
  }

  .hero-content,
  .movie-detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    align-self: auto;
  }

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

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

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

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

  .navbar {
    min-height: 66px;
  }

  .brand-text {
    font-size: 1rem;
  }

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

  .hero-content {
    gap: 26px;
    padding: 48px 0 72px;
  }

  .hero-meta,
  .hero-actions,
  .section-head,
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .main-content {
    padding: 42px 0 62px;
  }
}
