:root {
  --bg: #f8fafc;
  --bg-soft: #f3f4f6;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.25);
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --blue: #2563eb;
  --red: #ef4444;
  --purple: #7c3aed;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
}

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

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

button,
input {
  font: inherit;
}

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

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

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

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

.logo-text {
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

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

.nav-link,
.mobile-link {
  padding: 9px 14px;
  color: #475569;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #92400e;
  background: #fef3c7;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #92400e;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

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

.hero-carousel {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
  color: #fff;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 13px;
  margin: 0 0 18px;
  color: #fde68a;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-content h1,
.hero-content h2,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc,
.sub-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.movie-meta,
.ranking-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  color: #e5e7eb;
}

.star {
  color: #fbbf24;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
}

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

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

.primary-button {
  color: #fff;
  background: var(--amber);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.35);
}

.primary-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 36px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-button.light {
  color: #0f172a;
  background: #fff;
}

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

.hero-dot {
  width: 28px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 44px;
  background: #fbbf24;
}

.search-band {
  width: min(1180px, calc(100% - 32px));
  margin: -44px auto 42px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.search-band p {
  margin: 0;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

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

.page-container.narrow {
  max-width: 980px;
}

.content-section {
  margin: 0 0 70px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

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

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), #fb7185);
  font-weight: 900;
}

.section-icon.hot {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.section-more {
  color: #92400e;
  background: #fef3c7;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.wide-card .poster-frame {
  aspect-ratio: 16 / 10;
}

.poster-frame img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-frame img,
.category-tile:hover img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-frame::after {
  opacity: 1;
}

.score-badge,
.rank-badge,
.list-rank {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.2);
}

.score-badge {
  right: 10px;
  top: 10px;
  min-width: 42px;
  height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--amber);
}

.score-badge.big {
  top: 16px;
  right: 16px;
  min-width: 54px;
  height: 36px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--red);
}

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

.card-body h3 {
  margin: 0;
  color: #1e293b;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.ranking-row:hover h3 {
  color: var(--amber-dark);
}

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

.movie-meta {
  margin-top: 10px;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

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

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 22px;
  color: #fff;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.45s ease;
}

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

.category-tile div {
  position: relative;
  z-index: 2;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.6;
}

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

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

.ranking-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.ranking-link {
  display: grid;
  grid-template-columns: 54px 88px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.list-rank {
  position: static;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.ranking-link img {
  width: 88px;
  height: 118px;
  border-radius: 14px;
  object-fit: cover;
  background: #e2e8f0;
}

.ranking-link h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ranking-link p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.ranking-meta {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
}

.sub-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 360px;
  padding: 92px 0 68px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.5), transparent 36%), linear-gradient(135deg, #0f172a, #1e293b 55%, #111827);
}

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

.sub-hero h1 {
  max-width: 780px;
}

.inner-search {
  margin-top: -38px;
}

.sticky-search {
  position: sticky;
  top: 86px;
}

.detail-hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px) scale(1.05);
  opacity: 0.5;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: #e2e8f0;
}

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

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

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #1e293b;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  height: auto;
  object-fit: cover;
}

.detail-info .movie-meta {
  color: #e2e8f0;
  font-size: 15px;
}

.detail-info .tag-pill {
  background: rgba(255, 255, 255, 0.16);
}

.detail-container {
  margin-top: 48px;
}

.player-section {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.36));
  cursor: pointer;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 18px 32px rgba(245, 158, 11, 0.34);
}

.play-icon::before {
  content: "";
  margin-left: 5px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #fff;
}

.player-title {
  padding: 24px 28px 30px;
}

.player-title h2,
.detail-text h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.player-title p,
.detail-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.detail-text {
  display: grid;
  gap: 18px;
  margin: 34px 0 70px;
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.related-section .tag-pill {
  color: #92400e;
  background: #fef3c7;
  border-color: rgba(245, 158, 11, 0.18);
}

.site-footer {
  color: #e2e8f0;
  background: #0f172a;
}

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

.footer-logo {
  color: #fff;
  font-size: 20px;
}

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 16px 26px;
  color: #94a3b8;
  text-align: center;
}

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

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

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

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

  .menu-toggle {
    display: flex;
  }

  .logo-text {
    max-width: 220px;
    font-size: 16px;
  }

  .hero-carousel {
    height: 76vh;
  }

  .hero-content h1,
  .hero-content h2,
  .sub-hero h1,
  .detail-info h1 {
    font-size: clamp(36px, 11vw, 52px);
  }

  .search-band {
    grid-template-columns: 1fr;
    margin-top: -30px;
  }

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

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

  .ranking-list.compact {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 560px) {
  .nav-wrap {
    height: 64px;
  }

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

  .hero-meta {
    gap: 8px;
  }

  .primary-button,
  .ghost-button,
  .section-more {
    width: 100%;
  }

  .search-band,
  .page-container,
  .detail-wrap,
  .sub-hero > div,
  .nav-wrap,
  .mobile-nav,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .movie-grid.wide-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .card-body p {
    display: none;
  }

  .ranking-link {
    grid-template-columns: 42px 74px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-link img {
    width: 74px;
    height: 98px;
  }

  .ranking-link p {
    display: none;
  }

  .detail-text,
  .player-title {
    padding: 22px;
  }
}
