* {
  box-sizing: border-box;
}

:root {
  --orange: #f97316;
  --amber: #f59e0b;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.10);
  --shadow-lg: 0 25px 60px rgba(17, 24, 39, 0.18);
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--orange);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.32);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  border-radius: 999px;
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--orange);
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(105deg, #f97316 0%, #f59e0b 48%, #fb923c 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.32), transparent 32%),
    radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.18), transparent 36%),
    rgba(0, 0, 0, 0.08);
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 42px;
  padding: 72px 0;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

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

.hero p {
  margin: 0 0 26px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-light {
  color: var(--orange);
  background: #fff;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.16);
}

.btn-dark {
  color: #fff;
  background: rgba(17, 24, 39, 0.86);
}

.btn-orange {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.26);
}

.hero-slider {
  position: relative;
  min-height: 470px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.hero-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 35px 90px rgba(17, 24, 39, 0.30);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  height: 305px;
  object-fit: cover;
}

.hero-card-body {
  padding: 24px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.92));
}

.hero-card-body h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.hero-card-body p {
  display: -webkit-box;
  margin: 0 0 16px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hero-meta,
.detail-meta,
.category-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.hero-meta span,
.detail-meta span,
.category-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 750;
}

.hero-controls {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 28px;
  background: #fff;
}

.section {
  padding: 62px 0;
}

.section.alt {
  background: #fff;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 28px;
}

.section-header h2,
.page-title h1 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-header p,
.page-title p {
  margin: 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

.poster-wrap {
  position: relative;
  height: 268px;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.movie-card.compact .poster-wrap {
  height: 210px;
}

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

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.66));
  transition: opacity 0.25s ease;
}

.poster-overlay span {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

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

.region-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(17, 24, 39, 0.18);
}

.region-badge {
  right: 14px;
  padding: 6px 10px;
  background: var(--orange);
}

.rank-badge {
  left: 14px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #111827, #374151);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 1.45em;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 28px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

.tag-row.mini span {
  padding: 3px 7px;
  font-size: 11px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta strong {
  color: var(--orange);
}

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

.category-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  padding: 22px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -32px;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

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

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.page-hero {
  padding: 58px 0 32px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb 58%, #fff);
}

.page-title {
  max-width: 790px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--orange);
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  padding: 18px;
  margin: 24px 0 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.05);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  outline: 0;
  background: #fff;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 68px 76px minmax(0, 1fr) 160px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #374151);
  font-weight: 900;
}

.rank-row img {
  width: 76px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-row h3 {
  margin: 0 0 5px;
  font-size: 19px;
}

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

.rank-score {
  color: var(--orange);
  font-weight: 900;
  text-align: right;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
  gap: 30px;
  padding: 36px 0 62px;
}

.detail-card,
.side-card,
.text-panel {
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-card {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  font-size: 34px;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.16;
}

.detail-meta span {
  color: #9a3412;
  background: #ffedd5;
}

.text-panel {
  padding: 28px;
  margin-top: 24px;
}

.text-panel h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0 0 16px;
  color: #374151;
}

.side-card {
  padding: 18px;
}

.side-card + .side-card {
  margin-top: 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
}

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

.small-list {
  display: grid;
  gap: 12px;
}

.small-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.small-card:hover {
  transform: translateX(3px);
  background: #fff7ed;
}

.small-card img {
  width: 76px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.small-card strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.site-footer {
  color: #d1d5db;
  background: #111827;
}

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

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

.site-footer p {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a {
  color: #9ca3af;
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--orange);
}

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

.footer-logo {
  margin-bottom: 14px;
}

.hide-card {
  display: none !important;
}

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

.empty-state.show {
  display: block;
}

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

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

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

  .hero-slider {
    min-height: 510px;
  }

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

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

  .menu-toggle {
    display: inline-block;
  }

  .header-inner {
    height: 64px;
  }

  .hero-inner {
    min-height: auto;
    padding: 42px 0 52px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-slider {
    min-height: 450px;
  }

  .hero-card img {
    height: 260px;
  }

  .section {
    padding: 42px 0;
  }

  .section-header {
    display: block;
  }

  .section-actions {
    margin-top: 16px;
  }

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

  .poster-wrap {
    height: 220px;
  }

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

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

  .rank-score {
    grid-column: 2 / 4;
    text-align: left;
  }

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

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

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

  .poster-wrap,
  .movie-card.compact .poster-wrap {
    height: 280px;
  }

  .hero-card-body h2 {
    font-size: 24px;
  }

  .detail-content,
  .text-panel {
    padding: 20px;
  }
}
