
:root {
  --bg: #030712;
  --panel: #111827;
  --panel-soft: rgba(17, 24, 39, 0.72);
  --panel-deep: #0b1120;
  --text: #f9fafb;
  --muted: #9ca3af;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-deep: #d97706;
  --red: #ef4444;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 30%),
              linear-gradient(180deg, #030712 0%, #111827 45%, #030712 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

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

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark,
.footer-logo span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 600;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.9);
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: #fff;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.96);
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-cats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  margin-bottom: 36px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg .poster {
  height: 100%;
  width: 100%;
  border-radius: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.08)),
              linear-gradient(0deg, #030712 0%, transparent 45%, rgba(3, 7, 18, 0.3) 100%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 0.96fr) minmax(320px, 0.64fr);
  gap: 38px;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--amber);
  font-weight: 800;
}

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

.hero p {
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.meta-line,
.tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.hero-meta b,
.tag,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.74);
  color: #e5e7eb;
  border: 1px solid var(--line);
  font-size: 13px;
  font-style: normal;
}

.hero-meta b,
.meta-chip.hot {
  background: var(--amber);
  color: #fff;
  border-color: transparent;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--amber);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.24);
  transition: 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--amber-deep);
}

.btn.ghost {
  background: rgba(17, 24, 39, 0.68);
  border-color: var(--line);
  box-shadow: none;
}

.hero-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(17, 24, 39, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel .poster {
  aspect-ratio: 16 / 10;
}

.hero-panel h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.hero-panel p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

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

.hero-dot.active {
  width: 34px;
  background: var(--amber);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  z-index: 4;
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

.page-shell,
.content-section,
.detail-shell,
.category-hero,
.search-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 34px 0;
}

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

.section-title h2,
.category-hero h1,
.search-shell h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-title p,
.category-hero p,
.search-shell p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card,
.wide-card,
.cat-card,
.rank-item,
.info-box {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.72);
  overflow: hidden;
  transition: 0.25s ease;
}

.movie-card:hover,
.wide-card:hover,
.cat-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.42), transparent 35%),
              linear-gradient(135deg, #1f2937, #030712);
  aspect-ratio: 16 / 10;
}

.movie-card .poster {
  border-radius: 22px 22px 0 0;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

.movie-card:hover img,
.wide-card:hover img,
.cat-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 55%);
}

.play-badge,
.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  opacity: 0;
  transition: 0.25s ease;
}

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

.score {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
}

.card-copy {
  display: block;
  padding: 14px;
}

.card-copy strong,
.wide-info strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-copy em,
.wide-info em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.meta-line {
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 12px;
}

.meta-line b,
.meta-line i {
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(31, 41, 55, 0.88);
  font-style: normal;
}

.meta-line b {
  color: #fff;
  background: rgba(245, 158, 11, 0.25);
}

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

.cat-card {
  min-height: 160px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(17, 24, 39, 0.86));
}

.cat-card strong {
  font-size: 20px;
}

.cat-card span,
.cat-card p {
  color: var(--muted);
  line-height: 1.7;
}

.filter-bar {
  position: sticky;
  top: 82px;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 24px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(16px);
}

.search-input,
.select-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.86);
  color: #fff;
  padding: 0 14px;
  outline: none;
}

.search-input:focus,
.select-input:focus {
  border-color: rgba(245, 158, 11, 0.7);
}

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

.wide-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 12px;
}

.wide-poster {
  width: 100%;
  height: 116px;
}

.wide-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 160px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
}

.rank-no {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber);
  font-weight: 900;
}

.rank-item:nth-child(-n+3) .rank-no {
  background: var(--amber);
  color: #fff;
}

.rank-item .poster {
  height: 92px;
  aspect-ratio: 16 / 9;
}

.rank-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-bg .poster {
  height: 100%;
  border-radius: 0;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #030712 0%, rgba(3, 7, 18, 0.82) 42%, rgba(3, 7, 18, 0.3) 100%),
              linear-gradient(0deg, #030712 0%, transparent 60%);
}

.detail-title {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 430px;
  margin: 0 auto;
  display: flex;
  align-items: end;
  padding-bottom: 58px;
}

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

.breadcrumb a {
  color: #d1d5db;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.player-box,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

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

.video-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(3, 7, 18, 0.45), rgba(0, 0, 0, 0.82));
  transition: 0.25s ease;
}

.video-cover.hide {
  opacity: 0;
  pointer-events: none;
}

.play-toggle {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #f97316);
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 25px 60px rgba(245, 158, 11, 0.32);
}

.player-caption,
.detail-card,
.side-card {
  padding: 20px;
}

.player-caption h2,
.detail-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.player-caption p,
.detail-card p,
.side-card p {
  margin: 0 0 14px;
  color: #d1d5db;
  line-height: 1.85;
}

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

.side-card {
  margin-bottom: 18px;
}

.side-card .movie-card {
  margin-bottom: 14px;
}

.tags {
  margin-top: 18px;
}

.search-shell,
.category-hero {
  padding: 48px 0 18px;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.92);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

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

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

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-content: center;
    padding-top: 70px;
  }

  .hero-panel {
    display: none;
  }

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

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

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

  .rank-item {
    grid-template-columns: 48px 110px 1fr;
  }

  .rank-score {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 620px;
  }

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

  .movie-grid,
  .category-strip,
  .footer-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .wide-card,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .wide-poster,
  .rank-item .poster {
    height: auto;
  }

  .hero-arrow {
    display: none;
  }
}
