:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #fff7ed;
  --accent: #fdf8f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft-line: #f3f4f6;
  --white: #ffffff;
  --dark: #111827;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.10);
  --shadow-strong: 0 22px 60px rgba(17, 24, 39, 0.22);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f9fafb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.88);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #fb923c);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.30);
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.main-nav a,
.mobile-nav a {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary-dark);
}

.header-search {
  display: flex;
  width: min(320px, 32vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
}

.header-search button,
.big-search button,
.primary-btn {
  border: 0;
  color: var(--white);
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 0 16px;
}

.header-search button:hover,
.big-search button:hover,
.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.hero {
  position: relative;
  min-height: 620px;
  background: #0b1020;
  overflow: hidden;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(249, 115, 22, 0.35), transparent 30%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.94) 0%, rgba(3, 7, 18, 0.68) 45%, rgba(3, 7, 18, 0.18) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.86), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 120px 24px 110px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: var(--primary-dark);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 720px;
  margin: 22px 0 0;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags,
.genre-links,
.pill-cloud,
.footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.genre-links a {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 11px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-actions,
.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
}

.ghost-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  width: min(1280px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-controls > button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  font-size: 32px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: var(--primary);
}

.section-shell {
  max-width: 1280px;
  margin: 42px auto 0;
  padding: 0 24px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  align-items: center;
  gap: 24px;
  margin-top: -54px;
  position: relative;
  z-index: 8;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-strong);
}

.search-panel h2,
.section-head h2,
.category-box h2,
.site-footer h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.search-panel p,
.category-box p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.big-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.big-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 16px 18px;
}

.big-search button {
  padding: 0 24px;
}

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

.section-head a {
  color: var(--primary-dark);
  font-weight: 800;
}

.compact-head {
  align-items: center;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: var(--primary-soft);
}

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

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

.type-badge,
.score-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.type-badge {
  left: 12px;
}

.score-badge {
  right: 12px;
  background: var(--primary);
}

.rank-badge {
  left: 12px;
  top: auto;
  bottom: 12px;
  background: rgba(249, 115, 22, 0.90);
}

.poster-action {
  position: absolute;
  inset: auto 14px 14px;
  display: grid;
  place-items: center;
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  background: rgba(17, 24, 39, 0.78);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

.movie-meta {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover {
  color: var(--primary-dark);
}

.movie-desc {
  min-height: 44px;
  margin: 9px 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.card-tags span {
  padding: 4px 8px;
  color: #9a3412;
  background: var(--primary-soft);
}

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

.ranking-card,
.category-box,
.filter-shell,
.ranking-page,
.detail-text,
.detail-left {
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.07);
}

.ranking-card {
  padding: 24px;
  position: sticky;
  top: 90px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: var(--primary-soft);
}

.rank-row span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--white);
  font-weight: 900;
  background: var(--dark);
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--primary-dark);
  font-style: normal;
  font-weight: 900;
}

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

.category-tile {
  min-height: 130px;
  padding: 22px;
  border-radius: 22px;
  color: var(--white);
  background:
    radial-gradient(circle at right top, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(135deg, #111827, #f97316);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease;
}

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

.category-tile strong,
.category-tile span {
  display: block;
}

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

.category-tile span {
  margin-top: 10px;
  color: #ffedd5;
  font-weight: 700;
}

.pill-cloud {
  margin-top: 20px;
}

.pill-link,
.footer-links a,
.genre-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #7c2d12;
  background: var(--primary-soft);
  font-weight: 800;
}

.pill-link span {
  color: var(--muted);
}

.page-main {
  padding-bottom: 20px;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.42), transparent 28%),
    linear-gradient(135deg, #111827, #1f2937 55%, #7c2d12);
}

.slim-hero {
  padding: 78px 24px;
}

.slim-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

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

.slim-hero p:last-child {
  max-width: 760px;
  margin: 16px 0 0;
  color: #e5e7eb;
  font-size: 17px;
}

.filter-shell {
  padding: 24px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 200px));
  gap: 12px;
}

.filters input,
.filters select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: 0;
  background: var(--white);
}

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

.filter-count {
  margin: 16px 0 22px;
  color: var(--muted);
  font-weight: 700;
}

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

.category-box {
  padding: 26px;
}

.category-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.category-row:hover {
  background: var(--primary-soft);
  transform: translateX(3px);
}

.category-row span {
  color: var(--muted);
  font-weight: 800;
}

.ranking-page {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 50px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  transition: background 0.2s ease;
}

.ranking-item:hover {
  background: #f9fafb;
}

.ranking-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--primary);
  font-weight: 900;
}

.ranking-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
}

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

.ranking-info p {
  margin: 0 0 7px;
  color: var(--muted);
}

.ranking-info h2 {
  margin: 0 0 7px;
  font-size: 22px;
}

.ranking-score {
  color: var(--primary-dark);
  font-size: 26px;
}

.detail-main {
  background: #f9fafb;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.detail-bg,
.detail-layer {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.58;
}

.detail-layer {
  background:
    radial-gradient(circle at 72% 22%, rgba(249, 115, 22, 0.30), transparent 28%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.95));
}

.detail-container {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 28px 0 18px;
  color: #d1d5db;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fed7aa;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  padding-bottom: 48px;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow-strong);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--white);
  font-size: 30px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.36);
}

.detail-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px);
}

.detail-panel h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.07;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 18px 0 0;
  color: #e5e7eb;
}

.detail-tags {
  margin-top: 20px;
}

.detail-tags span {
  padding: 7px 10px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.14);
}

.detail-content {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  margin-top: 42px;
}

.detail-left {
  padding: 18px;
  align-self: start;
}

.detail-poster {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.detail-text {
  padding: 30px;
}

.detail-text h2 {
  margin: 28px 0 10px;
  font-size: 26px;
}

.detail-text h2:first-of-type {
  margin-top: 0;
}

.detail-text p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.detail-meta-grid div {
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.detail-meta-grid span,
.detail-meta-grid strong {
  display: block;
}

.detail-meta-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-meta-grid strong {
  margin-top: 5px;
}

.genre-links {
  margin-top: 24px;
}

.related-section {
  padding-bottom: 24px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  color: var(--white);
  font-size: 20px;
}

.footer-links {
  margin-top: 14px;
}

.footer-links a {
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.08);
}

.is-hidden-card {
  display: none !important;
}

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

  .two-column,
  .player-layout {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    padding: 12px 16px;
  }

  .main-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding: 86px 18px 96px;
  }

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

  .hero-summary {
    font-size: 16px;
  }

  .search-panel,
  .category-overview,
  .footer-inner,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .search-panel {
    margin-top: 24px;
    padding: 22px;
  }

  .section-shell {
    padding: 0 16px;
  }

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

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

  .ranking-item {
    grid-template-columns: 40px 78px 1fr;
  }

  .ranking-score {
    grid-column: 3;
    font-size: 20px;
  }

  .detail-container {
    padding: 0 16px;
  }

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

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 18px;
  }

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

  .hero-controls {
    bottom: 22px;
  }

  .hero-controls > button {
    width: 40px;
    height: 40px;
  }

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

  .big-search,
  .filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .big-search button {
    min-height: 46px;
  }

  .movie-grid,
  .wide-grid,
  .compact-grid,
  .category-tiles {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 128px 1fr;
  }

  .poster-link {
    min-height: 180px;
  }

  .movie-desc {
    min-height: auto;
  }

  .ranking-item {
    grid-template-columns: 1fr;
  }

  .ranking-number,
  .ranking-cover,
  .ranking-score {
    grid-column: auto;
  }
}
