:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #dc2626;
  --brand-dark: #7f1d1d;
  --brand-warm: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

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

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

.header-inner {
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, #dc2626, #f97316);
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: #fee2e2;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: #374151;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.hero-slider {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #111827;
}

.hero-track {
  position: relative;
  min-height: 660px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(127, 29, 29, 0.82) 44%, rgba(17, 24, 39, 0.4) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 1s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 28%, rgba(245, 158, 11, 0.32), transparent 32%), radial-gradient(circle at 80% 70%, rgba(220, 38, 38, 0.28), transparent 35%);
}

.hero-content {
  position: relative;
  max-width: 1180px;
  width: 100%;
  padding: 96px 22px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
}

.hero-copy {
  color: #fff;
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 22px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.75;
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  padding: 7px 11px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #7f1d1d;
  background: #fff;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.primary-button:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.22);
}

.ghost-button {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.78);
}

.ghost-button:hover {
  color: #7f1d1d;
  background: #fff;
}

.ghost-button.dark {
  color: var(--brand-dark);
  border-color: #fecaca;
  background: #fff7ed;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster:before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: inherit;
  z-index: 1;
}

.hero-poster img {
  aspect-ratio: 4 / 5;
  height: 520px;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.home-search {
  max-width: 1120px;
  margin: -42px auto 0;
  padding: 0 22px;
  position: relative;
  z-index: 3;
}

.home-search-form,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.home-search-form input,
.search-input,
.filter-select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: var(--text);
  outline: none;
}

.home-search-form input:focus,
.search-input:focus,
.filter-select:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.home-search-form button {
  min-height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  font-weight: 900;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #7f1d1d;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 13px;
  font-weight: 800;
}

.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 78px 22px;
}

.alt-section {
  max-width: none;
  background: #fff;
}

.alt-section > .section-heading,
.alt-section > .category-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading,
.ranking-title,
.player-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2,
.ranking-title h2,
.player-heading h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

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

.section-link {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.2);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.8);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #fed7aa;
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.movie-cover img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-type,
.movie-year {
  position: absolute;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(220, 38, 38, 0.92);
  backdrop-filter: blur(8px);
}

.movie-type {
  left: 12px;
}

.movie-year {
  right: 12px;
  background: rgba(17, 24, 39, 0.72);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-body h3 a:hover {
  color: var(--brand);
}

.movie-body p {
  margin: 10px 0 12px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-tags span {
  padding: 5px 8px;
  color: #9a3412;
  background: #ffedd5;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.movie-meta a {
  color: var(--brand);
}

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

.category-card,
.category-overview-card,
.story-card {
  border: 1px solid #fed7aa;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: 0 14px 30px rgba(154, 52, 18, 0.08);
}

.category-card {
  display: flex;
  min-height: 188px;
  padding: 20px;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(154, 52, 18, 0.12);
}

.category-card strong,
.category-overview-card h2 {
  font-size: 22px;
  font-weight: 950;
}

.category-card p,
.category-overview-card p {
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-card div,
.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card span,
.category-samples a {
  padding: 6px 8px;
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

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

.ranking-panel,
.ranking-column {
  border-radius: 24px;
  background: #111827;
  color: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.ranking-title {
  margin-bottom: 18px;
}

.ranking-title a {
  color: #fbbf24;
  font-weight: 900;
}

.rank-list,
.ranking-column {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(3px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #7f1d1d;
  background: #fbbf24;
  font-weight: 950;
}

.rank-item img {
  width: 62px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

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

.rank-info em {
  color: #d1d5db;
  font-style: normal;
  font-size: 12px;
}

.page-hero,
.detail-hero {
  color: #fff;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.32), transparent 34%), linear-gradient(135deg, #111827, #7f1d1d 52%, #9a3412);
}

.compact-hero {
  padding: 80px 22px;
}

.compact-hero > div,
.detail-hero > .breadcrumbs,
.detail-layout,
.player-section {
  max-width: 1180px;
  margin: 0 auto;
}

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

.breadcrumbs a:hover {
  color: #fde68a;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 24px;
  align-items: center;
}

.category-overview-card span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.small-button {
  min-height: 42px;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.filter-panel {
  grid-template-columns: 1fr 180px 180px;
  margin-bottom: 28px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.empty-state {
  display: none;
  margin: 34px 0 0;
  padding: 24px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #fed7aa;
}

.empty-state.is-visible {
  display: block;
}

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

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

.detail-hero {
  padding: 48px 22px 72px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.detail-one-line {
  color: rgba(255, 255, 255, 0.9);
}

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

.detail-tags span {
  padding: 7px 11px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 0;
}

.detail-meta-list div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-meta-list dt {
  color: #fde68a;
  font-size: 12px;
  font-weight: 900;
}

.detail-meta-list dd {
  margin: 6px 0 0;
  color: #fff;
  font-weight: 800;
}

.player-section {
  padding: 72px 22px 0;
}

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

.movie-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #020617;
  object-fit: contain;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.62;
  filter: blur(1px) saturate(0.9);
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-badge {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #7f1d1d;
  background: #fff;
  font-size: 36px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

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

.story-card {
  padding: 28px;
}

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

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

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 22px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner p {
  max-width: 640px;
  margin: 12px 0 0;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
}

.footer-links a:hover,
.footer-brand:hover {
  color: #fff;
}

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

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

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

  .two-column-section,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    order: -1;
  }
}

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

  .menu-button {
    display: flex;
  }

  .hero-slider,
  .hero-track {
    min-height: 760px;
  }

  .hero-content,
  .detail-layout,
  .detail-content,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 78px;
    gap: 30px;
  }

  .hero-poster {
    max-width: 260px;
    transform: none;
  }

  .hero-poster img {
    height: auto;
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

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

  .content-section {
    padding: 52px 16px;
  }

  .home-search-form {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .ranking-title,
  .player-heading {
    align-items: start;
    flex-direction: column;
  }

  .movie-body {
    padding: 13px;
  }

  .movie-body p {
    display: none;
  }

  .detail-meta-list,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .play-badge {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}
