:root {
  --bg: #fffaf2;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --accent: #f59e0b;
  --shadow: 0 18px 45px rgba(154, 52, 18, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 38%, #fffaf2 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
  border-bottom: 1px solid rgba(251, 146, 60, 0.18);
  box-shadow: 0 10px 30px rgba(154, 52, 18, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1220px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
}

.brand-name {
  font-size: 1.2rem;
}

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.22);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #9a3412;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

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

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.2), transparent 28%), linear-gradient(135deg, #ffedd5, #fef3c7 48%, #ffffff);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: 48px;
  align-items: center;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255, 247, 237, 0.92), rgba(255, 247, 237, 0.5)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.1);
  opacity: 0.36;
  transform: scale(1.08);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 5vw, 5.3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.lead-text {
  max-width: 760px;
  margin: 0 0 24px;
  color: #4b5563;
  font-size: 1.12rem;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid rgba(251, 146, 60, 0.26);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-action,
.text-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.26);
}

.ghost-btn,
.section-action {
  color: #7c2d12;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(251, 146, 60, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.text-arrow:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-poster {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(67, 20, 7, 0.26);
  aspect-ratio: 16 / 10;
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(154, 52, 18, 0.28);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.content-section {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1220px) / 2));
  padding-right: max(16px, calc((100% - 1220px) / 2));
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(254, 243, 199, 0.65));
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(154, 52, 18, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fed7aa, #fde68a);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.52));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  color: #ffffff;
  font-weight: 800;
  border-radius: 999px;
}

.play-chip {
  right: 14px;
  bottom: 14px;
  padding: 7px 14px;
  background: rgba(249, 115, 22, 0.92);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s ease;
}

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

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.card-body {
  padding: 18px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.card-meta span,
.detail-meta span {
  padding: 2px 9px;
  background: #fff7ed;
  border-radius: 999px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.94rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid rgba(251, 146, 60, 0.2);
  border-radius: 26px;
  box-shadow: 0 12px 30px rgba(154, 52, 18, 0.08);
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.tile-glow {
  position: absolute;
  inset: auto -40px -70px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2), transparent 70%);
}

.tile-covers {
  display: flex;
  align-items: center;
  min-height: 72px;
  margin-bottom: 18px;
}

.tile-covers img {
  width: 76px;
  height: 54px;
  object-fit: cover;
  margin-right: -18px;
  border: 3px solid #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(154, 52, 18, 0.15);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-hero,
.detail-hero {
  position: relative;
  padding: 78px max(16px, calc((100% - 1220px) / 2));
  background: radial-gradient(circle at 12% 20%, rgba(249, 115, 22, 0.18), transparent 28%), linear-gradient(135deg, #fff7ed, #ffedd5);
}

.compact-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 220px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(251, 146, 60, 0.2);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(154, 52, 18, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #9a3412;
  font-weight: 800;
  font-size: 0.88rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  color: var(--text);
  background: #fffaf2;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 140px 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(154, 52, 18, 0.06);
}

.ranking-cover {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
}

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

.ranking-num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  font-weight: 900;
}

.ranking-info h3 {
  margin: 0 0 8px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.text-arrow {
  color: var(--primary-dark);
  background: #fff7ed;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: #9a3412;
  font-weight: 800;
}

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

.detail-poster {
  overflow: hidden;
  background: #fed7aa;
  border-radius: 30px;
  box-shadow: 0 26px 60px rgba(154, 52, 18, 0.24);
  aspect-ratio: 3 / 4;
}

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

.detail-meta {
  margin: 18px 0;
}

.detail-section {
  padding-top: 56px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #111827;
  border-radius: 30px;
  box-shadow: 0 30px 70px rgba(17, 24, 39, 0.24);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.74));
  border: 0;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  box-shadow: 0 18px 45px rgba(249, 115, 22, 0.38);
}

.movie-article {
  max-width: 920px;
  padding: 34px;
  background: #ffffff;
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(154, 52, 18, 0.08);
}

.movie-article h2 {
  margin: 0 0 14px;
  font-size: 1.65rem;
}

.movie-article p {
  margin: 0 0 28px;
  color: #4b5563;
  font-size: 1.05rem;
}

.movie-article p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 30px;
  color: #d1d5db;
  background: linear-gradient(180deg, #1f2937, #111827);
}

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

.footer-brand {
  color: #ffffff;
  font-size: 1.25rem;
}

.footer-inner p {
  max-width: 420px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 20px;
}

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

.footer-bottom {
  padding: 18px 16px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1050px) {
  .movie-grid,
  .featured-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-poster {
    display: none;
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide {
    align-content: center;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.6rem;
  }

  .section-head,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .ranking-row {
    grid-template-columns: 96px 42px minmax(0, 1fr);
  }

  .ranking-row .text-arrow {
    grid-column: 1 / -1;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1220px);
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

  .content-section,
  .soft-section {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .hero-actions {
    display: grid;
  }
}
