:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --orange: #f97316;
  --orange-2: #fb923c;
  --red: #dc2626;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1220px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.28);
}

.brand-text {
  font-size: 1.22rem;
  background: linear-gradient(90deg, #fdba74, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: var(--muted-2);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange-2);
}

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

.header-search input,
.mobile-search input,
.search-panel input,
.toolbar input,
.toolbar select {
  color: var(--text);
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 240px;
  padding: 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: rgba(251, 146, 60, 0.7);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.header-search button,
.mobile-search button,
.search-panel button,
.btn,
.ghost-btn {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-panel button,
.btn {
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 36px rgba(220, 38, 38, 0.22);
}

.header-search button {
  padding: 10px 16px;
}

.btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
}

.ghost-btn {
  color: var(--text);
  border: 1px solid rgba(249, 115, 22, 0.42);
  background: rgba(15, 23, 42, 0.68);
}

.btn:hover,
.ghost-btn:hover,
.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: white;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-panel {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-link {
  display: block;
  padding: 13px 4px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
}

.page-main,
.home-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.home-main {
  padding-bottom: 68px;
}

.hero {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, #020617);
  pointer-events: none;
}

.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-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.8));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: 48px;
  align-items: center;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: white;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(220, 38, 38, 0.92));
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.88rem;
  font-weight: 800;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 720px;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.28rem);
}

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

.hero-meta {
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.horizontal-meta span {
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

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

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card img {
  position: relative;
  height: 430px;
  width: 100%;
  object-fit: cover;
}

.hero-card-caption {
  position: absolute;
  inset: auto 18px 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-card-caption strong {
  display: block;
  font-size: 1.2rem;
}

.hero-card-caption span {
  color: var(--muted-2);
  font-size: 0.92rem;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.section {
  margin-top: 66px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.2;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--orange-2);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card,
.category-tile,
.info-panel,
.player-panel,
.detail-card,
.horizontal-card,
.toolbar,
.search-panel {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.82));
  opacity: 0.96;
}

.play-dot {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration,
.rank-badge {
  position: absolute;
  z-index: 3;
  color: white;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.duration {
  right: 12px;
  bottom: 12px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.75);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.movie-info {
  padding: 18px;
}

.movie-info h3,
.horizontal-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.horizontal-body h3 a:hover {
  color: var(--orange-2);
}

.movie-meta,
.movie-line,
.horizontal-body p,
.category-tile p,
.info-panel p,
.detail-card p {
  color: var(--muted);
}

.movie-meta {
  margin: 0 0 10px;
  font-size: 0.88rem;
}

.movie-line {
  min-height: 3.1em;
  margin: 0 0 14px;
  font-size: 0.94rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tags a {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.8rem;
}

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

.category-tile {
  min-height: 170px;
  padding: 24px;
  border-radius: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.44);
  background: rgba(30, 41, 59, 0.92);
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: auto 180px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.list-rank {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 1.18rem;
  font-weight: 900;
}

.horizontal-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: #111827;
}

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

.horizontal-body p {
  margin: 0 0 12px;
}

.page-hero {
  padding: 64px 0 34px;
}

.page-hero h1,
.detail-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.12;
}

.page-hero p,
.detail-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted-2);
  font-size: 1.08rem;
}

.toolbar,
.search-panel {
  margin: 18px 0 26px;
  padding: 18px;
  border-radius: 22px;
}

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

.toolbar input,
.toolbar select,
.search-panel input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
}

.search-panel button {
  padding: 13px 20px;
}

.notice-empty {
  display: none;
  padding: 38px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

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

.breadcrumb a:hover {
  color: var(--orange-2);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: end;
  margin-bottom: 34px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #111827;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

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

.player-panel,
.detail-card,
.info-panel {
  border-radius: 24px;
}

.player-panel {
  overflow: hidden;
  margin-bottom: 26px;
  background: #000;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: none;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.66));
  cursor: pointer;
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 2rem;
  box-shadow: 0 20px 58px rgba(249, 115, 22, 0.35);
}

.detail-card,
.info-panel {
  padding: 26px;
}

.detail-card + .detail-card {
  margin-top: 22px;
}

.detail-card h2,
.info-panel h2 {
  margin: 0 0 16px;
  font-size: 1.55rem;
}

.detail-card p {
  margin: 0;
  white-space: pre-line;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  line-height: 1.35;
}

.side-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer {
  margin-top: 72px;
  padding: 48px 0 26px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.7fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

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

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

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

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 26px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.92rem;
}

@media (max-width: 1060px) {
  .header-search {
    display: none;
  }

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

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

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

  .detail-cover {
    max-width: 520px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-search input {
    flex: 1;
    padding: 11px 14px;
  }

  .mobile-search button {
    padding: 11px 14px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    padding-top: 92px;
    gap: 26px;
  }

  .hero-card img {
    height: 320px;
  }

  .hero-control {
    display: none;
  }

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

  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }

  .movie-info {
    padding: 14px;
  }

  .movie-line {
    display: none;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: auto 110px 1fr;
    gap: 12px;
  }

  .list-rank {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .horizontal-meta {
    display: none;
  }

  .side-item {
    grid-template-columns: 96px 1fr;
  }

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

@media (max-width: 480px) {
  .nav-wrap,
  .page-main,
  .home-main,
  .detail-main,
  .footer-grid,
  .footer-bottom,
  .mobile-panel {
    width: min(100% - 22px, 1220px);
  }

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

  .hero h1 {
    font-size: 2.45rem;
  }

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

  .horizontal-card {
    grid-template-columns: 1fr;
  }

  .horizontal-cover {
    width: 100%;
  }
}
