:root {
  --bg: #0b0d10;
  --bg-deep: #060708;
  --panel: #101419;
  --panel-soft: #151a21;
  --panel-line: #1a2129;
  --line: #333d47;
  --text: #ffffff;
  --muted: #9ca3af;
  --muted-strong: #d1d5db;
  --primary: #f5871f;
  --primary-bright: #f79f3f;
  --primary-dark: #d66d0f;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 20, 25, 0.92);
  border-bottom: 1px solid var(--panel-line);
  backdrop-filter: blur(16px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary);
  color: #130901;
  box-shadow: 0 12px 28px rgba(245, 135, 31, 0.28);
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: var(--panel);
  border-top: 1px solid var(--panel-line);
}

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

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 540px;
  max-height: 820px;
  overflow: hidden;
  background: var(--bg-deep);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 42%, rgba(245, 135, 31, 0.24), transparent 32%),
    linear-gradient(90deg, #060708 0%, rgba(11, 13, 16, 0.92) 38%, rgba(11, 13, 16, 0.15) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 13, 16, 0) 35%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding-top: 28px;
}

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

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-text,
.page-hero p,
.detail-title p {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.quick-links a,
.meta-line span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 135, 31, 0.12);
  color: var(--primary-bright);
  border: 1px solid rgba(245, 135, 31, 0.24);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.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: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

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

.btn.primary {
  background: var(--primary);
  color: #160a02;
}

.btn.primary:hover {
  background: var(--primary-bright);
}

.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn.ghost:hover {
  border-color: rgba(245, 135, 31, 0.5);
  color: var(--primary-bright);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  background: var(--primary);
}

.hero-after {
  margin-top: -46px;
  position: relative;
  z-index: 6;
}

.hero-after-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
  align-items: stretch;
}

.search-panel,
.filter-panel,
.info-panel,
.player-card,
.detail-panel,
.category-card {
  background: rgba(16, 20, 25, 0.92);
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 22px;
}

.search-panel label,
.filter-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.search-line {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.search-line input {
  flex: 1;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 13px 14px;
}

.search-line button {
  border: 0;
  background: var(--primary);
  color: #160a02;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

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

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

.compact-card {
  min-height: 180px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--panel-line);
  background: linear-gradient(135deg, var(--panel), var(--panel-soft));
  box-shadow: var(--shadow);
}

.compact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
}

.compact-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.35s ease;
}

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

.compact-card span,
.compact-card small {
  position: absolute;
  left: 14px;
  right: 14px;
  z-index: 2;
}

.compact-card span {
  bottom: 36px;
  color: var(--text);
  font-weight: 900;
}

.compact-card small {
  bottom: 16px;
  color: var(--muted);
}

.section {
  padding: 72px 0 0;
}

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

.section-heading h2,
.detail-panel h2,
.category-card h2,
.info-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
}

.section-heading p,
.category-card p,
.info-panel p,
.detail-panel p {
  color: var(--muted);
}

.section-more {
  color: var(--primary-bright);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 135, 31, 0.42);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

.movie-card-link {
  display: grid;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(245, 135, 31, 0.2), transparent 34%),
    linear-gradient(135deg, var(--panel-soft), var(--bg-deep));
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.05);
  opacity: 0.86;
}

.badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.badge.quality {
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: #150800;
}

.badge.year {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

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

.page-hero {
  padding: 70px 0 36px;
  background:
    radial-gradient(circle at 80% 0%, rgba(245, 135, 31, 0.14), transparent 32%),
    linear-gradient(180deg, #101419, var(--bg));
  border-bottom: 1px solid var(--panel-line);
}

.filter-panel {
  padding: 18px;
  margin-top: 26px;
}

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

.filter-row input,
.filter-row select {
  width: 100%;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  padding: 12px 13px;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 38px 0 0;
}

.pagination a {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted-strong);
  border: 1px solid var(--panel-line);
  font-weight: 800;
}

.pagination a.current,
.pagination a:hover {
  color: #160a02;
  background: var(--primary);
  border-color: var(--primary);
}

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

.category-card {
  padding: 24px;
}

.category-card nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-card a {
  display: inline-flex;
  border: 1px solid rgba(245, 135, 31, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--primary-bright);
  background: rgba(245, 135, 31, 0.08);
  font-weight: 800;
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 60px 82px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 135, 31, 0.38);
}

.rank-number {
  color: var(--primary);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 82px;
  height: 108px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--panel-soft);
}

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

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

.rank-action {
  color: var(--primary-bright);
  font-weight: 900;
  padding-right: 10px;
}

.detail-hero {
  padding: 42px 0 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(245, 135, 31, 0.16), transparent 34%),
    linear-gradient(180deg, #101419, var(--bg));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 24px;
  align-items: start;
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  border: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(245, 135, 31, 0.34), transparent 24%),
    rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-veil.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #120700;
  font-size: 34px;
  box-shadow: 0 20px 46px rgba(245, 135, 31, 0.34);
}

.player-veil strong {
  font-size: 20px;
}

.detail-title {
  margin: 22px 0 26px;
}

.detail-panel {
  padding: 26px;
  margin-bottom: 22px;
}

.detail-panel p {
  font-size: 16px;
  line-height: 1.9;
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--panel-soft);
}

.side-poster-body {
  padding: 20px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-line);
  color: var(--muted);
}

.info-list strong {
  color: var(--text);
}

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

.empty-state {
  display: none;
  padding: 34px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  background: var(--panel);
}

.empty-state.show {
  display: block;
}

.site-footer {
  margin-top: 76px;
  padding: 42px 0 22px;
  background: var(--panel);
  border-top: 1px solid var(--panel-line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 26px;
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text);
}

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

.footer-grid a:hover {
  color: var(--primary-bright);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 18px;
  text-align: center;
  border-top: 1px solid var(--panel-line);
}

[hidden] {
  display: none !important;
}

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-after-grid,
  .footer-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-copy {
    padding-top: 0;
  }

  .hero-text,
  .page-hero p,
  .detail-title p {
    font-size: 15px;
  }

  .spotlight-strip,
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-item {
    grid-template-columns: 44px 68px 1fr;
  }

  .rank-action {
    grid-column: 2 / 4;
    padding-left: 0;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .spotlight-strip,
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .search-line {
    display: grid;
  }

  .search-line button {
    min-height: 44px;
  }
}
