:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.76);
  --card-strong: rgba(30, 41, 59, 0.9);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f97316;
  --accent-2: #f59e0b;
  --teal: #14b8a6;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% -10%, rgba(249, 115, 22, 0.22), transparent 36rem),
    radial-gradient(circle at 85% 10%, rgba(20, 184, 166, 0.12), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(18px);
}

.site-nav {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.34);
  font-size: 14px;
}

.brand-text,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(90deg, #fb923c, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  justify-content: flex-end;
}

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

.nav-link {
  padding: 10px 15px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.95);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.filter-bar input,
.filter-bar select,
.search-panel input {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  outline: none;
  border-radius: 13px;
  padding: 11px 13px;
  min-width: 220px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
  border-color: rgba(249, 115, 22, 0.72);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
  background: rgba(2, 6, 23, 0.95);
}

.header-search button,
.search-panel button,
.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.search-panel button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.25);
}

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

.header-search button:hover,
.search-panel button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.28);
}

.menu-button {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(51, 65, 85, 0.86);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 4s ease;
}

.hero-slide.is-active .hero-bg {
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.68) 44%, rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 42%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  top: 50%;
  transform: translateY(-50%);
  max-width: 700px;
  padding-right: 24px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 0 0 24px;
  max-width: 680px;
  color: var(--muted-strong);
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
  color: #fed7aa;
  font-style: normal;
  font-size: 13px;
}

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
}

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

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

.quick-cats {
  max-width: 1280px;
  margin: -42px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.quick-cats a,
.category-card,
.detail-card,
.side-card,
.rank-panel,
.ranking-block,
.page-hero,
.cta-section {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.74));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-cats a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  min-height: 118px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-cats a:hover,
.category-card:hover,
.movie-card:hover,
.horizontal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.5);
}

.quick-cats strong {
  color: #fff;
  font-size: 18px;
}

.quick-cats span {
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px 80px;
}

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

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

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

.section-heading h2,
.rank-panel h2,
.ranking-block h2,
.side-card h2,
.detail-card h2,
.page-hero h1,
.cta-section h2 {
  margin: 0;
}

.section-heading h2,
.rank-panel h2,
.ranking-block h2,
.side-card h2,
.detail-card h2 {
  font-size: 26px;
}

.section-more {
  color: #fb923c;
  font-weight: 700;
}

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

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

.movie-card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 22px 44px rgba(249, 115, 22, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.poster-wrap img,
.category-covers img,
.horizontal-cover img,
.poster-card img,
.ranking-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img,
.horizontal-cover img,
.category-covers img {
  transition: transform 0.42s ease;
}

.movie-card:hover .poster-wrap img,
.horizontal-card:hover .horizontal-cover img,
.category-card:hover .category-covers img {
  transform: scale(1.08);
}

.card-play,
.horizontal-cover span {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.card-play {
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.movie-info strong,
.horizontal-info strong,
.rank-copy strong {
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
}

.movie-info small,
.horizontal-info small,
.rank-copy small,
.poster-card span,
.detail-meta {
  color: var(--muted);
  font-style: normal;
}

.movie-info em,
.horizontal-info em,
.rank-copy em {
  color: var(--muted-strong);
  font-style: normal;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 4px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 28px;
  margin-bottom: 72px;
}

.horizontal-list,
.side-list {
  display: grid;
  gap: 15px;
}

.horizontal-card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 18px;
  overflow: hidden;
  min-height: 124px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.horizontal-cover {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  background: rgba(15, 23, 42, 0.9);
}

.horizontal-cover span {
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 13px;
}

.horizontal-info,
.rank-copy {
  padding: 15px;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.rank-panel,
.ranking-block,
.side-card,
.detail-card,
.page-hero,
.cta-section {
  border-radius: 24px;
  padding: 24px;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.68);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-list a:hover {
  background: rgba(249, 115, 22, 0.16);
  transform: translateX(4px);
}

.rank-list span,
.rank-number {
  color: #fed7aa;
  font-weight: 900;
}

.rank-list strong,
.rank-list small {
  grid-column: 2;
}

.rank-list small {
  color: var(--muted);
}

.cta-section {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.cta-section p:not(.eyebrow) {
  color: var(--muted-strong);
  line-height: 1.8;
  margin: 18px auto 24px;
  max-width: 680px;
}

.page-hero {
  margin-bottom: 34px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 24rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.78));
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.03em;
}

.page-hero p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted-strong);
  line-height: 1.8;
  font-size: 17px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 72px;
}

.category-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
}

.category-body {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.category-body strong {
  font-size: 22px;
}

.category-body em {
  color: var(--muted-strong);
  font-style: normal;
  line-height: 1.65;
}

.filter-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.filter-bar input {
  min-width: min(380px, 100%);
  flex: 1;
}

.filter-bar select {
  min-width: 170px;
}

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.34);
  color: var(--muted-strong);
  text-align: center;
  border-radius: 20px;
  padding: 34px;
  background: rgba(15, 23, 42, 0.54);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 14px;
}

.breadcrumb a {
  color: #fb923c;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.detail-main {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.44));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 52px rgba(249, 115, 22, 0.38);
  font-size: 28px;
  padding-left: 5px;
}

.player-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.detail-card h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
}

.detail-card h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 22px;
}

.detail-card p {
  color: var(--muted-strong);
  line-height: 1.95;
  font-size: 16px;
}

.detail-tags {
  margin: 18px 0 10px;
}

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

.poster-card {
  display: grid;
  gap: 12px;
}

.poster-card img {
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  background: rgba(15, 23, 42, 0.9);
}

.poster-card strong {
  font-size: 22px;
}

.side-list .horizontal-card {
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 98px;
}

.side-list .horizontal-cover {
  min-height: 98px;
}

.side-list .horizontal-info em {
  -webkit-line-clamp: 1;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 42px 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-list a:hover {
  background: rgba(249, 115, 22, 0.16);
  transform: translateY(-2px);
}

.ranking-list img {
  width: 70px;
  height: 86px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.search-panel input {
  flex: 1;
  min-width: min(620px, 100%);
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr);
  gap: 28px;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  line-height: 1.75;
}

.footer-grid a {
  display: block;
  margin-top: 8px;
}

.footer-grid a:hover {
  color: #fb923c;
}

.footer-grid h2 {
  color: #fff;
  font-size: 17px;
  margin: 2px 0 14px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .compact-grid,
  .archive-grid,
  .category-grid,
  .quick-cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-section,
  .detail-layout,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .site-nav {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }

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

  .nav-panel {
    display: none;
    width: 100%;
    flex-basis: 100%;
    align-items: stretch;
    flex-direction: column;
    padding: 10px 0 4px;
  }

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

  .nav-links,
  .header-search {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .header-search input,
  .header-search button {
    width: 100%;
  }

  .hero {
    height: 620px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    top: 52%;
    padding: 0;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(34px, 11vw, 52px);
  }

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

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

  .horizontal-card,
  .side-list .horizontal-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 19px;
  }

  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-actions,
  .filter-bar,
  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions a,
  .filter-bar input,
  .filter-bar select,
  .search-panel input,
  .search-panel button {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .archive-grid,
  .category-grid,
  .quick-cats {
    grid-template-columns: 1fr;
  }

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

  .horizontal-card,
  .side-list .horizontal-card,
  .ranking-list a {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .ranking-list .rank-number {
    grid-column: 1 / -1;
  }

  .detail-title-row {
    flex-direction: column;
  }

  .player-shell {
    border-radius: 18px;
  }
}
