:root {
  --page-bg: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #ea580c;
  --soft: #fff7ed;
  --shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.nav-wrap {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

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

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

.nav-link {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: #475569;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  width: min(320px, 30vw);
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px;
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: 0;
  padding: 8px 10px 8px 14px;
}

.header-search button,
.wide-search button,
.filter-clear,
.small-btn {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.26);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--amber-dark);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 14px 24px 22px;
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #475569;
  font-weight: 800;
  background: #f8fafc;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}

.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--amber);
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  background: radial-gradient(circle at top left, #fed7aa 0, transparent 34%), linear-gradient(135deg, #fff7ed 0%, #fffbeb 42%, #fef3c7 100%);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  max-width: 1280px;
  min-height: 680px;
  margin: 0 auto;
  padding: 70px 24px 86px;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 54px;
  position: absolute;
  inset: 70px 24px 86px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.hero-media {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(120, 53, 15, 0.28);
  transform: rotate(-2deg);
  background: #f1f5f9;
}

.hero-media::before {
  content: "";
  display: block;
  padding-top: 128%;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-dark);
  background: #ffedd5;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 900;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0;
  max-width: 650px;
  color: #4b5563;
  font-size: 20px;
  line-height: 1.85;
}

.hero-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 14px;
}

.hero-meta {
  margin: 22px 0 28px;
}

.hero-meta span,
.movie-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.hero-actions,
.section-heading,
.filter-bar,
.flex-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 14px 24px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.32);
}

.secondary-btn {
  color: var(--amber-dark);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

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

.primary-btn.full {
  display: flex;
  width: 100%;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #111827;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
}

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

.section-block,
.quick-search-section,
.filter-section,
.detail-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.quick-search-section {
  padding-top: 54px;
  padding-bottom: 54px;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-heading.centered {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  flex-direction: column;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-article h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.section-heading a,
.text-link {
  color: var(--amber-dark);
  font-weight: 900;
}

.wide-search {
  max-width: 760px;
  margin: 30px auto 0;
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.wide-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 18px;
  background: transparent;
}

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

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

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

.movie-card:hover {
  transform: translateY(-8px);
  border-color: #fed7aa;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-link img,
.category-card img,
.horizontal-item img,
.rank-poster img,
.detail-cover {
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.category-card img,
.horizontal-item img,
.rank-poster img {
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.horizontal-item:hover img,
.rank-row:hover .rank-poster img {
  transform: scale(1.08);
}

.poster-shade,
.cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 46%);
  pointer-events: none;
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.type-badge {
  right: 12px;
  background: rgba(17, 24, 39, 0.78);
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: block;
  min-height: 30px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-info p {
  min-height: 46px;
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.genre-tags span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--amber-dark);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 12px;
  font-weight: 800;
}

.warm-block {
  max-width: none;
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
}

.warm-block > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

.category-card img,
.category-card .cat-overlay {
  position: absolute;
  inset: 0;
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 22px;
  font-weight: 900;
}

.category-card em {
  margin-top: 6px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
}

.gray-block {
  max-width: none;
  background: #f1f5f9;
}

.gray-block > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero {
  background: linear-gradient(135deg, #d97706, #ea580c);
  color: #ffffff;
  padding: 70px 24px;
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero h1 {
  margin: 20px 0 16px;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
}

.filter-section {
  padding-top: 46px;
}

.breadcrumb {
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #64748b;
  font-size: 14px;
}

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

.filter-bar {
  margin-bottom: 28px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.movie-filter {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 13px 16px;
  font-size: 16px;
  background: transparent;
}

.empty-state {
  display: none;
  margin: 30px 0;
  padding: 30px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
}

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

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

.overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.overview-thumbs {
  height: 140px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
}

.overview-thumbs img {
  height: 100%;
  object-fit: cover;
}

.overview-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.overview-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-num {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-poster {
  height: 122px;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
}

.rank-copy h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.rank-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.22));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--amber-dark);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.detail-article,
.info-panel {
  margin-top: 26px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-badges span {
  color: var(--amber-dark);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 900;
}

.lead-text {
  margin: 18px 0 20px;
  color: #475569;
  font-size: 20px;
  line-height: 1.8;
}

.detail-article h2 {
  margin: 32px 0 12px;
  font-size: 26px;
}

.detail-article p,
.detail-article blockquote {
  color: #334155;
  font-size: 17px;
  line-height: 1.95;
}

.detail-article blockquote {
  margin: 0;
  padding: 20px 22px;
  border-left: 5px solid var(--amber);
  border-radius: 0 18px 18px 0;
  background: #fff7ed;
  font-style: italic;
}

.detail-tags {
  margin-top: 10px;
}

.detail-aside {
  position: sticky;
  top: 92px;
  align-self: start;
}

.detail-cover {
  aspect-ratio: 3 / 4.2;
  border-radius: 28px;
  background: #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.info-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.info-panel dl {
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 14px;
}

.info-panel dt {
  color: #94a3b8;
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

.related-section {
  padding-top: 20px;
}

.site-footer {
  margin-top: 30px;
  color: #cbd5e1;
  background: #111827;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px 38px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 460px;
  margin: 16px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  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: 20px 24px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

  .detail-aside {
    position: static;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
  }

  .info-panel {
    margin-top: 0;
  }
}

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

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

  .hero-carousel,
  .hero-stage {
    min-height: auto;
  }

  .hero-stage {
    padding: 36px 18px 88px;
  }

  .hero-slide,
  .hero-slide.active {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-media {
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-actions,
  .hero-meta {
    justify-content: center;
  }

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

  .overview-card,
  .rank-row,
  .footer-grid,
  .detail-aside {
    grid-template-columns: 1fr;
  }

  .rank-row {
    align-items: start;
  }

  .rank-poster {
    width: 110px;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    height: 64px;
    padding: 0 16px;
  }

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

  .section-block,
  .quick-search-section,
  .filter-section,
  .detail-top {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .wide-search,
  .filter-bar,
  .mobile-panel form {
    border-radius: 22px;
    flex-direction: column;
  }

  .wide-search button,
  .filter-clear {
    width: 100%;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .detail-article,
  .info-panel {
    padding: 22px;
  }

  .play-cover {
    font-size: 18px;
  }

  .play-icon {
    width: 64px;
    height: 64px;
  }
}
