:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --bg-card-strong: #111827;
  --line: rgba(148, 163, 184, 0.2);
  --line-strong: rgba(245, 158, 11, 0.45);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --orange: #ea580c;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  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.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(234, 88, 12, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0b1120 52%, #020617 100%);
  color: var(--text);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  white-space: nowrap;
  font-size: 18px;
}

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

.desktop-nav a,
.mobile-panel a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

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

.site-search input,
.hero-search input,
.search-page-form input,
.local-filter input {
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  padding: 11px 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search input:focus,
.hero-search input:focus,
.search-page-form input:focus,
.local-filter input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
  background: rgba(15, 23, 42, 0.94);
}

.site-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(234, 88, 12, 0.22);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel nav {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
  display: flex;
  align-items: end;
  padding: 118px 0 86px;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1180px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.hero-tags span,
.detail-meta span,
.card-meta span {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
}

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

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

.hero-controls button.is-active {
  width: 58px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.search-band {
  transform: translateY(-34px);
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 20px;
  align-items: center;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2,
.section-head h2,
.ranking-panel h2,
.page-hero h1,
.detail-info h1,
.story-card h2,
.side-panel h2,
.category-card h2 {
  margin: 10px 0 0;
  line-height: 1.18;
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-page-form input {
  width: 100%;
}

.section-block {
  padding: 44px 0;
}

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

.section-head > a {
  color: var(--amber);
  font-weight: 800;
}

.compact-head {
  margin-bottom: 18px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #111827);
}

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

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

.cover-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.card-body h3 a:hover,
.rank-item h3 a:hover,
.category-card h2 a:hover,
.sample-links a:hover {
  color: var(--amber);
}

.card-body p {
  color: var(--subtle);
  margin: 0 0 12px;
  font-size: 14px;
}

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

.tag-row span {
  font-size: 12px;
  color: #fed7aa;
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
}

.compact .card-cover {
  aspect-ratio: 4 / 3;
}

.compact .card-body h3 {
  font-size: 16px;
}

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

.category-tile {
  min-height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform 0.22s ease, border 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.side-panel,
.story-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.82);
  padding: 22px;
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 50px 76px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
  padding: 12px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-weight: 900;
}

.rank-poster {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #111827;
}

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

.rank-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.rank-item p {
  color: var(--subtle);
  margin: 0 0 8px;
  font-size: 13px;
}

.page-main {
  padding: 38px 0 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.65)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 26rem);
  padding: clamp(34px, 6vw, 72px);
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 840px;
  font-size: clamp(32px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

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

.category-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-card p {
  color: var(--muted);
}

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

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

.local-filter {
  margin-top: 24px;
}

.local-filter input {
  width: min(100%, 460px);
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 28rem),
    rgba(15, 23, 42, 0.82);
  padding: clamp(20px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

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

.detail-info h1 {
  font-size: clamp(34px, 5.5vw, 64px);
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: var(--muted);
  font-size: 20px;
  margin: 18px 0;
}

.wide-tags {
  margin: 20px 0 26px;
}

.player-section {
  margin: 34px 0;
}

.video-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-size: 34px;
  padding-left: 6px;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.32);
}

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

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

.story-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.rank-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.large-rank-list {
  margin-top: 0;
}

.large-rank-list .rank-item {
  grid-template-columns: 64px 98px 1fr;
}

.large-rank-list .rank-number {
  width: 52px;
  height: 52px;
}

.large-rank-list .rank-item h3 {
  font-size: 20px;
}

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

.search-results-wrap {
  min-height: 420px;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  padding: 32px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
}

.footer-inner p {
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

@media (max-width: 1080px) {
  .desktop-nav,
  .site-search:not(.mobile-search) {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  body.nav-open .mobile-panel {
    display: block;
  }

  .hero-slider {
    min-height: 560px;
  }

  .search-band,
  .split-layout,
  .rank-page-layout,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    width: min(330px, 100%);
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-text {
    font-size: 16px;
  }

  .hero-slider {
    min-height: 540px;
  }

  .hero-slide {
    padding: 96px 0 78px;
  }

  .hero-actions,
  .hero-search,
  .search-page-form {
    flex-direction: column;
  }

  .search-band {
    transform: none;
    margin-top: 18px;
  }

  .movie-grid,
  .small-grid,
  .catalog-grid,
  .featured-grid,
  .category-grid,
  .category-card-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .large-rank-list .rank-item {
    grid-template-columns: 46px 74px 1fr;
  }

  .rank-item p {
    display: none;
  }

  .page-hero,
  .detail-hero,
  .story-card,
  .ranking-panel,
  .side-panel {
    border-radius: 22px;
  }

  .player-overlay span {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
