:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #3b82f6;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.15), transparent 35%),
    linear-gradient(135deg, #020617 0%, #0f172a 52%, #111827 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(34, 211, 238, 0.28);
}

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

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

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #164e63, #020617);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition: opacity 0.65s ease, visibility 0.65s ease, transform 1.1s ease;
}

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

.hero-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1180px) / 2));
  width: min(720px, calc(100% - 48px));
  transform: translateY(-50%);
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.hero-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #cffafe;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.28);
}

.btn.ghost {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

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

.content-section {
  padding: 72px 0;
}

.alt-section {
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-block h2,
.spotlight-card h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.spotlight-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.search-input,
.filter-select {
  width: 100%;
  height: 48px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  outline: none;
}

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

.filter-select {
  padding: 0 14px;
}

.search-input:focus,
.filter-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
  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.58);
  box-shadow: 0 28px 70px rgba(8, 145, 178, 0.2);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #020617;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.overview-main:hover img,
.ranking-card:hover img {
  transform: scale(1.06);
}

.poster-year,
.poster-type {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
}

.poster-year {
  left: 12px;
  color: #001018;
  background: var(--cyan);
}

.poster-type {
  right: 12px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.78);
}

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

.movie-cat {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3,
.ranking-card h2 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p,
.ranking-card p {
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: 14px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 28px;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transition: transform 0.45s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 28px;
  align-items: stretch;
}

.ranking-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.rank-num,
.rank-big {
  color: var(--cyan);
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-year {
  color: var(--muted);
  text-align: right;
}

.spotlight-card {
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 96px 0 56px;
  background:
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
}

.small-hero {
  padding-top: 82px;
}

.category-hero .filter-panel,
.small-hero .filter-panel {
  margin-top: 26px;
}

.overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 0.95fr 1.2fr;
  gap: 18px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.overview-main {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.overview-main img,
.ranking-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
  transition: transform 0.35s ease;
}

.overview-main h2 {
  margin: 8px 0;
  font-size: 28px;
}

.overview-main p {
  margin: 0;
  color: var(--muted);
}

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

.movie-card.compact .movie-card-body {
  padding: 14px;
}

.movie-card.compact p,
.movie-card.compact .tag-row {
  display: none;
}

.ranking-page {
  display: grid;
  gap: 16px;
}

.ranking-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 26px;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

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

.ranking-card a {
  display: grid;
  grid-template-columns: 72px 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
}

.rank-big {
  font-size: 30px;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 46px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 30px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-toggle {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.2), transparent 32%),
    rgba(2, 6, 23, 0.38);
  border: 0;
}

.play-toggle.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.4);
  font-size: 30px;
}

.detail-info {
  padding: 30px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 28px;
}

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

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

.detail-one-line {
  margin: 18px 0 22px;
  color: #cbd5e1;
  font-size: 17px;
}

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

.detail-meta-grid div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.detail-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta-grid strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
}

.large-tags {
  margin-top: 16px;
}

.detail-content {
  padding-top: 56px;
}

.detail-container {
  display: grid;
  gap: 24px;
}

.detail-block {
  padding: 30px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.detail-block p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.compact-head {
  margin-bottom: 22px;
}

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

.site-footer {
  padding: 40px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
}

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

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

  .detail-layout,
  .two-column,
  .category-overview-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

  .hero-slider {
    min-height: 590px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.35) 100%);
  }

  .hero-content {
    top: auto;
    bottom: 82px;
    transform: none;
  }

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

  .filter-panel,
  .ranking-card a,
  .overview-main {
    grid-template-columns: 1fr;
  }

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

  .ranking-card a {
    gap: 12px;
  }

  .ranking-card img {
    max-width: 260px;
  }

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .detail-layout,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .nav-wrap {
    height: 64px;
  }

  .nav-links {
    top: 64px;
  }

  .content-section {
    padding: 48px 0;
  }

  .movie-grid,
  .category-grid,
  .mini-grid,
  .mini-related,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .detail-info,
  .detail-block,
  .spotlight-card {
    padding: 22px;
  }

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