:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #2dd4bf;
  --accent-dark: #0f766e;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #062925;
  background: linear-gradient(135deg, #2dd4bf, #99f6e4);
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.36);
}

.brand-text {
  font-size: 20px;
  color: #ffffff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

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

.home-shell {
  width: 100%;
  padding-top: 66px;
}

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

.hero-track,
.hero-slide,
.hero-image,
.hero-gradient {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

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

.hero-gradient {
  background:
    radial-gradient(circle at 75% 25%, rgba(45, 212, 191, 0.2), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, rgba(2, 6, 23, 0.58) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-content h1,
.hero-content h2 {
  max-width: 720px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.85;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #052e2b;
  background: linear-gradient(135deg, #2dd4bf, #99f6e4);
  box-shadow: 0 18px 42px rgba(45, 212, 191, 0.25);
}

.btn.secondary {
  color: #e2e8f0;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
}

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

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

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

.hero-rail {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 82px;
  z-index: 4;
  width: 370px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-rail-item {
  position: relative;
  min-height: 88px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.hero-rail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero-rail-item:hover img {
  transform: scale(1.08);
  opacity: 0.95;
}

.hero-rail-item span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.quick-search,
.content-section,
.ranking-panel,
.player-section,
.detail-text,
.detail-hero,
.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
}

.quick-search,
.page-hero,
.detail-hero,
.player-section,
.detail-text {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58));
  box-shadow: var(--shadow);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.quick-search h2,
.page-hero h1,
.section-head h2,
.detail-info h1,
.detail-text h2 {
  margin: 8px 0 10px;
  letter-spacing: -0.03em;
}

.quick-search p,
.page-hero p,
.detail-info p,
.detail-text p {
  color: var(--muted-strong);
  line-height: 1.82;
}

.global-search-box input,
.search-box input,
.filter-select {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
}

.global-search-box input,
.search-box input {
  padding: 0 16px;
}

.filter-select {
  padding: 0 14px;
}

.global-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.global-result-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
}

.global-result-item img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.global-result-item strong {
  display: block;
  font-size: 14px;
}

.global-result-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-more {
  color: var(--accent);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: 20px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(15, 23, 42, 0.92);
}

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

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

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

.card-badge,
.card-year {
  position: absolute;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.card-badge {
  left: 10px;
  color: #062925;
  background: rgba(45, 212, 191, 0.92);
}

.card-year {
  right: 10px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.72);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #062925;
  background: var(--accent);
  opacity: 0;
  transform: translate(-50%, -40%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

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

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

.movie-card p {
  min-height: 64px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

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

.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-list span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(45, 212, 191, 0.08);
  font-size: 12px;
}

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

.category-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.category-card {
  position: relative;
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(45, 212, 191, 0.46);
}

.category-label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.category-card h3 {
  margin: 12px 0 10px;
  font-size: 24px;
}

.category-card p {
  color: var(--muted-strong);
  line-height: 1.7;
}

.category-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-mini span {
  color: var(--muted-strong);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.44);
  font-size: 12px;
}

.compact-hero {
  padding: 34px;
}

.flat-section {
  width: 100%;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 220px));
  gap: 12px;
  margin: 24px 0;
}

.search-box {
  display: block;
}

.search-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.rank-card {
  display: grid;
  grid-template-columns: 42px 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
}

.rank-card span,
.rank-number {
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
}

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

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

.rank-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 62px 58px minmax(180px, 1fr) minmax(220px, 1fr) 70px;
  gap: 16px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.ranking-row:hover {
  border-color: rgba(45, 212, 191, 0.42);
  background: rgba(15, 23, 42, 0.96);
}

.ranking-row img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
}

.rank-action {
  color: var(--accent);
  font-weight: 800;
  text-align: right;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  padding: 28px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
}

.player-section {
  padding: 24px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
  z-index: 1;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.2), rgba(2, 6, 23, 0.66) 52%, rgba(2, 6, 23, 0.84));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  color: #062925;
  background: var(--accent);
  box-shadow: 0 0 44px rgba(45, 212, 191, 0.42);
}

.player-overlay strong {
  font-size: 18px;
}

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

.detail-text {
  padding: 28px;
}

.detail-text p {
  font-size: 16px;
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.detail-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.detail-nav a {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.74);
}

.detail-nav a:hover {
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.42);
}

.site-footer {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

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

.footer-inner p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted-strong);
  font-weight: 700;
}

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

@media (max-width: 920px) {
  .main-nav {
    position: absolute;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 13px 14px;
  }

  .nav-toggle {
    display: block;
  }

  .hero-rail {
    display: none;
  }

  .quick-search,
  .detail-hero,
  .footer-inner,
  .filter-bar,
  .detail-nav {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 280px;
  }

  .ranking-row {
    grid-template-columns: 46px 50px 1fr;
  }

  .rank-meta,
  .rank-action {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .page-shell,
  .hero-content,
  .quick-search,
  .content-section,
  .ranking-panel,
  .player-section,
  .detail-text,
  .detail-hero,
  .page-hero,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(36px, 14vw, 56px);
  }

  .hero-content p {
    font-size: 15px;
  }

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

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

  .movie-card p {
    display: none;
  }

  .compact-hero,
  .quick-search,
  .detail-hero,
  .player-section,
  .detail-text {
    padding: 20px;
  }

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