:root {
  color-scheme: light;
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-deep: #b91c1c;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft: #fff7ed;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  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(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
}

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

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

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, #d97706 0%, #ea580c 48%, #dc2626 100%);
  box-shadow: 0 10px 30px rgba(194, 65, 12, 0.28);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

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

.nav-links a,
.mobile-menu a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: #fde68a;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 10px 0 18px;
  background: rgba(154, 52, 18, 0.44);
}

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

.mobile-menu a {
  display: block;
  padding: 12px 18px;
  margin: 4px 0;
  border-radius: 12px;
  font-weight: 600;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: #111827;
}

.hero-track,
.hero-slide {
  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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.48) 48%, rgba(17, 24, 39, 0.08) 100%);
  z-index: 1;
}

.hero-slide::after {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 0%, rgba(17, 24, 39, 0.92) 100%);
  z-index: 2;
}

.hero-content {
  position: absolute;
  z-index: 3;
  left: max(16px, calc((100% - 1180px) / 2));
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 68px;
  max-width: 720px;
  color: #ffffff;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.card-meta,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.pill.accent {
  background: var(--accent);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 15px 30px rgba(234, 88, 12, 0.34);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px) scale(1.02);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.46);
  font-size: 28px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.main-space {
  padding: 54px 0 72px;
}

.section {
  margin-bottom: 64px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-desc {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.link-more {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 8px 22px 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 {
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
  aspect-ratio: 3 / 4;
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

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

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

.poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.74) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-mark {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translateY(0);
}

.badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #ffffff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--accent);
}

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

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.feature-band {
  padding: 38px 0;
  background: linear-gradient(90deg, #fff7ed 0%, #fef2f2 100%);
  border-top: 1px solid #fed7aa;
  border-bottom: 1px solid #fecaca;
}

.scroller {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x proximity;
}

.scroller .movie-card {
  width: 270px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 130px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-weight: 900;
  font-size: 20px;
}

.rank-cover {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
}

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

.rank-copy h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.page-hero {
  padding: 64px 0;
  color: #ffffff;
  background: radial-gradient(circle at 20% 15%, rgba(251, 191, 36, 0.34), transparent 34%), linear-gradient(90deg, #ea580c 0%, #dc2626 100%);
}

.page-hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #ffedd5;
  font-size: 18px;
  line-height: 1.75;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 26px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.95), rgba(185, 28, 28, 0.92));
  box-shadow: var(--shadow);
}

.category-card::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 160px;
  height: 160px;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 20px;
  color: #ffedd5;
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 12px;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 13px;
  color: var(--ink);
  background: #ffffff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-card,
.related-panel {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #030712;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #030712;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(234, 88, 12, 0.15), rgba(3, 7, 18, 0.58));
  cursor: pointer;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  font-size: 38px;
  transform: translateX(2px);
  transition: transform 0.2s ease;
}

.play-overlay:hover span {
  transform: translateX(2px) scale(1.06);
}

.player-title {
  padding: 22px 24px 26px;
}

.player-title h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.18;
}

.player-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.detail-card {
  padding: 26px;
}

.detail-card h2,
.related-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-card p {
  color: #374151;
  line-height: 1.9;
}

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

.detail-meta span,
.tag-row span,
.card-mini-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 700;
}

.related-panel {
  padding: 22px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-card:hover {
  background: #fff7ed;
}

.related-card .thumb {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 3 / 4;
}

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

.related-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--accent);
  font-weight: 700;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(90deg, #111827 0%, #1f2937 50%, #111827 100%);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.footer-inner p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.75;
}

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

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

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

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

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

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 680px) {
  .hero {
    min-height: 520px;
  }

  .hero-content {
    bottom: 58px;
  }

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

  .hero-arrow {
    display: none;
  }

  .main-space {
    padding: 36px 0 52px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .category-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 46px 88px 1fr;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .rank-num {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .play-overlay span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
