:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --orange: #f97316;
  --red: #dc2626;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(249, 115, 22, 0.18), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(220, 38, 38, 0.16), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.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);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.3);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(249, 115, 22, 0.16);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
}

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

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.76) 42%, rgba(0, 0, 0, 0.16) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 45%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1180px) / 2));
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.25);
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-info p {
  max-width: 720px;
  color: #d1d5db;
  font-size: 18px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.hero-tags span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.55);
}

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

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.3);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.58);
}

.hero-control {
  position: absolute;
  top: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 32px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: #fff;
}

.main-container {
  padding: 52px 0;
}

.page-main {
  padding-top: 34px;
}

.content-section,
.category-strip,
.category-overview,
.search-panel,
.page-hero,
.detail-hero,
.player-section {
  margin-bottom: 54px;
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.text-link {
  color: #fdba74;
  font-weight: 800;
}

.search-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.search-panel label {
  display: block;
  margin-bottom: 12px;
  color: #e2e8f0;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-row input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #fff;
  outline: none;
  background: rgba(2, 6, 23, 0.84);
}

.search-row input:focus {
  border-color: rgba(249, 115, 22, 0.8);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-row button {
  min-width: 92px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: #334155;
  cursor: pointer;
}

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

.category-pill {
  display: grid;
  min-height: 110px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(220, 38, 38, 0.08)),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-pill:hover {
  border-color: rgba(249, 115, 22, 0.55);
  transform: translateY(-3px);
}

.category-pill strong {
  font-size: 18px;
}

.category-pill span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.52);
  transform: translateY(-5px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.06);
}

.cover-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.movie-year,
.movie-score {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(8px);
}

.movie-year {
  left: 12px;
}

.movie-score {
  right: 12px;
  color: #111827;
  background: var(--gold);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.3;
}

.movie-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-info,
.detail-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.movie-info span,
.detail-meta span,
.ranking-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

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

.ranking-list.compact {
  grid-template-columns: repeat(2, 1fr);
}

.ranking-item {
  display: grid;
  grid-template-columns: 78px 46px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.ranking-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.ranking-number {
  color: #fdba74;
  font-size: 24px;
  font-weight: 900;
}

.ranking-main h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ranking-main p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-heat {
  min-width: 62px;
  text-align: right;
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.2), transparent 35%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 260px;
}

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

.breadcrumb a:hover {
  color: #fdba74;
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
}

.category-art {
  position: relative;
  min-height: 250px;
  overflow: hidden;
}

.category-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-art span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.6));
}

.category-body {
  padding: 24px;
}

.category-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  font-size: 13px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.24), transparent 35%),
    rgba(2, 6, 23, 0.58);
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.35);
  cursor: pointer;
}

.play-button span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.article-section {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
}

.article-section p {
  margin: 0;
  color: #d1d5db;
  font-size: 17px;
}

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

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 18px;
}

.footer-inner p {
  max-width: 560px;
  color: var(--muted);
}

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

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

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

.is-hidden-by-search {
  display: none !important;
}

@media (max-width: 1080px) {
  .grid-5,
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .ranking-list.compact,
  .category-card-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .hero-content {
    top: auto;
    bottom: 74px;
    transform: none;
  }

  .hero-control {
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    right: 18px;
  }

  .hero-dots {
    left: 50%;
    right: auto;
    bottom: 36px;
    transform: translateX(-50%);
  }

  .grid-5,
  .grid-4,
  .grid-3,
  .category-pill-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .category-art {
    min-height: 220px;
  }

  .ranking-item {
    grid-template-columns: 68px 34px 1fr;
  }

  .ranking-heat {
    grid-column: 3;
    text-align: left;
    font-size: 18px;
  }

  .footer-inner,
  .section-heading,
  .search-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .grid-5,
  .grid-4,
  .grid-3,
  .category-pill-grid {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .footer-inner,
  .main-container,
  .copyright {
    width: min(100% - 22px, 1180px);
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .page-hero,
  .detail-hero,
  .search-panel,
  .article-section {
    border-radius: 22px;
  }
}
