:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(30, 41, 59, 0.38);
  --panel-strong: rgba(15, 23, 42, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --line-hot: rgba(245, 158, 11, 0.36);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --blue: #06b6d4;
  --green: #10b981;
  --radius: 18px;
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.08), transparent 26%),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  color: #020617;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.brand-name,
.footer-brand {
  font-size: 1.24rem;
  background: linear-gradient(90deg, var(--amber-light), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  color: var(--muted);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.09);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.72);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-menu.is-open {
  display: grid;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

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

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 92px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-light);
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  width: min(680px, 100%);
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 1.14rem;
}

.hero-meta,
.detail-meta,
.movie-meta {
  color: var(--subtle);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  font-weight: 600;
}

.hero-actions,
.section-head,
.card-head,
.category-head,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn,
.play-button,
.filter-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  color: #020617;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover,
.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(245, 158, 11, 0.34);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line-hot);
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.08);
}

.btn-ghost:hover {
  border-color: var(--amber-light);
  background: rgba(245, 158, 11, 0.13);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.slider-arrow.prev {
  left: 24px;
}

.slider-arrow.next {
  right: 24px;
}

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

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

.slider-dot.active {
  width: 32px;
  background: var(--amber-light);
}

.main-sections {
  padding: 72px 0;
}

.section {
  margin-bottom: 76px;
}

.section-head {
  margin-bottom: 26px;
}

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

.section-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #020617;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.section-icon.red {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

.section-icon.blue {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, var(--blue));
}

.section-icon.purple {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, var(--pink));
}

.section h2,
.page-section h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.2;
}

.view-more {
  color: var(--subtle);
  font-weight: 700;
}

.view-more:hover {
  color: var(--amber-light);
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-hot);
  background: rgba(30, 41, 59, 0.58);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.1);
}

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

.movie-card.large .movie-poster,
.movie-card.featured .movie-poster {
  aspect-ratio: 16 / 10;
}

.movie-poster img,
.horizontal-poster img,
.detail-cover img,
.related-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.movie-poster::after,
.related-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-poster::after,
.related-card:hover a::after {
  opacity: 1;
}

.movie-rating {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.74);
  color: var(--amber-light);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 8px;
  backdrop-filter: blur(10px);
}

.movie-info {
  padding: 14px;
}

.movie-info h3,
.horizontal-info h3,
.related-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.35;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  font-size: 1rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info a:hover,
.horizontal-info a:hover,
.related-card a:hover {
  color: var(--amber-light);
}

.movie-meta {
  margin: 0 0 8px;
  font-size: 0.82rem;
}

.movie-line {
  display: -webkit-box;
  min-height: 3em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-panel,
.info-panel,
.filter-panel,
.detail-card,
.player-card,
.breadcrumbs {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.category-panel {
  padding: 22px;
}

.category-head {
  margin-bottom: 18px;
}

.category-head h3 {
  margin: 0;
  color: var(--amber-light);
  font-size: 1.25rem;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 18px;
  padding: 12px;
}

.horizontal-card:hover {
  transform: translateY(-3px);
}

.horizontal-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

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

.horizontal-info p {
  margin: 0;
  color: var(--muted);
}

.horizontal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.rank-badge {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #020617;
  font-weight: 900;
}

.page-hero {
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.14), rgba(249, 115, 22, 0.06), transparent);
  padding: 74px 0 58px;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.page-section {
  padding: 58px 0;
}

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

.overview-card {
  display: block;
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.18), transparent 34%),
    rgba(30, 41, 59, 0.34);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.overview-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-hot);
}

.overview-card h2 {
  margin: 0 0 14px;
  color: var(--text);
}

.overview-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.overview-card span {
  color: var(--amber-light);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 18px;
  margin-bottom: 28px;
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--subtle);
  font-weight: 700;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  color: var(--text);
  outline: 0;
  padding: 13px 15px;
}

.search-box input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--line-hot);
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-light);
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--subtle);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 30px;
  padding: 40px 0 72px;
}

.breadcrumbs {
  margin-top: 26px;
  padding: 12px 16px;
  color: var(--subtle);
  font-size: 0.94rem;
}

.breadcrumbs a:hover {
  color: var(--amber-light);
}

.player-card {
  overflow: hidden;
  margin-bottom: 26px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.08)),
    transparent;
  color: #fff;
  cursor: pointer;
}

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

.play-button {
  min-width: 148px;
  min-height: 54px;
  font-size: 1.05rem;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.12;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 22px;
  font-weight: 700;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--amber-light);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 5px 10px;
}

.detail-copy {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.detail-copy h2,
.sidebar h2 {
  margin: 0 0 10px;
  color: var(--amber-light);
  font-size: 1.25rem;
}

.detail-copy p {
  margin: 0;
  color: var(--muted);
}

.sidebar {
  display: grid;
  gap: 22px;
  align-content: start;
}

.detail-cover,
.related-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.detail-cover {
  aspect-ratio: 2 / 3;
}

.related-block {
  padding: 18px;
}

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

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

.related-card a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.related-card h3 {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  font-size: 0.94rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.76);
  padding: 38px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.footer-grid p {
  max-width: 680px;
  color: var(--subtle);
}

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

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

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

.copyright {
  margin-top: 20px;
  color: var(--subtle);
  font-size: 0.9rem;
}

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

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

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

  .sidebar {
    grid-template-columns: minmax(220px, 320px) 1fr;
  }
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

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

  .hero-slider {
    min-height: 580px;
    height: 78vh;
  }

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

  .slider-arrow {
    display: none;
  }

  .hero-meta,
  .hero-actions,
  .section-head,
  .card-head,
  .category-head,
  .detail-actions,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: 112px 1fr;
  }

  .horizontal-info p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

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

  .detail-cover {
    max-width: 320px;
  }
}

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

  .movie-grid,
  .movie-grid.large-grid,
  .category-panels,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .horizontal-card {
    grid-template-columns: 96px 1fr;
    gap: 12px;
  }

  .movie-info h3 {
    min-height: auto;
  }
}
