:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(34, 211, 238, 0.55);
  --text: #e5eefb;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --blue: #2563eb;
  --yellow: #facc15;
  --pink: #f472b6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max: 1180px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 0%, rgba(8, 145, 178, 0.20), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(37, 99, 235, 0.17), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
}

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 rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

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

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--cyan-light);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-search {
  position: relative;
  width: 260px;
}

.top-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  padding: 11px 14px;
}

.search-panel input,
.search-panel select {
  padding: 13px 14px;
}

.top-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
  cursor: pointer;
}

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

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.92), rgba(15, 23, 42, 0.92));
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  min-height: 66vh;
  margin: 0 auto;
  padding: 92px 0 96px;
  display: flex;
  align-items: flex-end;
}

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

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.22);
  color: #cffafe;
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  max-width: 860px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #fff;
}

.hero p {
  margin: 0 0 26px;
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.section-head,
.card-meta,
.meta-row,
.detail-actions,
.breadcrumb,
.tag-list,
.rank-row,
.footer-grid {
  display: flex;
  align-items: center;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 38px rgba(6, 182, 212, 0.28);
}

.btn-ghost {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.46);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(6, 182, 212, 0.72);
}

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

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

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

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

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

.section {
  padding: 48px 0;
}

.section-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
  color: #fff;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: #67e8f9;
  font-size: 14px;
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.search-panel,
.player-section {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.20);
}

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 24px 62px rgba(8, 145, 178, 0.16);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.40), rgba(30, 41, 59, 0.95));
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-badge,
.rating-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.card-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(6, 182, 212, 0.88);
  color: #fff;
}

.rating-badge {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(250, 204, 21, 0.92);
  color: #111827;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 17px;
  line-height: 1.45;
}

.card-desc {
  margin: 0 0 14px;
  min-height: 46px;
  color: #aab7ca;
  font-size: 14px;
  line-height: 1.65;
}

.card-meta {
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 13px;
}

.category-card {
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.82));
}

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

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.category-preview a {
  display: block;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.45;
}

.page-hero {
  padding: 58px 0 34px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.18), transparent 34rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0));
}

.page-hero h1 {
  margin: 0 0 14px;
  max-width: 900px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #fff;
}

.page-hero p {
  margin: 0;
  max-width: 820px;
  color: #b6c4d7;
  font-size: 17px;
  line-height: 1.85;
}

.search-panel {
  position: sticky;
  top: 88px;
  z-index: 20;
  margin: 30px 0;
  padding: 18px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 74px 150px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-num {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.92), rgba(249, 115, 22, 0.92));
  color: #111827;
  font-size: 20px;
  font-weight: 1000;
}

.rank-thumb {
  height: 86px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.38), rgba(15, 23, 42, 0.96));
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-main h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 19px;
}

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

.rank-score {
  color: var(--yellow);
  font-size: 22px;
  font-weight: 1000;
}

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

.breadcrumb a {
  color: #67e8f9;
}

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

.player-section {
  overflow: hidden;
  background: rgba(2, 6, 23, 0.88);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18)),
    linear-gradient(135deg, rgba(8, 145, 178, 0.35), rgba(15, 23, 42, 0.82));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.player-play {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.35);
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-panel {
  padding: 24px;
  margin-top: 24px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  color: #fff;
}

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

.meta-row span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.detail-panel h2 {
  margin: 26px 0 12px;
  color: #fff;
  font-size: 22px;
}

.detail-panel p {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.tag-list {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.side-card {
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.side-card h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 20px;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-thumb {
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.35), rgba(15, 23, 42, 0.95));
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-title {
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.45;
}

.related-meta {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.site-footer {
  margin-top: 58px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.96));
}

.footer-grid {
  justify-content: space-between;
  gap: 18px;
  padding: 36px 0;
  color: var(--muted);
  line-height: 1.75;
}

.footer-grid strong {
  display: block;
  color: #fff;
  font-size: 18px;
}

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

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

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

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

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .top-search {
    display: none;
  }

  .nav-links {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.96);
  }

  .site-header.is-open .nav-links {
    display: flex;
  }

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

  .hero-content {
    padding: 88px 0 82px;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding: 36px 0;
  }

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

  .movie-grid,
  .feature-grid,
  .category-preview,
  .search-controls {
    grid-template-columns: 1fr;
  }

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

  .rank-thumb {
    display: none;
  }

  .rank-score {
    grid-column: 2;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .hero-content {
    width: min(100% - 24px, var(--max));
  }

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

  .hero h1,
  .hero h2,
  .page-hero h1 {
    letter-spacing: -0.03em;
  }

  .player-play {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
