:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, 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.24), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.26), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #cbd5e1;
  font-weight: 700;
}

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

.nav-links a:hover {
  color: #67e8f9;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #e2e8f0;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.14) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, rgba(2, 6, 23, 0.36) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 64px;
  width: min(680px, calc(100% - 64px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  box-shadow: 0 18px 46px rgba(8, 145, 178, 0.35);
}

.btn-secondary {
  border: 1px solid rgba(226, 232, 240, 0.22);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(8, 145, 178, 0.55);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-next {
  right: 24px;
  transform: translateY(-50%);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.page-hero {
  padding: 74px 0 36px;
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.section {
  padding: 52px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 580px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 232, 249, 0.38);
  box-shadow: 0 24px 60px rgba(8, 145, 178, 0.18);
}

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

.poster-frame {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0f172a;
}

.poster-frame img,
.rank-cover img,
.related-card img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

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

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

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

.movie-title {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-title:hover {
  color: #67e8f9;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
}

.movie-card p {
  display: -webkit-box;
  min-height: 64px;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
}

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

.feature-grid .movie-card .poster-frame {
  aspect-ratio: 16 / 10;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(8, 145, 178, 0.24), transparent 54%),
    rgba(15, 23, 42, 0.7);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.42);
}

.category-tile strong {
  font-size: 23px;
  font-weight: 950;
}

.category-tile p {
  margin: 12px 0 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 10px 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
}

.search-box {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.46);
}

.search-box span {
  color: #67e8f9;
  font-weight: 900;
}

.search-box input,
.filter-select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #f8fafc;
  background: transparent;
  font: inherit;
}

.filter-select {
  flex: 0 0 160px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.46);
}

.filter-select option {
  color: #0f172a;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 14px;
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  aspect-ratio: 4 / 5;
}

.rank-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 30px;
  border-radius: 999px;
  color: #020617;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  font-weight: 950;
}

.rank-info {
  align-self: center;
}

.rank-info > a {
  font-size: 20px;
  font-weight: 950;
}

.rank-info > a:hover {
  color: #67e8f9;
}

.rank-info p {
  margin: 10px 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 360px;
  gap: 30px;
  align-items: start;
  padding: 28px 0 56px;
}

.player-card,
.detail-card,
.related-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-trigger {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 50px rgba(8, 145, 178, 0.42);
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.player-trigger:hover {
  transform: scale(1.06);
}

.player-error {
  display: none;
  padding: 14px 18px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.38);
}

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

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-card h2,
.related-panel h2 {
  margin: 26px 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.detail-card p {
  color: #dbeafe;
  font-size: 16px;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.tag-list span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-cover span {
  display: block;
  padding: 14px 18px;
  color: #cbd5e1;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.78);
}

.related-panel {
  margin-top: 20px;
  padding: 20px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
}

.related-card .thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 5;
  background: #0f172a;
}

.related-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.related-card strong:hover {
  color: #67e8f9;
}

.related-card small {
  display: block;
  margin-top: 6px;
  color: #94a3b8;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  padding: 42px 0;
}

.footer-grid p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 18px 0 26px;
  text-align: center;
  color: #64748b;
}

.empty-filter {
  display: none;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
}

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

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 0 4px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
  }

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

  .hero-content {
    left: 20px;
    bottom: 78px;
    width: calc(100% - 40px);
  }

  .hero-control {
    top: auto;
    bottom: 24px;
  }

  .hero-prev {
    left: 20px;
  }

  .hero-next {
    right: 20px;
  }

  .hero-dots {
    bottom: 38px;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .movie-grid.wide,
  .feature-grid,
  .category-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 104px 1fr;
  }

  .filter-select {
    flex: 1 1 150px;
  }

  .detail-card,
  .related-panel {
    padding: 20px;
    border-radius: 22px;
  }
}
