:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --red-soft: #fef2f2;
  --orange: #f97316;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #f3d8d8;
  --surface: #ffffff;
  --surface-soft: #fff7f7;
  --shadow: 0 18px 45px rgba(153, 27, 27, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 42%, #ffffff 100%);
}

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

img {
  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);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 38, 38, 0.1);
  box-shadow: 0 10px 30px rgba(153, 27, 27, 0.08);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  background: linear-gradient(135deg, var(--red), #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
  color: #374151;
}

.nav-links a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: #f9fafb;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 8px 24px 22px;
  border-top: 1px solid #fee2e2;
  background: #ffffff;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 42%, #f97316 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(1px);
  animation: floatOrb 5s ease-in-out infinite alternate;
}

.hero-orb.one {
  width: 150px;
  height: 150px;
  top: 9%;
  left: 5%;
}

.hero-orb.two {
  width: 220px;
  height: 220px;
  right: 7%;
  top: 18%;
  animation-delay: 0.5s;
}

.hero-orb.three {
  width: 120px;
  height: 120px;
  left: 36%;
  bottom: 12%;
  animation-delay: 1s;
}

@keyframes floatOrb {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, -22px, 0) scale(1.08);
  }
}

.hero-slide {
  position: relative;
  display: none;
  min-height: 650px;
  padding: 72px 0 86px;
}

.hero-slide.is-active {
  display: block;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.28;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.04);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.92), rgba(220, 38, 38, 0.76), rgba(249, 115, 22, 0.82));
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: 48px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: clamp(18px, 2.2vw, 24px);
  color: #fee2e2;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.detail-meta span,
.movie-meta span {
  color: #7f1d1d;
  background: #fee2e2;
}

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

.btn-primary,
.btn-ghost,
.card-action,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  min-height: 50px;
  padding: 0 26px;
  color: var(--red);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(127, 29, 29, 0.2);
}

.btn-ghost {
  min-height: 50px;
  padding: 0 26px;
  color: #ffffff;
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-primary:hover,
.btn-ghost:hover,
.card-action:hover,
.search-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-feature {
  position: relative;
  padding: 16px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 70px rgba(127, 29, 29, 0.35);
  backdrop-filter: blur(18px);
}

.hero-feature img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
}

.hero-feature-card {
  position: absolute;
  right: -18px;
  bottom: 32px;
  width: min(260px, 82%);
  padding: 18px;
  border-radius: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(127, 29, 29, 0.18);
}

.hero-feature-card strong {
  display: block;
  margin-bottom: 6px;
  color: #991b1b;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

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

.section {
  padding: 70px 0;
}

.section.alt {
  background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.section-head p,
.page-hero p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 760px;
  margin-top: 28px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.home-search input,
.filter-panel input,
.filter-panel select,
.search-hero input {
  width: 100%;
  border: 1px solid #fee2e2;
  outline: none;
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
}

.home-search input {
  min-height: 50px;
  padding: 0 20px;
  border-color: transparent;
}

.search-button {
  min-height: 50px;
  padding: 0 24px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(135deg, var(--red), var(--orange));
  cursor: pointer;
}

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

.stat-card,
.category-card,
.info-card {
  padding: 24px;
  border: 1px solid #fee2e2;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 22px;
}

.stat-card p,
.category-card p,
.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid #fee2e2;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 26px 58px rgba(153, 27, 27, 0.18);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #fff7ed);
}

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

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

.movie-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(220, 38, 38, 0.92);
  backdrop-filter: blur(10px);
}

.movie-badge {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: rgba(17, 24, 39, 0.78);
}

.movie-content {
  padding: 18px;
}

.movie-content h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-content h3 a:hover {
  color: var(--red);
}

.movie-content p {
  min-height: 52px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 12px;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 700;
  background: #fff1f2;
}

.card-action {
  margin-top: 16px;
  min-height: 40px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(153, 27, 27, 0.16);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: #991b1b;
  font-size: 24px;
}

.category-card .mini-list {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.category-card .mini-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card .category-link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--red);
  font-weight: 800;
}

.page-hero,
.detail-hero,
.search-hero {
  padding: 58px 0 42px;
  background: radial-gradient(circle at 8% 10%, rgba(248, 113, 113, 0.18), transparent 30%), linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #991b1b;
  font-size: 14px;
  font-weight: 700;
}

.breadcrumbs a:hover {
  color: var(--red);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 220px) minmax(150px, 220px);
  gap: 14px;
  align-items: end;
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid #fee2e2;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.filter-panel input,
.filter-panel select,
.search-hero input {
  min-height: 46px;
  padding: 0 16px;
}

.empty-state {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 20px;
  color: #991b1b;
  background: #fee2e2;
  text-align: center;
  font-weight: 800;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 72px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #fee2e2;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.ranking-row img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #fee2e2;
}

.ranking-row h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.ranking-action {
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--red);
  font-weight: 800;
  background: #fee2e2;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

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

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: #ffffff;
  background: #111827;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}

.player-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.05));
}

.play-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  color: var(--red);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
}

.play-orb strong {
  display: block;
  margin-left: 5px;
  font-size: 42px;
  line-height: 1;
}

.player-title {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 24px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  text-align: left;
}

.player-title span {
  font-weight: 900;
  font-size: clamp(22px, 3vw, 34px);
}

.player-title em {
  min-width: max-content;
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff;
  font-style: normal;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.detail-card,
.sidebar-card {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid #fee2e2;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-card h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  color: #991b1b;
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
  font-size: 17px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid #fee2e2;
  background: #fee2e2;
  box-shadow: var(--shadow);
}

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

.info-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #fee2e2;
  color: var(--muted);
}

.info-list strong {
  color: var(--ink);
}

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

.search-hero form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 820px;
  margin-top: 24px;
}

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

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

.footer-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 42px;
  padding: 54px 0;
}

.footer-logo {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 24px;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(255, 255, 255, 0.07);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.55);
}

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

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

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

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

  .detail-poster {
    max-width: 360px;
  }
}

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

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

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

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

  .hero-slide {
    min-height: auto;
    padding: 54px 0 76px;
  }

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

  .hero-feature {
    max-width: 380px;
    margin: 0 auto;
  }

  .section-head {
    display: block;
  }

  .filter-panel,
  .search-hero form,
  .home-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .ranking-row {
    grid-template-columns: 54px 78px minmax(0, 1fr);
  }

  .ranking-action {
    grid-column: 2 / -1;
    width: max-content;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .movie-grid.compact,
  .search-results,
  .related-grid,
  .category-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 42px;
  }

  .player-title {
    display: block;
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .player-title em {
    display: inline-flex;
    margin-top: 10px;
  }

  .play-orb {
    width: 72px;
    height: 72px;
  }

  .play-orb strong {
    font-size: 32px;
  }
}
