:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --light: #f8fafc;
  --accent: #f97316;
  --accent-2: #ef4444;
  --accent-3: #facc15;
  --cyan: #22d3ee;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.20), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #07111f 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

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

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

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--light);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent), var(--accent-3));
  color: #020617;
  box-shadow: 0 14px 35px rgba(249, 115, 22, 0.32);
}

.brand-text {
  font-size: 22px;
}

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

.nav-link,
.mobile-link {
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--light);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link:hover,
.mobile-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--light);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.hero {
  position: relative;
  width: min(1220px, calc(100% - 32px));
  height: 70vh;
  min-height: 560px;
  margin: 28px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 44px;
  align-items: center;
  padding: 72px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.01);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: blur(1px) saturate(1.1);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(15, 23, 42, 0.32) 100%),
    radial-gradient(circle at 22% 24%, rgba(249, 115, 22, 0.26), transparent 24rem),
    radial-gradient(circle at 75% 80%, rgba(34, 211, 238, 0.18), transparent 20rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.08);
  font-weight: 700;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  color: var(--light);
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

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

.hero-tags,
.movie-card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0 0;
}

.hero-tags span,
.movie-card-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.detail-action,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button,
.detail-action {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-3), var(--accent), var(--accent-2));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.28);
}

.ghost-button,
.section-more {
  color: var(--light);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.detail-action:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.50);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 72px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

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

.hero-category-strip {
  position: absolute;
  z-index: 4;
  right: 26px;
  bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 420px;
}

.hero-category-strip a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
}

.main-shell,
.detail-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.main-shell {
  padding: 32px 0 68px;
}

.content-section {
  margin-top: 52px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading p {
  margin: 0 0 4px;
  color: #fb923c;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0;
  color: var(--light);
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.03em;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.42));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 22px 60px rgba(249, 115, 22, 0.12);
}

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

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.poster-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
}

.poster-meta {
  left: 12px;
  bottom: 12px;
  color: #e2e8f0;
  font-size: 13px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, #f97316);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

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

.movie-card h3 {
  margin: 12px 0 8px;
  color: var(--light);
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.text-link:hover {
  color: #fb923c;
}

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

.movie-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #cbd5e1;
  font-size: 13px;
}

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

.category-tile {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.45);
}

.category-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-images img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.category-title {
  color: var(--light);
  font-size: 20px;
  font-weight: 900;
}

.category-desc {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  margin-top: 28px;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 16% 20%, rgba(249, 115, 22, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
}

.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--light);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-title p {
  max-width: 820px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px 160px;
  gap: 14px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.42);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--light);
  background: rgba(15, 23, 42, 0.92);
  padding: 0 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 92px 54px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(249, 115, 22, 0.40);
}

.rank-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.rank-number {
  color: #fb923c;
  font-size: 28px;
  font-weight: 900;
}

.rank-info h3 {
  margin: 0 0 6px;
  color: var(--light);
  font-size: 20px;
}

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

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.rank-score {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  font-weight: 900;
  font-size: 18px;
}

.detail-shell {
  padding: 28px 0 68px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
}

.detail-top {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(239, 68, 68, 0.20), transparent 20rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.45);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
}

.detail-intro {
  margin-top: 24px;
}

.detail-intro h2,
.player-section h2 {
  margin: 0 0 10px;
  color: var(--light);
  font-size: 26px;
}

.detail-intro p {
  margin: 0;
  color: #cbd5e1;
}

.player-section {
  margin-top: 38px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.66));
  cursor: pointer;
}

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

.play-button {
  width: 94px;
  height: 94px;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f97316, #ef4444);
  box-shadow: 0 20px 55px rgba(249, 115, 22, 0.42);
  cursor: pointer;
  font-size: 30px;
  font-weight: 900;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-top: 38px;
}

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

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: var(--light);
}

.detail-panel p {
  margin: 0 0 18px;
  color: #cbd5e1;
}

.side-list {
  display: grid;
  gap: 12px;
}

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

.side-card img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.side-card h3 {
  margin: 0 0 4px;
  color: var(--light);
  font-size: 15px;
  line-height: 1.35;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 520px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

.copyright {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: #64748b;
  font-size: 14px;
}

.empty-state {
  display: none;
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 48px;
  }

  .hero-poster {
    display: none;
  }

  .detail-body,
  .detail-top {
    grid-template-columns: 1fr;
  }

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

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

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

  .menu-button {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-slide {
    padding: 34px 24px 130px;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .hero-dots {
    left: 24px;
    bottom: 86px;
  }

  .hero-category-strip {
    left: 24px;
    right: 24px;
    bottom: 22px;
    justify-content: flex-start;
  }

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

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

  .page-hero {
    padding: 34px 24px;
  }

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

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

  .rank-score {
    grid-column: 2 / 4;
    width: auto;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero,
  .main-shell,
  .detail-shell,
  .page-hero,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .copyright {
    width: min(100% - 22px, 1220px);
  }

  .detail-top,
  .detail-panel,
  .side-panel {
    padding: 18px;
  }
}
