:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #1e293b;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --line: rgba(148, 163, 184, 0.22);
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.15);
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 70px 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 12% 8%, rgba(245, 158, 11, 0.18), transparent 30%), linear-gradient(135deg, #020617 0%, #0f172a 42%, #111827 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

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(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.35);
}

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

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: var(--amber-soft);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
}

.header-search input {
  width: 160px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 7px 10px;
}

.header-search button,
.big-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  color: #111827;
  font-weight: 700;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.header-search button {
  padding: 7px 14px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

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

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.02);
  transform: scale(1.04);
}

.hero-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.eyebrow.dark {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.hero h1 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

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

.hero-tags {
  margin: 26px 0;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid rgba(245, 158, 11, 0.18);
  font-size: 13px;
}

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

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

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

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #111827;
  background: rgba(251, 191, 36, 0.95);
  font-size: 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

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

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

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

.quick-search-section {
  margin-top: -58px;
  position: relative;
  z-index: 6;
}

.quick-search-card,
.filter-panel,
.story-card,
.ranking-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 28px;
}

.quick-search-card h2,
.section-head h2,
.filter-panel h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
}

.quick-search-card p,
.filter-panel p,
.story-card p,
.sub-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.big-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #fff;
}

.big-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: #111827;
}

.big-search button {
  padding: 0 22px;
}

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

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

.section-head a {
  color: #fbbf24;
  font-weight: 700;
}

.section-head.compact h2 {
  font-size: 24px;
}

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

.category-tile,
.overview-card {
  position: relative;
  min-height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1e293b;
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.category-tile img,
.overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-tile:hover img,
.overview-card:hover img {
  transform: scale(1.08);
  opacity: 0.72;
}

.category-tile span,
.overview-content {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.category-tile strong,
.overview-content strong {
  font-size: 22px;
}

.category-tile em,
.overview-content em,
.rank-row em,
.card-meta,
.card-desc {
  color: var(--muted);
  font-style: normal;
}

.overview-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

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

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

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

.movie-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.34);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 800;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 16px;
}

.card-body strong {
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.card-desc {
  font-size: 13px;
  line-height: 1.6;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.large-tags span {
  font-size: 14px;
  padding: 7px 12px;
}

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

.ranking-card {
  align-self: start;
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 32px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.13);
}

.rank-row img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.rank-row strong,
.rank-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  margin-top: 6px;
  font-size: 13px;
}

.sub-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 72px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.23), transparent 34%), linear-gradient(135deg, #020617, #111827);
}

.sub-hero h1,
.detail-info h1 {
  margin: 22px 0 14px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.sub-hero p {
  max-width: 760px;
  margin: 0;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  gap: 22px;
  padding: 24px;
  margin-bottom: 26px;
}

.filter-controls {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  outline: none;
  color: #fff;
  background: rgba(2, 6, 23, 0.56);
  padding: 0 14px;
}

.filter-controls select option {
  color: #111827;
}

.filter-status {
  margin: 0;
  color: #fbbf24;
}

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

.compact-card {
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: stretch;
}

.compact-card .poster {
  height: 100%;
  min-height: 164px;
  aspect-ratio: auto;
}

.compact-card .card-body {
  align-content: center;
  padding: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

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

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.breadcrumb a {
  color: #fbbf24;
}

.detail-one-line {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.68;
}

.player-cover.is-hidden {
  display: none;
}

.play-large {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #111827;
  background: rgba(251, 191, 36, 0.95);
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.story-card {
  padding: 26px;
}

.story-card p {
  margin: 16px 0 0;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 28px;
  padding: 46px 0;
}

.footer-brand {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}

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

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

.site-footer h3 {
  margin: 0 0 12px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  color: var(--muted);
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

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

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
  }
}

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content,
  .quick-search-card,
  .split-layout,
  .detail-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
  }

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

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

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

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

  .header-inner {
    height: 64px;
  }

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

  .hero {
    min-height: 760px;
  }

  .hero-content {
    min-height: 760px;
    padding: 40px 0 80px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero p,
  .sub-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .big-search,
  .hero-actions {
    flex-direction: column;
    border-radius: 22px;
  }

  .big-search input,
  .big-search button {
    min-height: 48px;
  }

  .movie-grid,
  .catalog-grid,
  .featured-grid,
  .ranking-full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-grid,
  .overview-grid,
  .filter-controls {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .compact-card .poster {
    min-height: 142px;
  }

  .card-body {
    padding: 0 12px 14px;
  }

  .quick-search-card,
  .filter-panel,
  .story-card,
  .ranking-card {
    border-radius: 22px;
    padding: 20px;
  }

  .detail-poster {
    max-width: 260px;
  }

  .play-large {
    width: 76px;
    height: 76px;
    font-size: 28px;
  }
}
