:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --secondary: #ef4444;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --panel: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0, #f8fafc 22rem, #f8fafc 100%);
  font-family: -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%;
}

button,
input,
select {
  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.8);
  box-shadow: 0 6px 26px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  max-width: 1280px;
  height: 4.25rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 0.85rem;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.brand-text {
  font-size: 1.28rem;
  background: linear-gradient(135deg, #c2410c, #dc2626);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 0.55rem 0.85rem;
  color: #374151;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #c2410c;
  background: #fff7ed;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-hero input {
  min-width: 15rem;
  padding: 0.72rem 1rem;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-hero input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.header-search button,
.mobile-search button,
.search-hero button,
.filter-bar button,
.hero-button,
.rank-action,
.player-cover strong {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-hero button,
.filter-bar button {
  padding: 0.72rem 1.05rem;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.filter-bar button:hover,
.hero-button:hover,
.rank-action:hover,
.player-cover:hover strong {
  transform: translateY(-1px);
  box-shadow: 0 18px 35px rgba(239, 68, 68, 0.3);
}

.mobile-menu-button {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem;
  background: #fff7ed;
  border: 0;
  border-radius: 0.8rem;
}

.mobile-menu-button span {
  width: 1.35rem;
  height: 0.14rem;
  background: #9a3412;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
}

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

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.mobile-link {
  padding: 0.75rem 0.9rem;
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 0.9rem;
  font-weight: 700;
}

.container,
.page-shell {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 34rem;
  color: #fff;
  background: #111827;
}

.hero-track {
  position: relative;
  min-height: 34rem;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(124, 45, 18, 0.72), rgba(17, 24, 39, 0.22)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

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

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 16% 28%, rgba(249, 115, 22, 0.32), transparent 34%), linear-gradient(180deg, transparent 0, rgba(17, 24, 39, 0.42) 100%);
}

.hero-content {
  position: relative;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
  max-width: 52rem;
  margin: 1.2rem 0 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h2 {
  font-size: clamp(2.25rem, 5vw, 4.8rem);
}

.hero p {
  max-width: 48rem;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.32rem);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.hero-meta {
  margin-top: 1.2rem;
}

.hero-meta span,
.detail-meta span {
  padding: 0.38rem 0.68rem;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
}

.hero-button.is-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: none;
}

.hero-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-nav.prev {
  left: max(1rem, calc((100vw - 1280px) / 2));
}

.hero-nav.next {
  right: max(1rem, calc((100vw - 1280px) / 2));
}

.hero-dots {
  position: absolute;
  right: max(1rem, calc((100vw - 1280px) / 2));
  bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

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

.hero-dot.is-active {
  width: 2rem;
  background: #fff;
}

.section {
  padding: 4rem 0;
}

.section.is-white {
  background: #fff;
}

.section.is-soft {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-heading h2,
.page-title h1,
.detail-copy h2,
.related h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-title p {
  max-width: 42rem;
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #ea580c;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 10.5rem;
  padding: 1.35rem;
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.category-card::after {
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 8rem;
  height: 8rem;
  content: "";
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.category-card span {
  position: relative;
  display: block;
  font-size: 1.22rem;
  font-weight: 900;
}

.category-card p {
  position: relative;
  margin: 0.65rem 0 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.category-card strong {
  position: relative;
  display: inline-flex;
  padding: 0.45rem 0.75rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.tone-orange { background: linear-gradient(135deg, #f97316, #ef4444); }
.tone-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.tone-purple { background: linear-gradient(135deg, #7c3aed, #db2777); }
.tone-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.tone-cyan { background: linear-gradient(135deg, #0891b2, #2563eb); }
.tone-green { background: linear-gradient(135deg, #16a34a, #10b981); }
.tone-indigo { background: linear-gradient(135deg, #4f46e5, #8b5cf6); }
.tone-slate { background: linear-gradient(135deg, #334155, #111827); }
.tone-amber { background: linear-gradient(135deg, #d97706, #f97316); }
.tone-red { background: linear-gradient(135deg, #dc2626, #991b1b); }

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 1.25rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7c2d12);
}

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

.movie-card:hover .poster-link img,
.rank-item:hover .rank-poster img,
.related-mini:hover img {
  transform: scale(1.06);
}

.type-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  padding: 0.34rem 0.58rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 999px;
}

.type-badge {
  top: 0.7rem;
  left: 0.7rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.play-chip {
  right: 0.7rem;
  bottom: 0.7rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.movie-card-body {
  padding: 1rem;
}

.movie-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover,
.detail-copy a:hover {
  color: #ea580c;
}

.movie-meta {
  margin: 0.45rem 0;
  color: #6b7280;
  font-size: 0.88rem;
}

.movie-line {
  display: -webkit-box;
  min-height: 3.25rem;
  margin: 0.55rem 0 0;
  overflow: hidden;
  color: #4b5563;
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.8rem;
}

.tag-list span {
  padding: 0.24rem 0.5rem;
  color: #c2410c;
  background: #fff7ed;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

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

.movie-card.is-compact {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
}

.movie-card.is-compact .poster-link {
  aspect-ratio: auto;
  min-height: 12rem;
}

.ranking-list {
  display: grid;
  gap: 0.8rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 3.5rem 5.5rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 1.1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
  border-radius: 0.75rem;
}

.rank-content h3 {
  margin: 0;
  font-size: 1.05rem;
}

.rank-content p,
.rank-content span {
  display: block;
  margin: 0.2rem 0 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.rank-action {
  padding: 0.58rem 0.88rem;
}

.page-hero,
.search-hero,
.detail-hero {
  padding: 4rem 0;
  background: radial-gradient(circle at 12% 18%, rgba(249, 115, 22, 0.2), transparent 30%), linear-gradient(135deg, #fff7ed, #ffffff 48%, #eff6ff);
}

.page-title h1 {
  max-width: 58rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.breadcrumb a {
  color: #ea580c;
  font-weight: 700;
}

.filter-bar,
.search-hero form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.35rem;
}

.filter-bar input,
.search-hero input {
  flex: 1 1 18rem;
}

.filter-empty {
  display: none;
  padding: 2rem;
  text-align: center;
  color: #6b7280;
  background: #fff;
  border: 1px dashed #fdba74;
  border-radius: 1rem;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.75fr);
  gap: 1.5rem;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050505;
  border-radius: 1.35rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.7rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.78));
  border: 0;
  cursor: pointer;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 5.3rem;
  height: 5.3rem;
  padding-left: 0.3rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.32);
  font-size: 2rem;
}

.player-cover strong {
  padding: 0.72rem 1.1rem;
}

.player-shell.is-ready .player-cover {
  display: none;
}

.detail-card,
.detail-copy,
.related-panel {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 1.35rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-card {
  overflow: hidden;
}

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

.detail-card-body,
.detail-copy,
.related-panel {
  padding: 1.2rem;
}

.detail-hero h1 {
  margin: 0.4rem 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-hero p {
  max-width: 62rem;
  margin: 0.8rem 0 0;
  color: #4b5563;
  font-size: 1.05rem;
}

.detail-copy {
  margin-top: 1.4rem;
}

.detail-copy h2 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: 1.55rem;
}

.detail-copy p {
  margin: 0 0 1rem;
  color: #374151;
  white-space: pre-line;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.related-mini {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.75rem;
  align-items: center;
}

.related-mini .thumb {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
  border-radius: 0.75rem;
}

.related-mini h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.25;
}

.related-mini p {
  margin: 0.25rem 0 0;
  color: #6b7280;
  font-size: 0.82rem;
}

.site-footer {
  margin-top: 4rem;
  color: #cbd5e1;
  background: #111827;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 2rem;
}

.footer-brand {
  color: #fff;
  font-size: 1.3rem;
}

.footer-inner p {
  max-width: 34rem;
  margin: 0.8rem 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.footer-links a {
  padding: 0.45rem 0.7rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

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

.footer-bottom {
  padding: 1rem;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

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

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

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

  .mobile-menu-button {
    display: flex;
    margin-left: auto;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .hero,
  .hero-track {
    min-height: 32rem;
  }

  .hero-content {
    padding: 4.5rem 0 5.5rem;
  }

  .hero-nav {
    top: auto;
    bottom: 1.2rem;
    transform: none;
  }

  .hero-nav.prev {
    left: 1rem;
  }

  .hero-nav.next {
    left: 4.5rem;
    right: auto;
  }

  .movie-grid.is-wide,
  .movie-grid,
  .category-grid,
  .list-grid,
  .detail-grid,
  .footer-inner,
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 2.8rem 4.5rem 1fr;
  }

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 4rem;
    padding: 0 1rem;
  }

  .container,
  .page-shell,
  .hero-content,
  .footer-inner {
    width: min(100% - 1rem, 1280px);
  }

  .hero h1,
  .hero h2 {
    font-size: 2.45rem;
  }

  .section {
    padding: 2.5rem 0;
  }

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

  .movie-grid.is-wide,
  .movie-grid,
  .category-grid,
  .list-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.is-compact {
    grid-template-columns: 7.5rem 1fr;
  }

  .movie-card.is-compact .poster-link {
    min-height: 10.5rem;
  }

  .rank-item {
    grid-template-columns: 2.6rem 4rem 1fr;
    gap: 0.75rem;
  }

  .mobile-links {
    grid-template-columns: 1fr;
  }

  .player-cover span {
    width: 4.4rem;
    height: 4.4rem;
  }
}
