:root {
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-soft: #ffedd5;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --bg: #f9fafb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.22);
}

.header-inner {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.nav a {
  opacity: 0.94;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.search-form {
  position: relative;
  flex: 0 0 260px;
}

.search-form input {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 46px 0 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  backdrop-filter: blur(12px);
}

.search-form input::placeholder {
  color: rgba(255, 247, 237, 0.86);
}

.search-form button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-menu {
  display: none;
  padding: 0 0 16px;
}

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

.mobile-menu a {
  display: block;
  padding: 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 32px;
}

.hero-panel {
  width: min(850px, 100%);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.32);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.28);
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--brand-dark);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.36);
}

.btn.secondary {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

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

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

.section {
  padding: 46px 0;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading i {
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: var(--brand);
}

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

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 310px;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 20px;
  scrollbar-width: thin;
}

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #f97316);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent 58%);
}

.rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #92400e;
  background: rgba(255, 237, 213, 0.94);
  font-size: 13px;
  font-weight: 800;
}

.play-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-body p {
  height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
}

.tag {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #c2410c;
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 700;
}

.category-panel {
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, #eff6ff, #faf5ff);
}

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

.category-tile {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #f97316);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.category-tile strong {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 22px;
}

.category-tile span {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -30px;
  bottom: -38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 96px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.rank-item img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #f97316);
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.page-hero {
  padding: 56px 0;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 35%), linear-gradient(135deg, #f97316 0%, #ef4444 100%);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.7;
}

.breadcrumb {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.84);
}

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

.player-card,
.info-card,
.sidebar-card {
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  font-size: 34px;
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.38);
}

.player-caption {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}

.info-card {
  padding: 26px;
}

.info-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.info-card p {
  color: #374151;
  line-height: 1.85;
}

.info-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.info-block h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-card {
  padding: 20px;
}

.side-movie {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.side-movie:last-child {
  border-bottom: 0;
}

.side-movie img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #f97316);
}

.side-movie strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.4;
}

.footer {
  margin-top: 60px;
  padding: 46px 0;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
}

.footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer p,
.footer a {
  color: #9ca3af;
  line-height: 1.8;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  outline: none;
}

.search-results-count {
  width: 100%;
  color: var(--muted);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.pagination-note {
  color: var(--muted);
  text-align: center;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .nav,
  .site-header .search-form {
    display: none;
  }

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

  .hero {
    height: 520px;
  }

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

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

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    height: 500px;
  }

  .hero-content {
    padding: 20px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 34px 0;
  }

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

  .rank-item {
    grid-template-columns: 42px 86px 1fr;
  }

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