:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #10b981;
  --accent-2: #22d3ee;
  --danger: #f97316;
  --shadow: 0 25px 80px rgba(2, 6, 23, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.18), transparent 28rem),
    radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.16), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #020617 46%, #0f172a 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  z-index: -1;
}

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

img {
  max-width: 100%;
  display: block;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(34, 211, 238, 0.16));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.3);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #052e1b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
}

.brand-name,
.footer-brand {
  font-size: 1.5rem;
  background: linear-gradient(90deg, #34d399, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active {
  color: #34d399;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(15, 23, 42, 0.68);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: none;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.16)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 44%, rgba(2, 6, 23, 0.38) 100%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 92px;
}

.hero-kicker,
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.hero-kicker span,
.eyebrow span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  background: rgba(16, 185, 129, 0.12);
  color: #bbf7d0;
  padding: 5px 11px;
  font-size: 0.82rem;
  line-height: 1;
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  color: #fff;
  text-shadow: 0 12px 40px rgba(2, 6, 23, 0.7);
}

.hero-content p {
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.8;
  margin: 0 0 28px;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn,
.btn-secondary,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn {
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  color: #022c22;
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.28);
}

.btn:hover,
.btn-secondary:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(226, 232, 240, 0.18);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(2, 6, 23, 0.54);
  backdrop-filter: blur(12px);
}

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

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

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

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

.hero-dot.is-active {
  width: 34px;
  background: #10b981;
}

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

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 28px;
}

.page-hero-card,
.content-section,
.search-panel,
.detail-panel,
.player-section {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.page-hero-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
}

.page-hero-card::after,
.content-section.featured-section::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -28%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 68%);
  pointer-events: none;
}

.page-hero h1,
.page-hero-card h1,
.player-section h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1;
  color: #fff;
  letter-spacing: -0.055em;
}

.page-hero p,
.page-hero-card p {
  max-width: 820px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 1.04rem;
}

.content-section {
  position: relative;
  padding: clamp(22px, 4vw, 42px);
  margin-bottom: 56px;
  overflow: hidden;
}

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

.section-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.section-more {
  color: #34d399;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.42);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(34, 211, 238, 0.15));
}

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

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

.rank-badge,
.list-rank {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.28);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 1.04rem;
  line-height: 1.35;
  color: #fff;
}

.movie-card h3 a:hover {
  color: #34d399;
}

.movie-card p {
  margin: 0 0 14px;
  color: #b6c3d1;
  font-size: 0.92rem;
  line-height: 1.68;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: 28px;
  border: 1px solid var(--line);
  padding: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.7rem;
}

.category-card p {
  margin: 0 0 24px;
  max-width: 520px;
  color: #cbd5e1;
  line-height: 1.75;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.category-samples a {
  padding: 7px 11px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(52, 211, 153, 0.22);
  font-size: 0.88rem;
}

.search-panel {
  padding: 22px;
  margin-bottom: 34px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

.search-input,
.filter-select {
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.42);
  color: #e2e8f0;
  padding: 0 16px;
  outline: none;
}

.search-input:focus,
.filter-select:focus {
  border-color: rgba(52, 211, 153, 0.62);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.empty-state {
  display: none;
  text-align: center;
  padding: 34px;
  color: #cbd5e1;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 24px;
}

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

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(52, 211, 153, 0.42);
}

.rank-item img {
  width: 80px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-item strong {
  display: block;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.35;
  margin-bottom: 7px;
}

.rank-item em {
  display: block;
  color: #94a3b8;
  font-style: normal;
  line-height: 1.6;
  font-size: 0.9rem;
}

.list-rank {
  left: 4px;
  top: 4px;
  min-width: 30px;
  height: 30px;
  font-size: 0.85rem;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 28px;
  color: #94a3b8;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #34d399;
}

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

.player-section {
  padding: clamp(20px, 4vw, 36px);
  margin-bottom: 34px;
}

.player-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.player-header p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.22)),
    radial-gradient(circle at center, rgba(16, 185, 129, 0.16), transparent 44%);
  cursor: pointer;
}

.play-layer.is-hidden {
  display: none;
}

.play-button-icon {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #022c22;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  font-size: 2rem;
  box-shadow: 0 24px 60px rgba(16, 185, 129, 0.35);
}

.detail-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  padding: clamp(20px, 4vw, 34px);
  margin-bottom: 34px;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.5);
}

.detail-content h2 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 1.55rem;
}

.detail-content p {
  margin: 0 0 22px;
  color: #cbd5e1;
  line-height: 1.92;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.detail-meta-grid div {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.detail-meta-grid strong {
  color: #fff;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), #020617);
  padding: 46px 0 24px;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: #94a3b8;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 0.92rem;
}

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

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

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

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

  .hero-control {
    display: none;
  }

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

  .movie-grid,
  .movie-grid.large-grid,
  .category-grid,
  .rank-layout,
  .footer-grid,
  .detail-panel {
    grid-template-columns: 1fr;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 300px;
  }
}

@media (max-width: 560px) {
  .site-nav,
  .mobile-nav,
  .main-wrap,
  .page-hero,
  .breadcrumb,
  .detail-wrap,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 2.45rem;
  }

  .hero-content p {
    font-size: 0.98rem;
  }

  .content-section,
  .page-hero-card,
  .player-section,
  .detail-panel {
    border-radius: 22px;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }
}
