:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --coral: #fb7185;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --white: #ffffff;
  --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%);
  line-height: 1.6;
}

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

img,
video {
  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: linear-gradient(90deg, var(--orange) 0%, var(--coral) 46%, var(--amber) 100%);
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.28);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--white);
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #ffedd5;
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  width: 42px;
  height: 42px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  color: var(--white);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(90deg, #ea580c 0%, #f59e0b 55%, #fb923c 100%);
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #ea580c 0%, #f59e0b 55%, #fb923c 100%);
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.1) contrast(1.05);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.36) 52%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
  color: var(--white);
}

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

.hero-kicker {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  margin-bottom: 18px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
}

.hero h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.2vw, 42px);
}

.hero p {
  max-width: 680px;
  margin: 0 0 30px;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

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

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

.primary-btn,
.search-strip button,
.filter-panel button {
  background: var(--white);
  color: var(--orange-dark);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.primary-btn:hover,
.search-strip button:hover,
.filter-panel button:hover {
  transform: translateY(-2px) scale(1.02);
  background: #fff7ed;
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  background: linear-gradient(135deg, #fb923c, #f59e0b);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  color: var(--white);
  font-weight: 800;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  padding: 0;
}

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

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, #f9fafb);
  z-index: 3;
}

.home-search {
  position: relative;
  z-index: 6;
  margin-top: -38px;
}

.search-strip,
.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(249, 115, 22, 0.16);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-strip input,
.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: var(--white);
  color: var(--ink);
}

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

.section-block {
  padding: 56px 0;
}

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

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

.section-heading h2 span {
  color: var(--orange);
}

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

.section-link {
  color: var(--orange-dark);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card a:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.18);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #fb923c, #f59e0b);
}

.poster-frame img,
.small-thumb img,
.overview-card img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.movie-card a:hover .poster-frame img,
.category-tile:hover img,
.overview-card:hover img {
  transform: scale(1.08);
}

img.is-missing {
  opacity: 0;
}

.score-badge,
.type-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.score-badge {
  left: 12px;
  background: #eab308;
}

.type-badge {
  right: 12px;
  background: rgba(0, 0, 0, 0.45);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

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

.movie-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-line span,
.detail-meta span,
.tag-list span,
.genre-links a,
.genre-links span,
.side-tags a {
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 700;
}

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

.category-tile,
.overview-card {
  position: relative;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #fb923c, #f59e0b);
  box-shadow: var(--shadow);
  color: var(--white);
}

.category-tile::after,
.overview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
}

.category-tile span,
.category-tile p,
.overview-card strong,
.overview-card span {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile span,
.overview-card strong {
  bottom: 62px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p,
.overview-card span {
  bottom: 20px;
  color: rgba(255, 255, 255, 0.86);
}

.two-column-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.rank-panel,
.side-card,
.detail-card,
.player-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 86px;
  padding: 20px;
}

.rank-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.rank-panel-head h2,
.side-card h2 {
  margin: 0;
  font-size: 22px;
}

.rank-panel-head a {
  color: var(--orange-dark);
  font-weight: 800;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.rank-number {
  width: 30px;
  height: 30px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: var(--white);
  font-weight: 900;
}

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

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

.page-hero {
  background: linear-gradient(90deg, #ea580c 0%, #f59e0b 55%, #fb923c 100%);
  color: var(--white);
}

.compact-hero {
  padding: 76px 0 86px;
  position: relative;
  overflow: hidden;
}

.compact-hero::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  top: -100px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.compact-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 56px);
}

.compact-hero p {
  margin: 0;
  max-width: 760px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.9);
}

.filter-panel {
  grid-template-columns: minmax(240px, 1.3fr) repeat(3, minmax(150px, 0.7fr)) auto;
  margin-bottom: 28px;
}

.filter-result {
  min-height: 24px;
  margin: -12px 0 20px;
  color: var(--muted);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  padding: 34px 0 64px;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.55));
  cursor: pointer;
  z-index: 3;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--white);
  font-size: 36px;
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.42);
  transition: transform 0.22s ease, background 0.22s ease;
}

.player-overlay:hover .play-circle {
  transform: scale(1.1);
  background: var(--orange-dark);
}

.detail-card {
  padding: 28px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 14px;
}

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

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

.lead-text {
  margin: 22px 0;
  font-size: 19px;
  color: #374151;
}

.detail-card h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-card p {
  color: #4b5563;
  margin: 0 0 12px;
}

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

.tag-list {
  margin-top: 18px;
}

.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.side-card {
  padding: 20px;
}

.side-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

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

.small-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #fb923c, #f59e0b);
}

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

.small-card span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  background: linear-gradient(180deg, #111827 0%, #030712 100%);
  color: #d1d5db;
  padding: 46px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

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

.site-footer h2 {
  color: var(--white);
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

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

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 14px;
}

.search-item.is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-content,
  .two-column-area,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .rank-panel,
  .detail-side {
    display: none;
  }

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

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

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

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

  .hero-content {
    display: flex;
    align-items: center;
  }

  .hero-actions,
  .search-strip,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .hero-actions a,
  .search-strip button,
  .filter-panel button {
    width: 100%;
  }

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

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

  .detail-card {
    padding: 20px;
  }
}

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

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

  .hero h1 {
    font-size: 38px;
  }

  .compact-hero {
    padding: 56px 0 64px;
  }

  .play-circle {
    width: 72px;
    height: 72px;
    font-size: 30px;
  }
}
