:root {
  --color-bg: #0a0e1a;
  --color-bg-soft: #111827;
  --color-panel: rgba(255, 255, 255, 0.05);
  --color-panel-strong: rgba(255, 255, 255, 0.08);
  --color-border: rgba(255, 255, 255, 0.10);
  --color-border-strong: rgba(34, 211, 238, 0.45);
  --color-text: #e5e7eb;
  --color-muted: #9ca3af;
  --color-faint: #6b7280;
  --color-cyan: #22d3ee;
  --color-blue: #2563eb;
  --color-teal: #14b8a6;
  --shadow-card: 0 25px 50px rgba(0, 0, 0, 0.25);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--color-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 18% 6%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #0a0e1a 0%, #0f172a 42%, #0a0e1a 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

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

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

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--color-cyan);
  background: rgba(34, 211, 238, 0.10);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 8px 12px;
  color: #ffffff;
  background: var(--color-panel);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.96);
}

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

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.96) 0%, rgba(10, 14, 26, 0.62) 44%, rgba(10, 14, 26, 0.12) 100%),
    linear-gradient(0deg, #0a0e1a 0%, rgba(10, 14, 26, 0.30) 42%, transparent 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2));
  bottom: 12%;
  width: min(680px, calc(100% - 48px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: var(--color-cyan);
  background: rgba(34, 211, 238, 0.12);
  font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 640px;
  margin: 0;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
}

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

.btn-primary,
.btn-ghost,
.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.btn-primary {
  padding: 12px 24px;
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.30);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-small:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  padding: 11px 22px;
  color: #ffffff;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.08);
}

.btn-small {
  padding: 9px 14px;
  color: var(--color-cyan);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.10);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1240px) / 2));
  bottom: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.main-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.section {
  margin-bottom: 72px;
}

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

.section-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 10px 0 0;
  color: var(--color-muted);
}

.gradient-text {
  background: linear-gradient(90deg, var(--color-cyan), #3b82f6, var(--color-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-link,
.category-card,
.info-panel,
.filter-panel,
.rank-panel,
.detail-panel,
.player-shell {
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.movie-link:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--color-border-strong);
  background: var(--color-panel-strong);
  box-shadow: var(--shadow-card);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.16));
}

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

.movie-link:hover .poster-wrap img {
  transform: scale(1.08);
  filter: brightness(0.78);
}

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--color-cyan);
  background: rgba(10, 14, 26, 0.76);
  font-size: 12px;
}

.poster-play {
  position: absolute;
  inset: auto 12px 12px auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-link:hover .poster-play {
  opacity: 1;
  transform: scale(1);
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-faint);
  font-size: 12px;
}

.movie-info h3 {
  margin: 8px 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-link:hover .movie-info h3 {
  color: var(--color-cyan);
}

.movie-info p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--color-cyan);
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.18);
  font-size: 12px;
}

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

.category-card {
  min-height: 156px;
  padding: 22px;
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-border-strong);
  background: var(--color-panel-strong);
}

.category-card strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 8px;
}

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

.page-hero {
  padding: 64px 0 24px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius-md);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--color-muted);
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(10, 14, 26, 0.72);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-border-strong);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 24px;
}

.rank-panel {
  border-radius: var(--radius-lg);
  padding: 22px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 42px 68px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  border-color: var(--color-border-strong);
  background: rgba(255, 255, 255, 0.08);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-weight: 800;
}

.rank-card img {
  width: 68px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  display: grid;
  gap: 6px;
}

.rank-copy strong {
  color: #ffffff;
}

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

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

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

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

.detail-title {
  display: grid;
  gap: 14px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(10, 14, 26, 0.66));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.38);
  cursor: pointer;
}

.play-button span {
  margin-left: 5px;
  font-size: 30px;
}

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

.detail-panel {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.detail-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 24px;
}

.detail-panel p {
  color: #d1d5db;
  margin: 0 0 16px;
}

.info-table {
  display: grid;
  gap: 12px;
}

.info-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  color: var(--color-muted);
}

.info-row strong {
  color: #ffffff;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.hidden-by-filter {
  display: none !important;
}

.empty-filter {
  display: none;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-muted);
  text-align: center;
  background: var(--color-panel);
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  background: rgba(10, 14, 26, 0.70);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.5fr 0.75fr 0.75fr;
  gap: 34px;
}

.footer-grid p,
.footer-grid a {
  color: var(--color-muted);
}

.footer-grid a {
  display: block;
  margin: 7px 0;
  transition: color 0.2s ease;
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--color-faint);
  font-size: 14px;
}

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

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

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

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 74vh;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, #0a0e1a 0%, rgba(10, 14, 26, 0.64) 62%, rgba(10, 14, 26, 0.28) 100%);
  }

  .hero-content {
    bottom: 96px;
  }

  .hero-dots {
    right: auto;
    left: 24px;
    bottom: 38px;
  }

  .section-head {
    display: grid;
  }

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

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

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

  .movie-info {
    padding: 13px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .rank-card {
    grid-template-columns: 34px 58px 1fr;
  }

  .rank-card img {
    width: 58px;
    height: 80px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .nav-shell,
  .main-shell,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1240px);
  }
}
