:root {
  color-scheme: dark;
  --bg: #06101f;
  --bg-soft: #0f1a2e;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(96, 165, 250, 0.18);
  --text: #e5edf8;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 4%, rgba(37, 99, 235, 0.34), transparent 32rem),
    radial-gradient(circle at 84% 10%, rgba(34, 211, 238, 0.22), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #071426 42%, #0a1020 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

main {
  min-height: 72vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.navbar {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand {
  font-size: 24px;
  background: linear-gradient(90deg, #60a5fa, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  color: #cbd5e1;
}

.nav-links a {
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
  font-size: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.46) 100%),
    radial-gradient(circle at 78% 30%, rgba(34, 211, 238, 0.22), transparent 26rem);
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 650px;
  padding: 84px 22px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.72fr);
  gap: 38px;
  align-items: center;
}

.hero-copy {
  max-width: 730px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.42);
  font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 span,
.gradient-text {
  background: linear-gradient(90deg, #93c5fd, #67e8f9, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 650px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn.primary {
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 42px rgba(37, 99, 235, 0.35);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.6);
}

.hero-search {
  display: flex;
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.hero-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.hero-search input {
  padding: 0 18px;
}

.hero-search button {
  flex: 0 0 auto;
}

.hero-side {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.focus-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.42));
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.focus-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.focus-card-content {
  padding: 24px;
}

.focus-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.focus-card p {
  color: var(--muted);
  line-height: 1.75;
}

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

.hero-dots button {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
  cursor: pointer;
}

.hero-dots button.active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.section,
.page-hero,
.detail-layout,
.player-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px;
}

.page-hero {
  padding-top: 72px;
  padding-bottom: 32px;
}

.page-hero p,
.section-header p,
.detail-title p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

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

.section-header h2,
.page-hero h1,
.detail-section h2 {
  margin: 0 0 10px;
}

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

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.player-panel,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-badge,
.rank-number {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  gap: 10px;
  color: #93c5fd;
  font-size: 13px;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card p {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.meta-pill {
  padding: 5px 9px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.16);
  font-size: 12px;
}

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

.category-card {
  display: block;
  padding: 22px;
  min-height: 178px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 21px;
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.48);
}

.rank-card img {
  width: 96px;
  height: 130px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-card h3 {
  margin: 8px 0;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  padding: 14px;
  margin-bottom: 28px;
}

.search-panel input,
.search-panel select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.38);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(30, 64, 175, 0.38));
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(3px) saturate(1.1);
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62));
}

.detail-title {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 22px 50px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.detail-cover {
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 14px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.player-wrap {
  padding-top: 36px;
}

.player-panel {
  overflow: hidden;
  background: #020617;
}

.video-box {
  position: relative;
  background: #000;
}

.video-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.34);
  cursor: pointer;
}

.player-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
}

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

.detail-panel {
  padding: 28px;
}

.detail-section + .detail-section {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.detail-section p {
  color: #cbd5e1;
  line-height: 1.95;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.mini-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card span {
  display: block;
  font-weight: 800;
}

.mini-card small {
  color: var(--muted);
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 28px;
}

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

.footer-grid a {
  display: block;
}

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

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
  font-size: 20px;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 22px 28px;
  color: #64748b;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--panel);
}

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

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

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

  .hero-side {
    display: none;
  }
}

@media (max-width: 780px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

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

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

  .hero-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 44px;
  }

  .grid,
  .rank-list,
  .footer-grid,
  .detail-title,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .detail-title {
    padding-top: 42px;
  }

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

  .section-header {
    display: block;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 19px;
  }

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

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

  .rank-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .rank-card img {
    width: 76px;
    height: 102px;
  }
}
