:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #ea580c;
  --yellow: #f59e0b;
  --black: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --panel: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-size: 22px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.22);
}

.brand-name {
  font-size: 25px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 650;
  color: #374151;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-grid a:hover {
  color: var(--red);
}

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

.top-search input,
.filter-row input,
.filter-row select {
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  background: #fff;
  color: #111827;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.top-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.top-search button,
.btn-primary,
.btn-ghost,
.search-submit {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.top-search button,
.btn-primary,
.search-submit {
  color: #fff;
  background: var(--red);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.22);
}

.top-search button {
  height: 42px;
  padding: 0 18px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
}

.btn-primary:hover,
.top-search button:hover,
.search-submit:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 22px 20px;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: #374151;
  font-weight: 700;
}

.hero-section {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(180deg, #111827, #1f2937);
}

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

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

.hero-bg {
  position: absolute;
  inset: -16px;
  background-image: var(--hero-bg);
  background-position: center;
  background-size: cover;
  filter: blur(8px) brightness(0.32);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 76% 45%, rgba(234, 88, 12, 0.22), transparent 34%), linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.25));
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 54px;
  align-items: center;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(254, 215, 170, 0.28);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.card-meta,
.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span,
.list-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f9fafb;
  font-size: 14px;
  font-weight: 750;
}

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

.hero-cover {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  transform: perspective(900px) rotateY(-7deg);
}

.hero-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s;
}

.hero-cover:hover img {
  transform: scale(1.05);
}

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

.hero-dots button {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

.section,
.page-section {
  padding: 70px 0;
}

.section:nth-child(even) {
  background: linear-gradient(180deg, #f9fafb, #fff);
}

.red-soft {
  background: #fff1f2;
}

.dark-section {
  background: #111827;
  color: #fff;
}

.container,
.footer-grid,
.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.dark-section .section-heading p,
.dark-section .card-meta,
.dark-section .card-desc {
  color: #d1d5db;
}

.section-link {
  color: var(--red);
  font-weight: 850;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  transition: transform 0.28s, box-shadow 0.28s;
}

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

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.card-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.42s;
}

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

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  font-size: 17px;
  line-height: 1.35;
  color: #111827;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 40px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row em,
.category-pill,
.detail-tags span {
  display: inline-flex;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.tag-row em {
  padding: 4px 8px;
}

.score,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

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

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.compact-card .card-body strong {
  min-height: auto;
  font-size: 15px;
}

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

.category-pill {
  justify-content: center;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  font-size: 16px;
}

.category-pill:hover {
  color: #fff;
  background: var(--red);
}

.page-hero {
  padding: 78px 0 54px;
  background: radial-gradient(circle at 75% 25%, rgba(234, 88, 12, 0.18), transparent 28%), linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
}

.page-title {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-title p {
  max-width: 760px;
  color: #d1d5db;
  font-size: 18px;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel h2 {
  margin: 0 0 16px;
}

.filter-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
}

.empty-state {
  display: none;
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 700;
}

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

.ranking-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item a {
  display: grid;
  grid-template-columns: 68px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ranking-item a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-number {
  color: var(--red);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.ranking-thumb {
  overflow: hidden;
  border-radius: 12px;
}

.ranking-thumb img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.ranking-copy h2,
.ranking-copy h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.ranking-score {
  color: var(--yellow);
  font-size: 24px;
  font-weight: 950;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 34px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.42));
  transition: opacity 0.22s, visibility 0.22s;
}

.play-layer span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red);
  font-size: 34px;
  box-shadow: 0 20px 45px rgba(220, 38, 38, 0.35);
}

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

.detail-title {
  margin: 26px 0 22px;
}

.detail-title h1 {
  margin-bottom: 14px;
}

.detail-meta span {
  background: #f3f4f6;
  color: #374151;
}

.detail-copy {
  display: grid;
  gap: 18px;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.detail-copy h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
}

.detail-copy p {
  margin: 0;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.detail-tags span {
  padding: 8px 12px;
}

.sidebar-card {
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-link {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 68px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.side-link strong {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 5px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.breadcrumbs {
  margin: 0 0 22px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--red);
  font-weight: 800;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-grid p,
.footer-grid a {
  color: #9ca3af;
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-grid h3 {
  margin: 0 0 12px;
}

.footer-bottom {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero-section {
    height: auto;
    min-height: 690px;
  }

  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
    padding: 70px 0 84px;
  }

  .hero-cover {
    max-width: 280px;
    transform: none;
  }

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

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

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

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 20px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 40px;
  }

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

  .section,
  .page-section {
    padding: 46px 0;
  }

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

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

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

  .ranking-item a {
    grid-template-columns: 48px 72px 1fr;
  }

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

.category-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s, box-shadow 0.24s;
}

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

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

.category-card-images img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.category-card strong {
  font-size: 22px;
}

.category-card span:last-child {
  color: var(--muted);
  line-height: 1.6;
}
