:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.14), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.18), transparent 30%),
    linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.35);
}

.brand strong,
.footer-brand {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

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

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

.main-nav a:hover {
  color: white;
}

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

.hero {
  position: relative;
  min-height: 68vh;
  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.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 40%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 72px;
  z-index: 2;
  max-width: 720px;
}

.hero-badges,
.detail-badges,
.tag-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-badges span,
.detail-badges span,
.tag-row span,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #dbeafe;
  font-size: 12px;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(15px, 2vw, 18px);
}

.hero-actions,
.section-head,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(15, 23, 42, 0.74);
  color: white;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(34, 211, 238, 0.54);
}

.btn.primary {
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  border-color: transparent;
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 99px;
  border: 0;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.content-space {
  padding: 56px 0 72px;
}

.section {
  margin: 0 0 62px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  font-style: normal;
}

.section-title h2,
.page-title h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.section-subtitle,
.page-title p,
.detail-info p,
.category-card p,
.search-intro {
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 22px 70px rgba(34, 211, 238, 0.13);
}

.poster-link {
  position: relative;
  display: block;
  height: 248px;
  overflow: hidden;
}

.movie-card.compact .poster-link {
  height: 190px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent 56%);
}

.play-dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.88);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: scale(1);
}

.poster-region,
.poster-year {
  position: absolute;
  top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.poster-region {
  left: 10px;
}

.poster-year {
  right: 10px;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  min-height: 42px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.meta-line span:first-child {
  color: var(--amber);
  font-weight: 800;
}

.tag-row {
  margin-top: 10px;
}

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

.category-card {
  min-height: 188px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.62));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
}

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

.rank-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rank-panel {
  padding: 22px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.rank-panel h3 {
  margin: 0 0 14px;
  font-size: 22px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.rank-item:hover .rank-title {
  color: var(--cyan);
}

.rank-num {
  color: var(--cyan);
  font-weight: 900;
  font-size: 18px;
}

.rank-score {
  color: var(--amber);
  font-weight: 800;
}

.page-hero {
  padding: 52px 0 28px;
}

.page-title {
  max-width: 820px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.breadcrumb em {
  color: #475569;
  font-style: normal;
}

.detail-hero {
  padding: 42px 0 36px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
}

.player-cover.hidden {
  display: none;
}

.big-play {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  font-size: 30px;
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.3);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 20px;
}

.detail-poster img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.text-card {
  padding: 26px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}

.text-card h2 {
  margin: 0 0 14px;
}

.text-card p {
  color: #cbd5e1;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin: 26px 0 18px;
}

.search-box input,
.search-box select {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: white;
  background: rgba(15, 23, 42, 0.82);
  outline: none;
}

.search-box input:focus,
.search-box select:focus {
  border-color: rgba(34, 211, 238, 0.5);
}

.search-results-info {
  margin: 0 0 20px;
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  color: #cbd5e1;
}

.pagination .active {
  color: white;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  border-color: transparent;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, #020617, #0f172a);
  color: var(--muted);
  padding: 44px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

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

.footer-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

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

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

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

@media (max-width: 820px) {
  .nav-wrap {
    min-height: 66px;
  }

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .main-nav a:hover {
    background: rgba(148, 163, 184, 0.08);
  }

  .hero {
    min-height: 76vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    bottom: 58px;
  }

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

  .poster-link,
  .movie-card.compact .poster-link {
    height: 210px;
  }

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

  .search-box {
    grid-template-columns: 1fr;
  }
}

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

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    display: none;
  }

  .poster-link,
  .movie-card.compact .poster-link {
    height: 180px;
  }

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

  .hero-actions .btn,
  .detail-actions .btn {
    width: 100%;
  }
}
