:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.82);
  --card-solid: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
  --sky: #38bdf8;
  --sky-dark: #0284c7;
  --violet: #8b5cf6;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 6%, rgba(56, 189, 248, 0.2), transparent 32rem),
    radial-gradient(circle at 86% 12%, rgba(139, 92, 246, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sky), var(--violet));
  box-shadow: 0 14px 32px rgba(56, 189, 248, 0.26);
  color: white;
  font-weight: 900;
}

.logo-text {
  display: grid;
  gap: 2px;
}

.logo-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  color: var(--muted);
  font-size: 12px;
}

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

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

.nav-links a:hover,
.nav-links a.active {
  color: white;
}

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

.search-form {
  position: relative;
  width: min(280px, 32vw);
}

.search-form input,
.toolbar input,
.toolbar select {
  width: 100%;
  color: white;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
  padding: 10px 42px 10px 16px;
}

.search-form input::placeholder,
.toolbar input::placeholder {
  color: #64748b;
}

.search-form input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.search-form button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  color: white;
  background: rgba(56, 189, 248, 0.18);
}

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

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-panel nav,
.mobile-panel form {
  display: grid;
  gap: 12px;
}

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

.hero-bg-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.82) 100%),
    radial-gradient(circle at 78% 24%, rgba(56, 189, 248, 0.22), transparent 30rem),
    radial-gradient(circle at 10% 90%, rgba(244, 63, 94, 0.12), transparent 22rem);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  background-size: cover;
  background-position: center;
}

 .hero-slide[hidden] {
  display: none;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 50%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: center;
  padding: 70px 0 56px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  color: white;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-desc {
  margin: 0 0 26px;
  max-width: 640px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.meta-list li,
.tag-pill {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.65);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #020617;
  background: linear-gradient(135deg, white, #bae6fd);
}

.btn-sky {
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--sky-dark));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.26);
}

.btn-outline {
  color: white;
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.28);
}

.hero-panel {
  padding: 22px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-title h2,
.section-title h2,
.page-heading h1,
.detail-title {
  margin: 0;
}

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

.mini-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.mini-item:hover {
  border-color: rgba(56, 189, 248, 0.36);
  transform: translateX(3px);
}

.mini-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.mini-item strong {
  display: block;
  margin-bottom: 5px;
  color: white;
  line-height: 1.35;
}

.mini-item span {
  color: var(--muted);
  font-size: 13px;
}

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

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

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

.main-content {
  padding: 64px 0 76px;
}

.section {
  margin-bottom: 70px;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--sky);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-title h2 {
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.1;
}

.section-title p,
.page-heading p,
.detail-intro,
.footer p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 26px 62px rgba(2, 6, 23, 0.34);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.movie-grid.large .poster {
  aspect-ratio: 16 / 9;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 16px;
}

.card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.card-desc {
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

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

.category-card {
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.24), transparent 8rem),
    rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.35);
}

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

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

.page-hero {
  padding: 58px 0 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

.page-heading {
  max-width: 760px;
}

.page-heading h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.toolbar input,
.toolbar select {
  padding: 12px 15px;
}

.toolbar select {
  appearance: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 86px 1fr 120px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
  font-weight: 900;
}

.rank-row img {
  width: 86px;
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.rank-row h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.rank-heat {
  text-align: right;
  color: #fde68a;
  font-weight: 800;
}

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

.player-card,
.detail-card,
.side-card {
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.16), rgba(2, 6, 23, 0.7));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border: none;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--violet));
  font-size: 30px;
  box-shadow: 0 18px 48px rgba(56, 189, 248, 0.32);
}

.player-state {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.7);
  font-size: 13px;
}

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

.detail-title {
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
}

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

.info-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.info-list li {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.info-list strong {
  color: white;
}

.article-body h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.article-body p {
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.9;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.footer {
  padding: 36px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.64);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: #cbd5e1;
}

.empty-message {
  display: none;
  padding: 28px;
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.empty-message.show {
  display: block;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1040px) {
  .nav-links,
  .header-actions .search-form {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-panel {
    max-width: 640px;
  }

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .logo-subtitle {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 48px 0 70px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-panel {
    padding: 16px;
  }

  .main-content {
    padding: 44px 0 58px;
  }

  .section-title,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

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

  .card-body {
    padding: 13px;
  }

  .toolbar,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-heat {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.large,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-title,
  .page-heading h1,
  .detail-title {
    letter-spacing: -0.03em;
  }

  .play-button {
    width: 70px;
    height: 70px;
  }
}
