:root {
  --page-bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-light: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #22d3ee;
  --brand-dark: #0891b2;
  --accent: #38bdf8;
  --gold: #facc15;
  --danger: #f43f5e;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 28px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.16), transparent 28rem),
    var(--page-bg);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  position: relative;
  background: linear-gradient(135deg, var(--brand), #2563eb);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
}

.logo-mark::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 9px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid white;
}

.logo-text {
  background: linear-gradient(90deg, var(--brand), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #d1d5db;
  font-weight: 600;
}

.nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  color: var(--brand);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 24px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #d1d5db;
  font-weight: 600;
}

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

.main {
  min-height: 70vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.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 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.hero-slide.is-active .hero-image {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1);
  }
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78) 34%, rgba(2, 6, 23, 0.34) 72%, rgba(2, 6, 23, 0.7)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.42) 38%, transparent 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 112px 0 92px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 18px;
  color: var(--brand);
  background: rgba(34, 211, 238, 0.13);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.pill.brand {
  color: var(--brand);
  background: rgba(8, 145, 178, 0.16);
  border-color: rgba(34, 211, 238, 0.24);
}

.pill.gold {
  color: var(--gold);
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.24);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand-dark), #2563eb);
  box-shadow: 0 16px 38px rgba(8, 145, 178, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
}

.btn-ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--brand);
  border-color: rgba(34, 211, 238, 0.4);
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.5);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(2, 6, 23, 0.8);
  transform: scale(1.05);
}

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

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

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

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--brand);
}

.section {
  padding: 56px 0;
}

.section.compact {
  padding: 36px 0;
}

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

.section-title {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

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

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

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card:hover .poster-wrap {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.42);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.28), transparent 36%),
    linear-gradient(145deg, #1e293b, #020617);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.rating-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 9px;
  color: var(--gold);
  background: rgba(2, 6, 23, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.play-mark {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: rgba(8, 145, 178, 0.88);
  box-shadow: 0 18px 35px rgba(8, 145, 178, 0.38);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-title {
  margin: 12px 0 6px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.card-title a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.card-title a:hover {
  color: var(--brand);
}

.card-meta {
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}

.category-card {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.16), transparent 38%),
    linear-gradient(150deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.76));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.page-hero {
  padding: 56px 0 22px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.85;
  font-size: 17px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  margin: 24px 0 32px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.64);
  outline: none;
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: rgba(34, 211, 238, 0.56);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 24px 0 56px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.22));
  cursor: pointer;
}

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

.player-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 22px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.95);
  box-shadow: 0 20px 55px rgba(8, 145, 178, 0.34);
  font-weight: 900;
}

.play-circle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--brand-dark);
  background: white;
}

.detail-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.78);
}

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

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.detail-meta {
  margin-bottom: 22px;
}

.content-block {
  margin-top: 28px;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-block p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.9;
  font-size: 16px;
}

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

.side-panel {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.side-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.side-cover {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #1e293b, #020617);
  border: 1px solid var(--line);
  aspect-ratio: 2 / 3;
}

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

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

.side-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-strong);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.side-item span:first-child {
  color: var(--muted);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 90px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.76);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.38);
}

.rank-no {
  font-size: 26px;
  font-weight: 900;
  color: var(--brand);
  text-align: center;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, #1e293b, #020617);
}

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

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

.rank-title a:hover {
  color: var(--brand);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.95));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  color: var(--muted);
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
  color: var(--text);
}

.footer-inner p {
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

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

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: 64px;
    padding: 0 18px;
  }

  .nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-block;
  }

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

  .hero-content {
    padding: 92px 0 76px;
  }

  .hero-control {
    display: none;
  }

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

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

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

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

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-row .btn {
    grid-column: 2 / -1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }

  .logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

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

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

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

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

  .detail-panel {
    padding: 20px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .player-play {
    padding: 12px 16px;
  }
}
