:root {
  --page: #f7f7f8;
  --panel: #ffffff;
  --panel-soft: #fff8f6;
  --text: #151515;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --primary-soft: #fee2e2;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.10);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(254, 226, 226, 0.75), transparent 32rem), var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #111827;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.24);
}

.logo-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

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

.site-search-form input,
.filter-panel input,
.filter-panel select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  outline: none;
  padding: 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.site-search-form button,
.primary-button,
.secondary-button,
.mobile-toggle,
.hero-dot,
.player-cover button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.site-search-form button,
.primary-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-search-form button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(220, 38, 38, 0.30);
}

.secondary-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #ffffff;
  border: 1px solid rgba(220, 38, 38, 0.18);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: 14px;
  background: #fff1f2;
  color: var(--primary);
  font-size: 22px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

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

.hero {
  position: relative;
  margin: 28px auto 42px;
  border-radius: 34px;
  overflow: hidden;
  min-height: 590px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 34px;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: blur(18px) saturate(1.16);
  opacity: 0.28;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.72) 48%, rgba(127, 29, 29, 0.46));
}

.hero-copy,
.hero-poster-wrap {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  max-width: 760px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: #ffffff;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #f3f4f6;
  font-size: 18px;
  line-height: 1.82;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.hero-tags {
  margin: 0 0 28px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

.movie-tags span,
.detail-tags span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.hero-poster-wrap {
  align-self: center;
}

.hero-poster {
  width: min(330px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  background: linear-gradient(135deg, #fee2e2, #ffffff);
}

.hero-poster img {
  width: 100%;
  height: 100%;
}

.hero-controls {
  position: absolute;
  left: 64px;
  bottom: 34px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  padding: 0;
}

.hero-dot.is-active {
  background: #ffffff;
}

.section-block,
.detail-block,
.category-card,
.search-card {
  margin-bottom: 34px;
  padding: 30px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 48px rgba(15, 23, 42, 0.07);
  border: 1px solid rgba(229, 231, 235, 0.85);
}

.section-heading,
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading h2,
.page-heading h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.13);
  border-color: rgba(220, 38, 38, 0.26);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #f9fafb);
}

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

.movie-card:hover .movie-cover img,
.compact-card:hover img,
.rank-item:hover .rank-poster img {
  transform: scale(1.06);
}

.movie-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.play-dot {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

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

.movie-card-meta,
.card-meta-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.category-card {
  display: block;
  min-height: 188px;
  margin: 0;
  background: linear-gradient(145deg, #ffffff, #fff7f7);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(220, 38, 38, 0.12);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

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

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

.compact-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 20px;
  background: #111827;
}

.compact-card img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  opacity: 0.78;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.compact-card:hover img {
  opacity: 0.58;
}

.compact-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.86);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-size: 18px;
  font-weight: 900;
}

.rank-poster {
  display: block;
  width: 82px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--primary-soft);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.rank-meta span {
  color: #7f1d1d;
  background: #fee2e2;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 0.45fr));
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 18px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a {
  color: var(--primary);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  background: var(--primary-soft);
  box-shadow: var(--shadow);
}

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

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

.detail-copy .summary {
  color: #374151;
  font-size: 17px;
  line-height: 1.85;
}

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

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: #fff7f7;
  color: #374151;
}

.detail-meta strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-dark);
  font-size: 13px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #030712;
  box-shadow: 0 28px 70px rgba(3, 7, 18, 0.22);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.12), rgba(3, 7, 18, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover button {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-size: 30px;
  box-shadow: 0 20px 60px rgba(220, 38, 38, 0.36);
}

.text-content {
  color: #374151;
  font-size: 16px;
  line-height: 1.95;
}

.text-content h2 {
  margin-top: 0;
  color: #111827;
}

.search-results {
  display: grid;
  gap: 16px;
}

.search-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  padding: 16px;
}

.search-card img {
  width: 96px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
}

.search-card h3 {
  margin: 0 0 8px;
}

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

.site-footer {
  margin-top: 46px;
  background: #111827;
  color: #f9fafb;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  margin: 12px 0 0;
  max-width: 540px;
  color: #d1d5db;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-links a {
  color: #f3f4f6;
  font-weight: 700;
}

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

@media (max-width: 1060px) {
  .desktop-nav,
  .header-inner > .site-search-form {
    display: none;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

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

  .mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    margin-top: 12px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 42px;
  }

  .hero-poster-wrap {
    display: none;
  }

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

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

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 68px;
  }

  .logo-text {
    font-size: 19px;
  }

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

  .hero-slide {
    padding: 30px 24px;
  }

  .hero-controls {
    left: 24px;
  }

  .section-heading,
  .page-heading,
  .footer-inner {
    display: block;
  }

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

  .category-grid,
  .compact-row,
  .rank-list,
  .filter-panel,
  .detail-hero,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 46px 70px minmax(0, 1fr);
  }

  .rank-number {
    width: 42px;
    height: 42px;
    font-size: 15px;
  }

  .rank-poster {
    width: 70px;
  }

  .detail-cover {
    max-width: 260px;
  }

  .section-block,
  .detail-block,
  .category-card {
    padding: 22px;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 22px;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

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

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