:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #2dd4bf;
  --accent-strong: #14b8a6;
  --accent-soft: rgba(20, 184, 166, 0.14);
  --blue: #38bdf8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(45, 212, 191, 0.20), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(56, 189, 248, 0.16), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  max-width: 1220px;
  height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #02111f;
  box-shadow: 0 12px 28px rgba(45, 212, 191, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted-strong);
  font-weight: 700;
}

.desktop-nav a,
.mobile-panel a {
  transition: color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel nav {
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px 22px 22px;
  display: grid;
  gap: 14px;
  color: var(--muted-strong);
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: clamp(520px, 72vh, 780px);
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.70) 40%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0) 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  min-height: clamp(520px, 72vh, 780px);
  margin: 0 auto;
  padding: 130px 22px 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.10);
  color: #b5f5ec;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags {
  margin-top: 22px;
}

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

.primary-btn,
.ghost-btn,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-btn,
.quick-search button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #02111f;
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.26);
  cursor: pointer;
}

.ghost-btn {
  border: 1px solid rgba(203, 213, 225, 0.25);
  background: rgba(15, 23, 42, 0.54);
  color: var(--text);
}

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

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

.hero-dots button {
  width: 38px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.30);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--accent);
}

.search-band,
.content-section,
.split-section,
.sub-hero,
.detail-hero,
.player-section,
.detail-copy,
.category-overview-grid {
  max-width: 1220px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: 26px;
  align-items: center;
  margin-top: -44px;
  position: relative;
  z-index: 6;
  padding-top: 28px;
  padding-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2,
.section-head h2,
.sub-hero h1,
.detail-info h1,
.detail-copy h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-band h2 {
  font-size: clamp(24px, 3vw, 38px);
}

.quick-search,
.filter-panel {
  display: flex;
  gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  outline: 0;
}

.quick-search input {
  flex: 1;
  padding: 0 18px;
}

.filter-panel {
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.58);
}

.filter-panel input,
.filter-panel select {
  flex: 1 1 170px;
  padding: 0 14px;
}

.filter-panel input {
  flex-basis: 320px;
}

.content-section {
  padding-top: 72px;
  padding-bottom: 10px;
}

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

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

.section-head > a {
  color: var(--accent);
  font-weight: 900;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.92));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.48);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

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

.poster-link img,
.category-tile img,
.category-cover img,
.detail-poster img,
.ranking-item img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.category-overview-card:hover .category-cover img {
  transform: scale(1.06);
}

.poster-shade,
.category-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.82) 100%);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  height: 32px;
  padding: 0 12px;
  background: rgba(45, 212, 191, 0.92);
  color: #04111f;
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  background: rgba(2, 6, 23, 0.82);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 191, 0.35);
}

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

.movie-card-title {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

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

.movie-meta,
.movie-desc,
.sub-hero p,
.detail-line,
.detail-copy p,
.site-footer p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.75;
}

.movie-meta {
  margin: 8px 0;
  font-size: 13px;
}

.movie-desc {
  min-height: 72px;
  margin: 0 0 14px;
  font-size: 14px;
}

.movie-card-compact .movie-card-title {
  font-size: 16px;
}

.movie-card-compact .movie-desc {
  min-height: 54px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.56;
}

.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 20px;
  margin-bottom: 8px;
}

.category-tile small {
  color: var(--muted-strong);
  line-height: 1.6;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding-top: 50px;
  padding-bottom: 60px;
}

.split-section .content-section,
.split-section .ranking-panel {
  padding: 0;
}

.ranking-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.70);
  padding: 22px;
  box-shadow: var(--shadow);
}

.section-head.slim {
  margin-bottom: 16px;
}

.section-head.slim h2 {
  font-size: 30px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 32px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  border-color: rgba(45, 212, 191, 0.35);
}

.ranking-number {
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 56px;
  height: 76px;
  border-radius: 12px;
}

.ranking-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ranking-text strong,
.ranking-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-text small {
  color: var(--muted);
}

.sub-hero {
  padding-top: 86px;
  padding-bottom: 24px;
}

.sub-hero h1 {
  font-size: clamp(40px, 7vw, 72px);
}

.sub-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.70);
  padding: 18px;
  overflow: hidden;
}

.category-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

.category-overview-card h2 {
  margin: 0;
  font-size: 26px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-links a {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 13px;
}

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

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

.detail-hero {
  padding-top: 58px;
  padding-bottom: 26px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  max-width: 880px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.04;
}

.detail-line {
  max-width: 820px;
  margin: 20px 0 0;
  font-size: 20px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.detail-tags {
  margin-top: 18px;
}

.player-section {
  padding-top: 36px;
  padding-bottom: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(45, 212, 191, 0.30);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
  cursor: pointer;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.20), rgba(2, 6, 23, 0.72));
  color: var(--text);
  font-weight: 900;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #02111f;
  font-size: 30px;
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 20px 44px rgba(20, 184, 166, 0.34);
}

.detail-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 18px;
}

.detail-copy article {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.70);
  padding: 28px;
}

.detail-copy h2 {
  font-size: 28px;
}

.detail-copy p {
  margin-bottom: 0;
  font-size: 16px;
}

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

.footer-grid {
  max-width: 1220px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

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

.site-footer h3 {
  margin: 0 0 16px;
}

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

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

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

.copyright {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 22px 34px;
  color: var(--muted);
}

.search-hidden {
  display: none !important;
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .mobile-panel.is-open {
    display: block;
  }

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

  .search-band {
    grid-template-columns: 1fr;
    margin-top: -30px;
  }

  .quick-search,
  .filter-panel {
    flex-direction: column;
  }

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

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

  .category-overview-card,
  .detail-grid,
  .detail-copy,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-cover {
    max-width: 240px;
  }

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

@media (max-width: 540px) {
  .nav-wrap {
    height: 64px;
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

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

  .hero-content,
  .search-band,
  .content-section,
  .split-section,
  .sub-hero,
  .detail-hero,
  .player-section,
  .detail-copy,
  .category-overview-grid,
  .footer-grid,
  .copyright {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .movie-desc {
    min-height: auto;
  }

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

  .player-button {
    width: 66px;
    height: 66px;
  }
}
