* {
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --orange: #f97316;
  --red: #dc2626;
  --dark: #111827;
  --dark-soft: #1f2937;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.28);
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(135deg, #ea580c, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
  color: var(--orange);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-size: 22px;
}

.mobile-menu {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-menu.is-open {
  display: grid;
  gap: 12px;
}

.page-main {
  padding-top: 64px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1f2937 50%, #0f172a);
}

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

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

.hero-bg {
  position: absolute;
  inset: -24px;
  background-position: center;
  background-size: cover;
  filter: blur(9px);
  opacity: 0.34;
  transform: scale(1.04);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 35%, rgba(249, 115, 22, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72) 48%, rgba(17, 24, 39, 0.36)),
    linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0) 42%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 42px;
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.18);
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-banner h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  color: #ffffff;
}

.hero p,
.page-banner p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.26);
}

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

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  color: var(--orange);
  background: rgba(255, 255, 255, 0.92);
  font-size: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

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

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

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

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

.quick-cats,
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 34px 0 12px;
}

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ea580c;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 800;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.section-block {
  padding: 54px 0 12px;
}

.inner-section {
  padding: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.heading-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ea580c;
  background: #ffedd5;
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
}

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

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

.movie-card,
.featured-card {
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-link,
.featured-card a {
  display: block;
  height: 100%;
}

.card-cover,
.featured-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
}

.card-cover img,
.featured-cover img,
.related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.featured-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.cover-shade,
.featured-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 54%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-shade,
.featured-card .featured-fade {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.86);
  color: var(--orange);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.year-badge,
.featured-year {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.card-body,
.featured-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 9px;
  color: #ea580c;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 800;
}

.pill.warm {
  color: #b91c1c;
  background: #fee2e2;
}

.card-title,
.featured-info strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title,
.featured-card:hover strong,
.related-card:hover strong {
  color: #ea580c;
}

.card-desc,
.featured-info span:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.split-block {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 36px;
  align-items: start;
}

.rank-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.rank-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 12px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: #fff7ed;
}

.rank-num {
  color: #ea580c;
  font-weight: 900;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: #ea580c;
  font-weight: 800;
}

.page-banner {
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.page-banner-inner {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 74px;
}

.page-banner h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.search-panel {
  margin-top: 34px;
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 150px;
  gap: 14px;
}

.search-box input,
.search-box select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
  outline: none;
  background: #ffffff;
}

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

.search-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.search-grid .movie-card.is-hidden {
  display: none;
}

.detail-top {
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.detail-top .detail-shell {
  padding: 18px 0;
}

.back-link,
.breadcrumb a {
  color: #ea580c;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 32px;
  padding: 34px 0 70px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

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

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

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: var(--orange);
  background: rgba(255, 255, 255, 0.92);
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-button:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.player-box.is-playing .player-button {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: #ffffff;
  text-align: center;
  font-size: 14px;
}

.detail-card,
.side-panel {
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.detail-card h1 {
  margin: 14px 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
}

.detail-card h2,
.side-panel h2 {
  margin: 28px 0 14px;
  font-size: 22px;
}

.detail-card p {
  color: #374151;
  line-height: 1.95;
  font-size: 16px;
}

.lead-text {
  font-size: 18px !important;
  color: #1f2937 !important;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 10px;
  background: #f3f4f6;
}

.detail-card .tag-list span {
  color: #ea580c;
  background: #fff7ed;
}

.detail-side {
  position: relative;
}

.side-panel {
  position: sticky;
  top: 86px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #e5e7eb;
}

.related-cover span {
  position: absolute;
  right: 7px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 7px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 11px;
}

.related-info {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.related-info strong {
  line-height: 1.35;
}

.related-info small {
  color: var(--muted);
}

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

.footer-shell {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 42px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 18px;
}

.site-footer p {
  max-width: 420px;
  color: #9ca3af;
  line-height: 1.8;
}

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

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

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

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

.full-rank {
  max-height: none;
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-layout,
  .split-block {
    grid-template-columns: 1fr;
  }

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

  .hero-content {
    padding: 70px 0 88px;
  }

  .hero-poster {
    width: min(320px, 80vw);
  }

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

  .side-panel {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-poster {
    width: 100%;
    max-width: 360px;
  }

  .quick-cats,
  .category-grid,
  .movie-grid,
  .featured-grid,
  .footer-shell {
    grid-template-columns: 1fr 1fr;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

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

  .rank-meta {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .content-shell,
  .detail-shell,
  .footer-shell,
  .nav-shell,
  .hero-content,
  .page-banner-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 17px;
  }

  .hero {
    min-height: 640px;
  }

  .hero h1,
  .page-banner h1 {
    font-size: 34px;
  }

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

  .quick-cats,
  .category-grid,
  .movie-grid,
  .featured-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .detail-card,
  .side-panel,
  .search-panel {
    padding: 18px;
  }

  .related-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }
}
