:root {
  --bg: #f8fafc;
  --text: #1f2937;
  --muted: #64748b;
  --soft: #f1f5f9;
  --line: #e2e8f0;
  --white: #ffffff;
  --dark: #111827;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(90deg, var(--amber-dark), var(--orange));
  box-shadow: 0 10px 30px rgba(180, 83, 9, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: var(--amber-dark);
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 650;
}

.nav-link,
.mobile-link {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  opacity: 1;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-link {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-carousel {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-bg.image-hidden,
.player-backdrop-img.image-hidden,
.poster-frame img.image-hidden {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(245, 158, 11, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.68) 46%, rgba(17, 24, 39, 0.16) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  padding-bottom: 92px;
}

.hero-copy {
  max-width: 760px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.9);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.4vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-meta span {
  margin-bottom: 24px;
  padding: 8px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.3);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.36);
  font-size: 36px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.quick-search-card,
.section-block {
  margin-top: 44px;
  border-radius: var(--radius);
}

.quick-search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.quick-search-card h2,
.section-head h2,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-search-card p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-block {
  padding: 34px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.gradient-block {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.soft-block {
  background: linear-gradient(135deg, #f8fafc, #fff7ed);
}

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

.section-head h2 {
  color: #172033;
  font-size: clamp(26px, 3vw, 36px);
}

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

.section-head.compact {
  align-items: center;
  margin-bottom: 16px;
}

.card-grid,
.featured-grid,
.category-grid,
.ranking-split,
.ranking-columns,
.detail-layout {
  display: grid;
  gap: 22px;
}

.featured-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.card-grid.six-cols {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card-grid.four-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card-featured {
  border: 2px solid rgba(245, 158, 11, 0.45);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

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

.movie-card-wide .card-cover {
  aspect-ratio: auto;
  height: 100%;
  min-height: 170px;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(251, 191, 36, 0.5), transparent 32%),
    linear-gradient(135deg, #111827, #78350f 55%, #f59e0b);
}

.poster-letter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 900;
  z-index: 0;
}

.poster-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #182236;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: var(--amber-dark);
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  gap: 6px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span {
  padding: 3px 7px;
  background: #f1f5f9;
}

.card-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.card-tags span,
.tag-pill {
  padding: 4px 8px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

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

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

.category-tile {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  box-shadow: var(--shadow-soft);
}

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

.category-bg img {
  opacity: 0.54;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.82));
}

.category-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 20px;
  color: #fff;
}

.category-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-content em {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.ranking-panel {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-link:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

.rank-num,
.rank-dot {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 13px;
  font-weight: 900;
}

.rank-dot {
  width: 12px;
  height: 12px;
}

.compact-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 76px 0;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.38), transparent 30%),
    linear-gradient(135deg, #111827, #1f2937 55%, #92400e);
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.small-actions {
  margin-top: 24px;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.filter-control {
  width: 100%;
  height: 46px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  color: var(--text);
  background: #fff;
  font: inherit;
  outline: none;
}

.search-box input {
  padding: 0 14px;
}

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

.filter-control {
  padding: 0 12px;
}

.empty-state {
  display: none;
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

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

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

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

.player-band {
  padding: 28px 0 38px;
  background: #05070d;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 36%),
    rgba(0, 0, 0, 0.62);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-backdrop-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: blur(6px) saturate(1.15);
  transform: scale(1.04);
}

.play-overlay {
  position: relative;
  z-index: 1;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.42);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-overlay:hover {
  transform: scale(1.06);
}

.play-icon {
  margin-left: 5px;
  font-size: 36px;
  line-height: 1;
}

.detail-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  padding-top: 38px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.detail-main h1 {
  font-size: clamp(34px, 5vw, 52px);
}

.detail-meta span {
  padding: 7px 11px;
  color: #92400e;
  background: #fef3c7;
}

.lead-text {
  margin: 0;
  color: #334155;
  font-size: 20px;
  font-weight: 650;
}

.content-card,
.side-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 12px;
  color: #172033;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 16px;
}

.warm-card {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border-color: #fed7aa;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-list div {
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-list dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.poster-side {
  aspect-ratio: 3 / 4;
  padding: 0;
}

.side-links {
  display: grid;
  gap: 12px;
}

.side-links a {
  display: block;
  padding: 12px;
  border-radius: 14px;
  color: #334155;
  background: #f8fafc;
  font-weight: 750;
}

.side-links a:hover {
  color: #92400e;
  background: #fff7ed;
}

.site-footer {
  margin-top: 64px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 34px;
  padding: 42px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
}

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

.site-footer a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .featured-grid,
  .card-grid.six-cols,
  .card-grid.four-cols,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-side {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 560px;
    height: 76vh;
  }

  .hero-content {
    padding-bottom: 82px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-card,
  .section-head,
  .ranking-split,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .quick-search-card,
  .section-head {
    display: grid;
    align-items: start;
  }

  .featured-grid,
  .card-grid.six-cols,
  .card-grid.four-cols,
  .card-grid.three-cols,
  .category-grid,
  .category-grid.large,
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-block {
    padding: 22px;
  }

  .movie-card-wide {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .poster-side {
    max-width: 280px;
  }
}

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

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

  .hero-copy p {
    font-size: 16px;
  }

  .hero-meta span {
    margin-bottom: 8px;
  }

  .featured-grid,
  .card-grid.six-cols,
  .card-grid.four-cols,
  .card-grid.three-cols,
  .category-grid,
  .category-grid.large,
  .filter-row,
  .info-list {
    grid-template-columns: 1fr;
  }

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

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

  .category-tile {
    min-height: 150px;
  }

  .play-overlay {
    width: 72px;
    height: 72px;
  }

  .play-icon {
    font-size: 30px;
  }
}
