:root {
  --bg: #0a0e27;
  --bg-soft: #10182d;
  --panel: #1a2332;
  --panel-light: #223047;
  --text: #e8eef5;
  --muted: #a8b5c7;
  --muted-dark: #6b7b8c;
  --blue: #4a9eff;
  --blue-dark: #3a8eef;
  --green: #00d4aa;
  --gold: #f4c430;
  --orange: #ff6b35;
  --line: rgba(168, 181, 199, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 18% 8%, rgba(74, 158, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 82% 28%, rgba(0, 212, 170, 0.12), transparent 28rem),
    var(--bg);
}

main {
  flex: 1;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 39, 0.9);
  border-bottom: 1px solid rgba(168, 181, 199, 0.12);
  backdrop-filter: blur(14px);
}

.nav-bar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 12px 36px rgba(74, 158, 255, 0.28);
  transition: transform 0.22s ease;
}

.brand:hover .logo-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: #c5d0de;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #c5d0de;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  background: rgba(26, 35, 50, 0.98);
  border-top: 1px solid rgba(168, 181, 199, 0.12);
}

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

.mobile-links {
  display: grid;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 6px;
}

.mobile-link {
  color: #c5d0de;
  padding: 10px 0;
  font-weight: 600;
}

.mobile-link.active {
  color: var(--blue);
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: var(--bg);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 76vh;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 39, 0.92), rgba(10, 14, 39, 0.58) 44%, rgba(10, 14, 39, 0.18)),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 14, 39, 0.55) 40%, rgba(10, 14, 39, 0.18) 100%);
}

.hero-content {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: flex-end;
  padding-top: 96px;
  padding-bottom: 88px;
}

.hero-copy {
  width: min(720px, 100%);
  display: grid;
  gap: 18px;
}

.hero-kicker,
.section-kicker {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

.hero p {
  margin: 0;
  color: #d8e2ef;
  font-size: clamp(16px, 2vw, 22px);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.45);
}

.hero-meta,
.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.hero-tags span,
.tag-row span,
.detail-tags span {
  color: #dfe8f5;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  backdrop-filter: blur(6px);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--green));
  box-shadow: 0 14px 34px rgba(74, 158, 255, 0.24);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.hero-controls {
  position: absolute;
  right: 32px;
  bottom: 44px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-controls button:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: clamp(46px, 7vw, 88px) 0;
}

.section-deep {
  background: linear-gradient(180deg, rgba(10, 14, 39, 0.4), rgba(26, 35, 50, 0.72));
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1,
.detail-title-block h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.compact-heading {
  margin-bottom: 18px;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(168, 181, 199, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow);
  border-color: rgba(74, 158, 255, 0.38);
}

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

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 38%, rgba(0, 0, 0, 0.82));
}

.poster-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.poster-meta.left {
  top: 10px;
  left: 10px;
}

.poster-meta.right {
  top: 10px;
  right: 10px;
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  min-width: 30px;
  text-align: center;
  background: linear-gradient(90deg, var(--orange), var(--gold));
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(74, 158, 255, 0.88);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 15px;
}

.movie-card-body strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card-body strong {
  color: var(--blue);
}

.movie-line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}

.movie-info {
  color: var(--muted-dark);
  font-size: 12px;
}

.tag-row span {
  background: rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.16);
  color: #bdd8ff;
  font-size: 11px;
  padding: 3px 8px;
}

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

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

.category-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(74, 158, 255, 0.16), rgba(0, 212, 170, 0.1)),
    var(--panel);
  border: 1px solid rgba(168, 181, 199, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 170, 0.38);
}

.category-card span {
  color: var(--green);
  font-weight: 800;
  font-size: 18px;
}

.category-card strong {
  color: #d9e5f3;
  font-weight: 500;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.ranking-panel,
.card-panel {
  border-radius: 20px;
  background: rgba(26, 35, 50, 0.9);
  border: 1px solid rgba(168, 181, 199, 0.12);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.18);
}

.ranking-panel {
  padding: 24px;
  position: sticky;
  top: 104px;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease;
}

.ranking-list a:hover {
  background: rgba(74, 158, 255, 0.12);
}

.ranking-list span {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-weight: 800;
}

.ranking-list strong {
  display: block;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-list em {
  grid-column: 2;
  color: var(--muted-dark);
  font-size: 12px;
  font-style: normal;
}

.search-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(26, 35, 50, 0.9);
  border: 1px solid rgba(168, 181, 199, 0.12);
}

.search-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 44px;
  color: var(--text);
  background: rgba(10, 14, 39, 0.78);
  border: 1px solid rgba(168, 181, 199, 0.16);
  border-radius: 13px;
  padding: 0 13px;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.16);
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(26, 35, 50, 0.8);
  border: 1px solid rgba(168, 181, 199, 0.12);
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 54px;
  background:
    linear-gradient(135deg, rgba(74, 158, 255, 0.18), rgba(0, 212, 170, 0.08)),
    var(--bg-soft);
}

.page-hero p,
.detail-title-block p {
  width: min(760px, 100%);
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  transform: scale(1.03);
}

.detail-backdrop span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 39, 0.94), rgba(10, 14, 39, 0.55)),
    linear-gradient(0deg, var(--bg), rgba(10, 14, 39, 0.35));
}

.detail-hero-content {
  position: relative;
  padding: 108px 0 54px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--blue);
  font-weight: 700;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.card-panel {
  padding: 22px;
}

.player-shell {
  padding: 12px;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
  z-index: 3;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 20px 48px rgba(74, 158, 255, 0.34);
  font-size: 30px;
  padding-left: 4px;
}

.player-overlay.is-hidden {
  display: none;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 107, 53, 0.86);
}

.player-error.is-visible {
  display: block;
}

.article-panel h2,
.info-panel h2,
.footer-column h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 22px;
}

.article-panel p {
  margin: 0;
  color: #cbd7e6;
  font-size: 16px;
}

.side-poster {
  padding: 0;
  overflow: hidden;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.info-panel dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.info-panel dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.info-panel dt {
  color: var(--muted-dark);
}

.info-panel dd {
  margin: 0;
  color: #d9e5f3;
}

.site-footer {
  margin-top: auto;
  background: #1a2332;
  border-top: 1px solid rgba(168, 181, 199, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding-top: 54px;
  padding-bottom: 38px;
}

.footer-brand p,
.footer-column p {
  color: var(--muted);
  margin: 14px 0 0;
}

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

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  color: var(--muted-dark);
  border-top: 1px solid rgba(168, 181, 199, 0.1);
  font-size: 14px;
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .brand-subtitle {
    display: none;
  }

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

  .hero-content {
    padding-bottom: 72px;
  }

  .hero-controls {
    right: 16px;
    bottom: 22px;
  }

  .hero-dots {
    bottom: 18px;
  }

  .hero h1 {
    font-size: 42px;
  }

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

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

  .movie-line,
  .tag-row {
    display: none;
  }

  .category-grid,
  .category-grid.full,
  .search-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-content {
    padding-top: 82px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
