:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #f97316;
  --brand-2: #f59e0b;
  --brand-3: #ef4444;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.18), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #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.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fb923c, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  min-width: 320px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input {
  padding: 10px 14px;
}

.top-search button,
.wide-search button,
.clear-filter {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

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

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

.mobile-panel.is-open {
  display: block;
}

.mobile-links,
.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-cats {
  margin-top: 12px;
  color: var(--muted);
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-wrap {
  position: relative;
  min-height: 620px;
  margin: 28px 0 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  min-height: 620px;
  display: none;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.6fr);
  gap: 34px;
  align-items: center;
  padding: clamp(30px, 6vw, 76px);
  position: relative;
  isolation: isolate;
}

.hero-slide.is-active {
  display: grid;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.45)),
    var(--hero-image) center / cover no-repeat;
  z-index: -2;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 20%;
  height: 64%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.34), transparent 66%);
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fdba74;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-info .one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 1.08rem;
}

.hero-tags,
.detail-meta,
.detail-tags,
.tag-row,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-tags,
.detail-meta,
.detail-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.detail-tags a,
.tag-row span,
.meta-line span,
.meta-line a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #fed7aa;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-detail-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

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

.section-block {
  margin: 34px 0;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.24);
}

.quick-search,
.section-title,
.filter-bar,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.quick-search h2,
.section-title h2,
.detail-copy h2,
.category-detail-card h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.2;
}

.quick-search p,
.category-detail-card p,
.detail-copy p,
.site-footer p {
  color: var(--muted);
}

.wide-search {
  flex: 1;
  max-width: 620px;
  display: flex;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.64);
}

.wide-search input {
  padding: 12px 16px;
}

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

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #111827;
  transition: 0.2s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.92) 82%),
    var(--tile-image) center / cover no-repeat;
  opacity: 0.82;
}

.category-tile strong,
.category-tile span,
.category-tile p {
  position: relative;
}

.category-tile strong {
  font-size: 1.25rem;
}

.category-tile span {
  color: #fdba74;
  font-weight: 800;
}

.category-tile p {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 0.92rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.movie-grid {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.58);
  transition: 0.2s ease;
}

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

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

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

.year-chip,
.rank-badge {
  position: absolute;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.year-chip {
  right: 10px;
}

.rank-badge {
  left: 10px;
  background: linear-gradient(135deg, var(--brand-3), var(--brand));
}

.card-body {
  padding: 15px;
}

.movie-title {
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover,
.section-title a:hover,
.inline-links a:hover {
  color: #fb923c;
}

.card-body p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 8px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.compact-card .card-body p {
  -webkit-line-clamp: 2;
  min-height: 3.2em;
}

.meta-line {
  gap: 6px;
  margin: 10px 0;
}

.tag-row {
  gap: 6px;
}

.rank-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.45);
}

.rank-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 34px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-item img {
  width: 56px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
  font-weight: 900;
}

.rank-item strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

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

.page-hero,
.detail-hero {
  position: relative;
  margin: 28px 0 32px;
  padding: clamp(30px, 6vw, 68px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 15%, rgba(249, 115, 22, 0.2), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.82));
  box-shadow: var(--shadow);
}

.page-hero.slim-hero {
  min-height: 300px;
  display: grid;
  align-content: center;
}

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

.category-detail-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.42);
  transition: 0.2s ease;
}

.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.category-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.category-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  font-weight: 900;
}

.category-count {
  margin: 10px 0;
  color: #fdba74;
  font-weight: 800;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-links a {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--soft);
  font-size: 0.86rem;
}

.filter-bar {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.filter-bar input,
.filter-bar select {
  width: auto;
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.54);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  isolation: isolate;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74)),
    var(--detail-bg) center / cover no-repeat;
  z-index: -1;
  filter: saturate(1.05);
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

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

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

.player-section {
  padding: 0;
  overflow: hidden;
}

.player-box {
  position: relative;
  width: 100%;
  background: #000000;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  cursor: pointer;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.35);
  font-size: 2rem;
}

.detail-copy {
  max-width: 920px;
}

.detail-copy h2 + p {
  margin-top: 10px;
}

.detail-copy p + h2 {
  margin-top: 26px;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  align-items: flex-start;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--soft);
}

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

@media (max-width: 1100px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

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

  .hero-slide,
  .detail-hero,
  .two-column {
    grid-template-columns: 1fr;
  }

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  main,
  .nav-shell,
  .mobile-panel,
  .footer-inner {
    width: min(100% - 22px, 1280px);
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .hero-wrap,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 30px 20px 72px;
  }

  .hero-poster {
    max-width: 250px;
  }

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

  .wide-search {
    width: 100%;
    max-width: none;
  }

  .category-grid,
  .category-list-block,
  .full-rank,
  .full-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-bar input,
  .filter-bar select,
  .clear-filter {
    width: 100%;
  }
}
