:root {
  --brand: #f97316;
  --brand-strong: #ef4444;
  --brand-pink: #ec4899;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 32%, #ffffff 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,
video {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 48%, var(--brand-pink) 100%);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.26);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--brand-strong);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 10px 24px rgba(0, 0, 0, 0.12);
}

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

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

.nav-link {
  opacity: 0.9;
  font-weight: 700;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.top-search input,
.mobile-search input,
.filter-panel input,
.search-panel input {
  width: 220px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--ink);
  background: #ffffff;
}

.top-search input {
  width: 210px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.top-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--brand-strong);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  width: 100%;
}

.mobile-links,
.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-links a,
.mobile-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 620px;
  color: #ffffff;
  background: #111827;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.04);
}

.hero-shade {
  background: radial-gradient(circle at 78% 18%, rgba(236, 72, 153, 0.3), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.28) 100%), linear-gradient(0deg, rgba(249, 115, 22, 0.22), rgba(236, 72, 153, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  gap: 48px;
  align-items: center;
  padding: 70px 0;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 14px 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.hero-copy p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-pink));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.hero-tags,
.detail-meta,
.rank-meta,
.movie-line,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.detail-meta span,
.rank-meta span,
.tag-row span,
.detail-tags a {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #9a3412;
  background: #ffedd5;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

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

.btn:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.32);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
  pointer-events: none;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.hero-prev {
  left: max(18px, calc((100vw - 1180px) / 2 - 64px));
}

.hero-next {
  right: max(18px, calc((100vw - 1180px) / 2 - 64px));
}

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

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

.hero-dot.is-active {
  width: 30px;
  background: #ffffff;
}

.quick-panel,
.content-section,
.page-shell,
.site-footer .footer-grid,
.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.quick-panel {
  margin-top: -48px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-panel h2,
.section-head h2,
.page-hero h1,
.detail-copy h1,
.article-section h2,
.footer-logo {
  margin: 8px 0 0;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.quick-panel h2,
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.chip-row,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-row a,
.category-tabs a {
  border-radius: 999px;
  padding: 10px 14px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 900;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chip-row a:hover,
.category-tabs a:hover,
.category-tabs a.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  transform: translateY(-2px);
}

.content-section {
  padding: 54px 0 0;
}

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

.section-head p {
  max-width: 580px;
  color: var(--muted);
}

.text-link {
  color: var(--brand-strong);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #f9a8d4);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 2.75;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.rating-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  font-weight: 900;
}

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

.movie-line {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-line a {
  color: var(--brand-strong);
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 1.04rem;
  line-height: 1.35;
  font-weight: 950;
}

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

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

.is-compact p {
  min-height: 42px;
}

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

.category-card,
.category-overview-card {
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card span,
.category-overview-card h2 {
  display: block;
  font-size: 1.12rem;
  font-weight: 950;
}

.category-card p,
.category-overview-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.category-cover-row img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.page-shell {
  padding: 32px 0 0;
}

.page-hero,
.detail-hero {
  border-radius: 32px;
  padding: clamp(28px, 5vw, 54px);
  background: radial-gradient(circle at 88% 12%, rgba(236, 72, 153, 0.22), transparent 32%), linear-gradient(135deg, #fff7ed, #ffffff 58%, #fdf2f8);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
}

.page-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.category-hero .category-tabs {
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a {
  color: var(--brand-strong);
}

.filter-panel {
  margin: 24px 0 0;
  padding: 16px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.filter-panel input {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.empty-state {
  display: none;
  padding: 38px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  background: #ffffff;
}

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

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

.rank-list-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
  display: grid;
  grid-template-columns: 52px 86px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 22px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-pink));
  font-weight: 950;
}

.rank-thumb img {
  width: 86px;
  aspect-ratio: 2 / 2.7;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 950;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta span {
  color: var(--muted);
  background: #f3f4f6;
}

.detail-shell {
  overflow: visible;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 1.02;
}

.detail-line {
  max-width: 780px;
  color: #374151;
  font-size: 1.12rem;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

.player-section {
  margin-top: 28px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.18), rgba(15, 23, 42, 0.78)), rgba(15, 23, 42, 0.66);
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--brand-strong);
  background: #ffffff;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
  font-size: 2rem;
}

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

.article-grid article {
  border-radius: 26px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.article-grid h2 {
  font-size: 1.42rem;
}

.article-grid p {
  color: #374151;
}

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

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-logo {
  color: #ffffff;
  font-size: 1.5rem;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.05rem;
}

.site-footer p {
  color: #cbd5e1;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

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

.footer-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

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

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

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

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-wrap {
    gap: 12px;
  }

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

  .hero-content,
  .detail-hero,
  .quick-panel,
  .article-grid,
  .footer-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 280px;
  }

  .quick-panel {
    margin-top: -28px;
  }

  .rank-list-compact {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .brand-text {
    font-size: 1.05rem;
  }

  .hero,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    padding: 54px 0 78px;
    gap: 24px;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 74px 1fr;
    gap: 10px;
  }

  .rank-thumb img {
    width: 74px;
  }

  .search-panel form,
  .mobile-search {
    flex-direction: column;
  }

  .detail-hero,
  .page-hero {
    border-radius: 24px;
  }

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