:root {
  color-scheme: light;
  --brand-red: #dc2626;
  --brand-red-dark: #7f1d1d;
  --brand-blue: #2563eb;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f9fafb;
  --dark: #111827;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f3f4f6;
  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand {
  font-size: 22px;
  color: #111827;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
  font-size: 14px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-blue);
}

.nav-dropdown {
  position: relative;
}

.dropdown-trigger {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.dropdown-menu {
  position: absolute;
  left: 0;
  top: 42px;
  width: 190px;
  padding: 10px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
}

.dropdown-menu a:hover {
  color: var(--brand-blue);
  background: #eff6ff;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-search,
.mobile-search,
.search-panel,
.local-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.local-filter input {
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #ffffff;
  outline: none;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 250px;
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.local-filter input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  color: #ffffff;
  background: #2563eb;
  cursor: pointer;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: #111827;
}

.mobile-nav {
  display: none;
  padding: 10px 22px 18px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.home-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 12% 18%, rgba(248, 113, 113, 0.5), transparent 26%), linear-gradient(115deg, #7f1d1d, #b91c1c 44%, #111827);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(17, 24, 39, 0.24));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 74px 22px 58px;
}

.hero-heading {
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-kicker {
  color: var(--brand-red);
}

.hero-heading h1,
.sub-hero h1,
.detail-info h1 {
  margin: 10px 0 14px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.hero-heading h1 {
  font-size: clamp(38px, 7vw, 62px);
}

.hero-heading p,
.sub-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 14px 32px rgba(153, 27, 27, 0.35);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(190px, 1fr);
  gap: 16px;
}

.hero-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 22px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 50px rgba(17, 24, 39, 0.32);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.hero-card-large {
  grid-column: span 3;
  grid-row: span 2;
}

.hero-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 28px 58px rgba(17, 24, 39, 0.42);
}

.hero-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.hero-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72));
}

.hero-card-content h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 20px;
}

.hero-card-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.hero-pills a {
  padding: 9px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.white-section {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1180px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  background: #ffffff;
}

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

.section-header h2 {
  margin: 6px 0 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.section-more {
  color: var(--brand-red);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: 20px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(17, 24, 39, 0.18);
}

.category-tile span,
.category-overview-card h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-image {
  position: relative;
  min-height: 252px;
  background-color: #991b1b;
  background-position: center;
  background-size: cover;
  transition: transform 0.28s ease;
}

.movie-card:hover .poster-image {
  transform: scale(1.025);
}

.compact-card .poster-image {
  min-height: 210px;
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.7);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-content {
  padding: 16px;
}

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-content h3 {
  min-height: 48px;
  margin: 8px 0;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-content p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #991b1b;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

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

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

.rank-item {
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.rank-link {
  display: grid;
  grid-template-columns: 62px 98px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  font-weight: 900;
}

.rank-thumb {
  height: 80px;
  border-radius: 14px;
  background-position: center;
  background-size: cover;
}

.rank-info h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.rank-info p {
  margin: 0 0 8px;
  color: #4b5563;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sub-hero {
  color: #ffffff;
  background: radial-gradient(circle at 10% 10%, rgba(248, 113, 113, 0.34), transparent 28%), linear-gradient(120deg, #7f1d1d, #111827);
}

.sub-hero > div {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 22px;
}

.sub-hero h1 {
  font-size: clamp(34px, 6vw, 52px);
}

.category-hero .local-filter,
.search-hero .search-panel {
  margin-top: 24px;
}

.local-filter input {
  width: min(620px, 100%);
  padding: 13px 16px;
}

.search-panel input {
  width: min(620px, 100%);
  padding: 14px 16px;
}

.search-panel button {
  min-height: 50px;
  padding: 0 24px;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  color: #111827;
  background: #ffffff;
}

.category-overview-card p {
  color: #4b5563;
}

.category-overview-card strong {
  display: inline-flex;
  margin-top: 14px;
  color: var(--brand-red);
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-collage span {
  height: 74px;
  display: block;
  border-radius: 12px;
  background-position: center;
  background-size: cover;
}

.detail-hero {
  position: relative;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
}

.detail-hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 22px 58px;
}

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

.detail-poster {
  min-height: 440px;
  border-radius: 24px;
  background-color: #991b1b;
  background-position: center;
  background-size: cover;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  max-width: 780px;
  font-size: clamp(36px, 6vw, 60px);
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

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

.detail-meta-grid span {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-meta-grid strong {
  display: block;
  margin-bottom: 4px;
  color: #fecaca;
  font-size: 12px;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.72);
}

.player-section {
  padding-top: 44px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 30px 70px rgba(17, 24, 39, 0.28);
}

.movie-video {
  display: block;
  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;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.34), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.36);
  font-size: 30px;
}

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

.player-overlay.is-hidden {
  display: none;
}

.player-message {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: min(560px, calc(100% - 40px));
  padding: 14px 18px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  transform: translate(-50%, -50%);
  display: none;
}

.player-message.is-visible {
  display: block;
}

.detail-text-section {
  padding-top: 44px;
  padding-bottom: 44px;
}

.detail-article {
  max-width: 900px;
  margin: 0 auto;
  color: #374151;
}

.detail-article h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 28px;
}

.detail-article h2 + p {
  margin-top: 0;
}

.detail-article p {
  margin-bottom: 26px;
  font-size: 18px;
}

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

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 20px;
}

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

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

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

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

.site-footer a:hover {
  color: #ef4444;
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 22px 28px;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: 18px;
  color: #6b7280;
  background: #ffffff;
  text-align: center;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

  .hero-grid,
  .movie-grid,
  .wide-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-card-large {
    grid-column: span 2;
  }

  .detail-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

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

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

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

  .mobile-toggle {
    display: flex;
    margin-left: auto;
  }

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

  .mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
  }

  .nav-shell {
    height: 64px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-inner,
  .sub-hero > div,
  .detail-hero-inner,
  .content-section,
  .white-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-heading {
    text-align: left;
  }

  .hero-heading p,
  .sub-hero p,
  .detail-one-line {
    font-size: 17px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-grid,
  .movie-grid,
  .wide-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .slim-rank-list {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .hero-card-large {
    grid-column: auto;
    grid-row: auto;
    min-height: 230px;
  }

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

  .horizontal-row {
    grid-auto-columns: minmax(235px, 82vw);
  }

  .rank-link {
    grid-template-columns: 44px 82px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 13px;
  }

  .rank-thumb {
    height: 70px;
  }

  .rank-info p {
    display: none;
  }

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

  .category-collage {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .detail-poster {
    min-height: 390px;
  }

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

  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

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