:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --gold: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #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(--ink);
  background: linear-gradient(180deg, #fff 0%, #fff7f7 48%, #f8fafc 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 38, 38, 0.12);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
  font-size: 14px;
}

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

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

.nav-link:hover,
.nav-link.is-active {
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  padding: 8px 14px;
  border-radius: 999px;
}

.hero-slider,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 15% 15%, rgba(220, 38, 38, 0.34), transparent 30%), linear-gradient(135deg, #111827 0%, #1f2937 52%, #111827 100%);
}

.hero-slider {
  min-height: 650px;
  padding: 54px 0 44px;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(56px);
  opacity: 0.32;
  pointer-events: none;
}

.hero-glow-red {
  width: 280px;
  height: 280px;
  right: 10%;
  top: 10%;
  background: var(--red);
}

.hero-glow-gold {
  width: 360px;
  height: 360px;
  left: 4%;
  bottom: 2%;
  background: var(--gold);
}

.hero-shell {
  position: relative;
  z-index: 2;
}

.hero-title-block {
  max-width: 760px;
  margin-bottom: 28px;
}

.hero-title-block h1,
.page-hero h1,
.detail-side h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-title-block p,
.page-hero p {
  margin: 14px 0 0;
  max-width: 760px;
  color: #d1d5db;
  font-size: 18px;
}

.hero-stage {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 46px;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(36px, 5.6vw, 68px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  color: #fff7ed;
  background: rgba(220, 38, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.22);
  font-size: 14px;
  font-weight: 800;
}

.hero-meta,
.detail-meta,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

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

.btn,
.home-search button,
.search-page-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.home-search button:hover,
.search-page-form button:hover {
  transform: translateY(-2px);
}

.btn-primary,
.home-search button,
.search-page-form button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
}

.btn-soft {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster::after,
.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.76));
  pointer-events: none;
}

.hero-poster img,
.poster-wrap img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1f2937, #7f1d1d);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-prev {
  left: -12px;
}

.hero-next {
  right: -12px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--gold);
}

.search-band {
  padding: 28px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.search-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 24px;
  align-items: center;
}

.search-band h2,
.section-heading h2,
.category-overview-card h2,
.article-card h2,
.site-footer h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
}

.search-band p,
.section-heading p,
.category-overview-card p,
.article-card p,
.site-footer p,
.movie-card-body p {
  margin: 8px 0 0;
  color: var(--muted);
}

.home-search,
.search-page-form,
.filter-bar {
  display: flex;
  gap: 10px;
}

.home-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
}

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

.category-strip {
  padding: 26px 0 8px;
}

.category-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.category-strip a {
  padding: 10px 16px;
  color: #374151;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  font-weight: 750;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.category-strip a:hover {
  color: #fff;
  background: var(--red);
  transform: translateY(-2px);
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

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

.section-link {
  flex: none;
  color: var(--red);
  font-weight: 800;
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card-link:hover {
  border-color: rgba(220, 38, 38, 0.25);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.play-badge,
.card-rank {
  position: absolute;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 999px;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-rank {
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 30px;
  padding: 0 9px;
  background: linear-gradient(135deg, var(--gold), #ef4444);
  font-weight: 900;
}

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

.movie-meta-line {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
}

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

.movie-card-body p {
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.movie-tags span {
  padding: 4px 8px;
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.movie-card-compact .movie-card-body h3 {
  font-size: 16px;
}

.page-hero {
  padding: 58px 0 52px;
}

.compact-hero {
  min-height: 270px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #d1d5db;
  font-size: 14px;
}

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

.categories-overview {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.category-overview-head {
  justify-content: space-between;
  margin-bottom: 20px;
}

.filter-bar {
  flex-wrap: wrap;
  padding: 18px;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.filter-bar input {
  flex: 1 1 260px;
}

.filter-bar select {
  flex: 0 1 170px;
}

.detail-hero {
  padding: 34px 0 52px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.78fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-radius: 28px;
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.42);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.2), rgba(0, 0, 0, 0.42));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.35);
  font-size: 28px;
}

.detail-side {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  backdrop-filter: blur(20px);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.26);
}

.detail-side-content {
  min-width: 0;
}

.detail-side h1 {
  margin-top: 14px;
  font-size: clamp(28px, 3.6vw, 46px);
}

.detail-side p {
  margin: 14px 0 0;
  color: #d1d5db;
}

.detail-meta {
  margin-top: 16px;
}

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

.detail-text-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.article-card {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.article-card p {
  color: #374151;
  font-size: 16px;
}

.search-results-section {
  min-height: 420px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.7fr) minmax(180px, 0.5fr);
  gap: 34px;
  padding: 44px 0 30px;
}

.site-footer h2 {
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  max-width: 440px;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

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

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

@media (max-width: 980px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-slide,
  .detail-layout,
  .detail-text-grid,
  .search-band-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 760px;
  }

  .hero-poster {
    max-width: 360px;
    margin: 0 auto;
  }

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

  .detail-side {
    grid-template-columns: 120px 1fr;
  }
}

@media (max-width: 700px) {
  .container,
  .content-section {
    width: min(100% - 24px, 1180px);
  }

  .hero-slider {
    min-height: auto;
    padding-top: 36px;
  }

  .hero-stage {
    min-height: 660px;
  }

  .hero-slide {
    gap: 26px;
  }

  .hero-copy p,
  .hero-title-block p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-arrow {
    top: auto;
    bottom: 10px;
    transform: none;
  }

  .hero-prev {
    left: calc(50% - 54px);
  }

  .hero-next {
    right: calc(50% - 54px);
  }

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

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-search,
  .search-page-form {
    flex-direction: column;
  }

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

  .detail-poster {
    width: 180px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .small-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 610px;
  }

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