:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --orange: #f97316;
  --amber: #f59e0b;
  --blue: #2563eb;
  --teal: #14b8a6;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

main {
  min-height: 70vh;
}

img {
  background: #e5e7eb;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 1px 14px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.site-nav {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: transparent;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
  font-size: 15px;
}

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

.nav-links a {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.filter-bar input,
.filter-bar select,
.large-search input {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input {
  width: 236px;
  padding: 10px 16px;
}

.nav-search button,
.large-search button {
  border-radius: 999px;
  background: var(--orange);
  color: #ffffff;
  font-weight: 700;
  padding: 10px 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.large-search button:hover,
.primary-btn:hover {
  background: #ea580c;
  transform: translateY(-1px);
}

.nav-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.large-search input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: #374151;
  font-size: 28px;
}

.hero-wrap,
.content-section,
.page-hero,
.detail-inner,
.player-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-wrap {
  padding: 32px 0 20px;
}

.hero-frame {
  position: relative;
  height: 520px;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-backdrop div {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.42) 42%, rgba(0, 0, 0, 0.04));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  right: clamp(24px, 22vw, 360px);
  bottom: clamp(32px, 8vw, 82px);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  background: var(--orange);
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #f97316;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags .tag,
.detail-tags .tag {
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.14);
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.primary-btn {
  min-height: 44px;
  padding: 0 24px;
  color: #ffffff;
  background: var(--orange);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.ghost-btn {
  min-height: 44px;
  padding: 0 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-nav {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 26px;
  display: flex;
  gap: 8px;
}

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

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

.content-section {
  padding: 34px 0;
}

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

.section-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--orange);
  background: #fff7ed;
  border-radius: 12px;
  font-weight: 900;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-more {
  color: var(--orange);
  background: #fff7ed;
  padding: 9px 15px;
}

.section-more:hover {
  color: #ffffff;
  background: var(--orange);
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.14);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(249, 115, 22, 0.92);
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-info {
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.movie-line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 42px;
  overflow: hidden;
  margin: 9px 0 12px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.62;
}

.compact-card .movie-line {
  -webkit-line-clamp: 1;
  min-height: 21px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.story-card,
.category-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 18px;
}

.panel-title {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.ranking-item {
  display: grid;
  grid-template-columns: 30px 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--orange);
  background: #fff7ed;
  font-weight: 900;
}

.ranking-item img {
  width: 56px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  color: #111827;
}

.ranking-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.page-hero {
  margin-top: 32px;
  padding: 44px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  box-shadow: var(--shadow);
}

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

.soft-hero {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.ranking-hero {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.search-hero {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

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

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

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

.category-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.category-card h2 {
  position: relative;
  font-size: 25px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  min-height: 72px;
  margin: 12px 0 16px;
  color: #4b5563;
  line-height: 1.7;
}

.category-glow {
  position: absolute;
  right: -42px;
  top: -42px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
}

.category-samples {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 116px;
  margin-bottom: 18px;
}

.category-samples a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  color: #374151;
  font-weight: 650;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
}

.filter-bar input {
  flex: 1 1 280px;
  padding: 12px 16px;
}

.filter-bar select {
  min-width: 150px;
  padding: 12px 16px;
}

.empty-state {
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
}

.large-search {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 24px;
}

.large-search input {
  flex: 1;
  padding: 15px 18px;
}

.large-search button {
  padding: 0 26px;
}

.search-title {
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 900;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  filter: saturate(1.08);
}

.detail-inner {
  position: relative;
  z-index: 1;
  padding: 42px 0 56px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: clamp(26px, 5vw, 56px);
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
  max-width: 880px;
}

.detail-one-line {
  max-width: 880px;
  margin: 18px 0;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.detail-copy .primary-btn {
  margin-top: 24px;
}

.player-section {
  padding: 34px 0 8px;
}

.stream-player {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

.stream-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.32), rgba(0, 0, 0, 0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.38);
  font-size: 34px;
}

.player-overlay strong {
  font-size: 18px;
}

.stream-player.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.story-card {
  padding: 26px;
}

.story-card h2 {
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
}

.story-card p {
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

.site-footer {
  margin-top: 44px;
  padding: 34px 0;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin-top: 10px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

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

[hidden] {
  display: none !important;
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .site-nav {
    flex-wrap: wrap;
    min-height: 66px;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid #e5e7eb;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-search {
    flex-basis: 100%;
  }

  .nav-search input {
    flex: 1;
    width: auto;
  }

  .hero-frame {
    height: 480px;
    border-radius: 20px;
  }

  .hero-content {
    right: 24px;
  }

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

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

  .page-hero {
    padding: 30px 22px;
  }

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

  .detail-poster {
    width: min(250px, 68vw);
  }

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

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 21px;
  }

  .hero-wrap,
  .content-section,
  .page-hero,
  .detail-inner,
  .player-section {
    width: min(100% - 20px, 1280px);
  }

  .hero-frame {
    height: 440px;
  }

  .hero-nav {
    display: none;
  }

  .hero-dots {
    left: 24px;
    right: auto;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-line {
    display: none;
  }

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

  .large-search {
    flex-direction: column;
  }
}
