
:root {
  --amber: #f59e0b;
  --orange: #f97316;
  --rose: #f43f5e;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --text: #111827;
  --muted: #64748b;
  --surface: #ffffff;
  --surface-warm: #fff7ed;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber), var(--orange), var(--rose));
  box-shadow: 0 16px 35px rgba(249, 115, 22, 0.28);
}

.top-nav {
  max-width: 1240px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  animation: brandPulse 2.6s ease-in-out infinite;
}

.brand-name {
  font-size: clamp(20px, 2vw, 28px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff7ed;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 10px 22px 18px;
  background: linear-gradient(180deg, #ea580c, #f97316);
}

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

.mobile-link {
  color: #ffffff;
  font-weight: 700;
  padding: 10px 0;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--slate);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 35%, rgba(251, 191, 36, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.24) 55%, rgba(0, 0, 0, 0.5)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 70vh;
  margin: 0 auto;
  padding: clamp(70px, 10vw, 120px) 22px 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

.hero-desc {
  max-width: 710px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-kicker span {
  display: inline-grid;
  place-items: center;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.secondary-btn,
.ghost-btn,
.watch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.watch-link {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 15px 35px rgba(249, 115, 22, 0.34);
}

.secondary-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.ghost-btn {
  color: #ffffff;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.watch-link:hover {
  transform: translateY(-2px) scale(1.02);
}

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

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

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

.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px 72px;
}

.search-panel {
  position: relative;
  z-index: 5;
  margin: -82px auto 46px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.compact-hero + .search-panel,
.breadcrumb + .compact-hero + .search-panel {
  margin-top: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 20px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.search-box span {
  color: var(--orange);
  font-size: 24px;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 16px;
  background: transparent;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-chips button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
  cursor: pointer;
}

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

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

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

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  flex: 0 0 auto;
  color: #ea580c;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  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 / 22;
  background: linear-gradient(135deg, #451a03, #f97316, #fb7185);
}

.poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover .poster {
  transform: scale(1.08);
  filter: saturate(1.12);
}

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.22) 35%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.movie-card:hover .poster-shine {
  transform: translateX(130%);
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  box-shadow: 0 10px 22px rgba(244, 63, 94, 0.35);
  font-size: 12px;
}

.movie-card-body {
  padding: 18px;
}

.movie-card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: #ea580c;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

.card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.watch-link {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

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

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

.category-pill {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 138px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #ffedd5);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-pill strong,
.category-card-large h2 {
  font-size: 22px;
  color: #9a3412;
}

.category-pill span,
.category-card-large p {
  color: #64748b;
  line-height: 1.7;
}

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

.ranking-row,
.wide-rank-row {
  display: grid;
  grid-template-columns: auto 76px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-row:hover,
.wide-rank-row:hover {
  transform: translateX(4px);
  background: #ffffff;
}

.ranking-index,
.wide-rank-number {
  width: 42px;
  color: #ea580c;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-cover,
.wide-rank-poster {
  width: 76px;
  height: 96px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #fb7185);
  background-size: cover;
  background-position: center;
}

.ranking-info,
.wide-rank-main {
  display: grid;
  gap: 7px;
}

.ranking-info strong,
.wide-rank-main strong {
  font-size: 18px;
}

.ranking-info em,
.wide-rank-main em {
  color: var(--muted);
  font-style: normal;
}

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

.page-hero {
  overflow: hidden;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 18%, rgba(251, 191, 36, 0.36), transparent 30%),
    linear-gradient(135deg, #7c2d12, #f97316 48%, #be123c);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(36px, 7vw, 78px);
}

.compact-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.05em;
}

.compact-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: #fffbeb;
  font-size: 18px;
  line-height: 1.85;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a {
  color: #ea580c;
}

.category-card-large {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-large a {
  display: block;
  padding: 18px;
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 18px;
}

.category-poster-stack span {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #fb7185);
  background-size: cover;
  background-position: center;
}

.category-card-large strong {
  color: #ea580c;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 42%, rgba(245, 158, 11, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.45);
  font-size: 34px;
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(22px, 3vw, 34px);
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.48);
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(127, 29, 29, 0.82);
  font-weight: 800;
}

.player-error.is-visible {
  display: block;
}

.detail-card,
.side-card {
  margin-top: 24px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-score {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 999px;
  color: #d97706;
  background: #ffedd5;
  font-size: 22px;
  font-weight: 900;
}

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

.detail-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f8fafc;
}

.detail-one-line {
  margin: 0 0 18px;
  color: #334155;
  font-size: 18px;
  line-height: 1.85;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-card p {
  color: #334155;
  line-height: 2;
}

.side-poster {
  min-height: 420px;
  border-radius: 28px;
  background: linear-gradient(135deg, #f97316, #fb7185);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin: 0 0 22px;
}

.side-card dt {
  color: var(--muted);
  font-weight: 900;
}

.side-card dd {
  margin: 0;
  color: #334155;
}

.full-btn {
  width: 100%;
}

.movie-card-compact .movie-card-body {
  padding: 16px;
}

.related-section {
  margin-top: 46px;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: var(--radius);
  color: #9a3412;
  background: #ffedd5;
  font-weight: 900;
  text-align: center;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b, #020617);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 22px 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

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

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

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

.footer-links a {
  color: #94a3b8;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 22px 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

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

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

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

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

  .side-poster {
    min-height: 340px;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

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

  .hero-actions,
  .section-heading,
  .detail-title-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .page-main {
    padding: 34px 16px 58px;
  }

  .search-panel {
    margin-top: -54px;
  }

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

  .ranking-row,
  .wide-rank-row {
    grid-template-columns: auto 58px 1fr;
  }

  .ranking-cover,
  .wide-rank-poster {
    width: 58px;
    height: 76px;
  }

  .wide-rank-score {
    display: none;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .movie-card p {
    min-height: auto;
  }

  .compact-hero {
    padding: 30px 22px;
  }

  .detail-card,
  .side-card {
    padding: 22px;
  }
}
