:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #1e293b;
  --card-hover: #263449;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --blue: #38bdf8;
  --red: #fb7185;
  --green: #34d399;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  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.16), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.14), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::selection {
  background: rgba(245, 158, 11, 0.5);
  color: #ffffff;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #ffffff;
  font-size: 13px;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.14);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
}

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

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, #020617 0%, #111827 42%, #020617 100%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
}

.hero-glow span {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  filter: blur(64px);
  animation: pulse-glow 7s ease-in-out infinite;
}

.hero-glow span:first-child {
  top: 80px;
  left: 12%;
  background: rgba(245, 158, 11, 0.4);
}

.hero-glow span:last-child {
  right: 10%;
  bottom: 20px;
  background: rgba(56, 189, 248, 0.34);
  animation-delay: 1.4s;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.56;
  }

  50% {
    transform: scale(1.12);
    opacity: 0.9;
  }
}

.hero-stage {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 48px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  font-size: 14px;
}

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

.hero-title-small {
  display: block;
  margin-top: 12px;
  color: var(--amber);
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.03em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--muted-strong);
  font-size: 18px;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.22);
}

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

.hero-poster {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(56, 189, 248, 0.18));
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-slide.is-active .hero-poster img {
  transform: scale(1.04);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), transparent 62%);
}

.hero-card-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 2;
}

.hero-card-caption strong {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
}

.hero-card-caption span {
  color: var(--muted-strong);
}

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

.hero-dot,
.hero-arrow {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
}

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

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

.quick-cats {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: -42px auto 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.quick-cats a,
.category-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.quick-cats a {
  padding: 18px;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.quick-cats a:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.9);
}

.quick-cats b {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
}

.quick-cats span {
  color: var(--muted);
  font-size: 13px;
}

.main-content {
  padding: 78px 0 86px;
}

.content-section {
  margin-bottom: 76px;
}

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

.section-head h2,
.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p,
.page-head p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: #fbbf24;
  font-weight: 700;
}

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

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

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

.movie-card[hidden] {
  display: none;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.84);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, background 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  background: var(--card-hover);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.36);
}

.poster-frame {
  position: relative;
  height: 244px;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(245, 158, 11, 0.36), transparent 36%),
    linear-gradient(145deg, #111827, #334155);
}

.movie-card-wide .poster-frame {
  height: 160px;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.05));
}

.poster-frame em,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-style: normal;
  font-weight: 800;
}

.poster-frame em {
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #ffffff;
  font-size: 13px;
}

.movie-info {
  padding: 16px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 27px;
  margin-bottom: 10px;
}

.tag-row span {
  padding: 3px 8px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.82);
  color: #fbbf24;
  font-size: 12px;
}

.movie-info h3 {
  margin: 0 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card a:hover h3 {
  color: #fbbf24;
}

.movie-info p {
  min-height: 45px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
}

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

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

.category-card span {
  color: #fbbf24;
  font-weight: 700;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 52px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 14% 10%, rgba(245, 158, 11, 0.24), transparent 28%),
    radial-gradient(circle at 86% 22%, rgba(56, 189, 248, 0.18), transparent 30%),
    rgba(15, 23, 42, 0.5);
}

.page-hero .page-head {
  align-items: center;
  margin-bottom: 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 0.7fr));
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.66);
  color: #ffffff;
  padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.58);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.72);
  transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(38, 52, 73, 0.9);
}

.ranking-no {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-weight: 900;
}

.ranking-thumb {
  width: 96px;
  height: 62px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #334155);
}

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

.ranking-copy h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.ranking-copy p {
  margin: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-meta {
  color: #fbbf24;
  font-weight: 800;
}

.detail-main {
  padding-bottom: 86px;
}

.detail-hero {
  padding: 54px 0 36px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 14% 20%, rgba(245, 158, 11, 0.2), transparent 30%),
    rgba(15, 23, 42, 0.46);
}

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

.breadcrumb a {
  color: #fbbf24;
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #334155);
  box-shadow: var(--shadow);
}

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

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

.detail-copy p {
  max-width: 780px;
  margin: 0 0 18px;
  color: var(--muted-strong);
  font-size: 18px;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span,
.detail-tags a,
.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
  color: var(--muted-strong);
}

.detail-tags a,
.detail-tags span {
  color: #fbbf24;
}

.watch-section {
  padding: 34px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 34%),
    rgba(2, 6, 23, 0.62);
  color: #ffffff;
  text-align: center;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.play-ring {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
  font-size: 32px;
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 42px);
}

.player-cover small {
  color: var(--muted-strong);
  font-size: 15px;
}

.detail-section {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-section p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 17px;
}

.related-section {
  margin-top: 48px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.site-footer p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

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

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

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 42px 0 78px;
  }

  .hero-poster {
    min-height: 240px;
  }

  .hero-poster img {
    height: 260px;
  }

  .detail-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .detail-poster img {
    height: 330px;
  }
}

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

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

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

  .hero-carousel,
  .hero-stage {
    min-height: 720px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .quick-cats,
  .category-grid,
  .movie-grid,
  .movie-grid.featured-grid,
  .filter-panel,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-cats {
    margin-top: 16px;
  }

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

  .ranking-item {
    grid-template-columns: 46px 78px minmax(0, 1fr);
  }

  .ranking-meta {
    grid-column: 2 / -1;
  }

  .detail-poster {
    max-width: 300px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
