:root {
  --orange: #f97316;
  --orange-dark: #c2410c;
  --amber: #f59e0b;
  --yellow: #eab308;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f1f5f9;
  --bg: #fff7ed;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--orange), var(--amber), var(--yellow));
  box-shadow: 0 12px 30px rgba(194, 65, 12, 0.24);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  flex-shrink: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--orange);
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: scale(1.08) rotate(4deg);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.03em;
}

.brand-text small {
  display: block;
  color: #ffedd5;
  font-size: 12px;
  margin-top: 3px;
}

.header-search {
  flex: 1;
  max-width: 460px;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 12px 18px;
  background: transparent;
  color: var(--text);
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #fff;
  background: var(--orange);
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover {
  background: var(--orange-dark);
}

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

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

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

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

.mobile-panel {
  display: none;
  background: linear-gradient(90deg, var(--orange), var(--amber));
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel-inner {
  padding: 0 0 16px;
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  color: #fff;
  padding: 10px 0;
  font-weight: 700;
}

.mobile-search {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #ea580c 0%, #f59e0b 52%, #eab308 100%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  pointer-events: none;
}

.hero-glow span {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: #fff;
  filter: blur(70px);
  animation: pulse 5s ease-in-out infinite;
}

.hero-glow span:first-child {
  left: 16%;
  top: -120px;
}

.hero-glow span:last-child {
  right: 8%;
  bottom: -120px;
  animation-delay: 1.3s;
}

.hero-slider {
  position: relative;
  z-index: 2;
  min-height: 610px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px;
  align-items: center;
  min-height: 610px;
  padding: 70px 0;
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff7ed;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  margin: 0 0 22px;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 16px;
  color: #fff7ed;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 30px;
}

.hero-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.hero-actions,
.section-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: #fff;
  color: var(--orange-dark);
  box-shadow: 0 16px 35px rgba(255, 255, 255, 0.28);
}

.btn-secondary {
  background: var(--orange-dark);
  color: #fff;
  box-shadow: 0 16px 35px rgba(124, 45, 18, 0.2);
}

.btn-soft {
  background: #fff7ed;
  color: var(--orange-dark);
  border: 1px solid #fed7aa;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(124, 45, 18, 0.24);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  min-height: 560px;
  box-shadow: 0 30px 80px rgba(124, 45, 18, 0.38);
  transform: rotate(1.5deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), transparent 58%);
}

.hero-poster-label {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.hero-poster-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--orange);
  font-weight: 900;
}

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

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

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

.section {
  padding: 70px 0;
}

.section-white {
  background: #fff;
}

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

.section-dark {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.title-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.25);
}

.section-head p,
.page-hero p,
.detail-lead,
.category-intro {
  margin: 0;
  color: var(--muted);
}

.section-dark .section-head p,
.section-dark .section-title {
  color: #fff;
}

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

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

.movie-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid #fff1e6;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
  border-color: #fdba74;
}

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

.movie-card-large .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 54%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.score-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.score-badge {
  top: 12px;
  right: 12px;
  min-width: 48px;
  height: 30px;
  padding: 0 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.93);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.meta-line,
.detail-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.meta-line span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--orange);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ea580c;
  background: #ffedd5;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 190px;
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #ffedd5;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  font-size: 28px;
  margin-bottom: 16px;
}

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

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(5px);
  background: #fff7ed;
}

.section-dark .rank-item {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.section-dark .rank-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

.rank-no {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-score {
  color: #fbbf24;
  font-weight: 900;
}

.page-hero {
  padding: 70px 0 44px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 26px 0 0;
}

.filter-bar input,
.filter-bar select {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 12px 16px;
  background: #fff;
  color: var(--text);
  outline: 0;
  min-width: 220px;
}

.detail-hero {
  background: linear-gradient(135deg, #111827, #7c2d12 55%, #f97316);
  color: #fff;
  padding: 46px 0 70px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.detail-main h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.1;
}

.detail-main .detail-lead {
  color: #ffedd5;
  font-size: 18px;
}

.detail-cover {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

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

.player-shell {
  margin-top: -42px;
  position: relative;
  z-index: 3;
}

.player-card {
  border-radius: 28px;
  overflow: hidden;
  background: #050505;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.26);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--orange);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.play-circle {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.info-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid #ffedd5;
  margin-bottom: 24px;
}

.info-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.info-card p {
  margin: 0 0 14px;
  color: #374151;
}

.side-card {
  position: sticky;
  top: 98px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-empty {
  display: none;
  padding: 32px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #ffedd5;
  text-align: center;
  color: var(--muted);
}

.search-empty.is-visible {
  display: block;
}

.site-footer {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #d1d5db;
  padding: 54px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
}

.footer-brand {
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand .brand-mark {
  width: 38px;
  height: 38px;
}

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

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

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

.footer-links a {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
  background: rgba(249, 115, 22, 0.72);
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

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

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

  .hero-poster {
    min-height: 420px;
    max-width: 520px;
    margin: 0 auto;
  }

  .hero-poster img {
    min-height: 420px;
  }

  .detail-cover {
    max-width: 320px;
  }

  .side-card {
    position: static;
  }
}

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

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

  .header-inner {
    min-height: 66px;
  }

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

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

  .hero-grid {
    padding: 44px 0 88px;
    gap: 30px;
  }

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

  .movie-grid,
  .movie-grid.featured-grid,
  .category-grid,
  .rank-layout,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero h1,
  .page-hero h1,
  .detail-main h1 {
    letter-spacing: -0.02em;
  }

  .hero-poster {
    min-height: 330px;
    border-radius: 22px;
  }

  .hero-poster img {
    min-height: 330px;
  }

  .movie-grid,
  .movie-grid.featured-grid,
  .category-grid,
  .rank-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

  .page-hero {
    padding: 48px 0 32px;
  }

  .detail-hero {
    padding: 36px 0 70px;
  }

  .info-card {
    padding: 22px;
  }

  .rank-item {
    grid-template-columns: 48px 1fr auto;
  }
}
