*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --rose: #e11d48;
  --red: #dc2626;
  --pink: #be185d;
  --amber: #f59e0b;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  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(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--red), var(--rose), var(--pink));
  box-shadow: 0 10px 30px rgba(190, 24, 93, 0.25);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.01em;
}

.brand-text small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  position: relative;
  padding: 8px 0;
  transition: color 180ms ease;
}

.nav-link::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  content: "";
  transform: scaleX(0);
  background: #ffe4e6;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
}

.hero {
  position: relative;
  min-height: 680px;
  color: #ffffff;
  overflow: hidden;
  background: #19050c;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 700ms ease, transform 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 75% 30%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(136, 19, 55, 0.74) 52%, rgba(17, 24, 39, 0.38)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.06));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  gap: 40px;
  min-height: 680px;
  align-items: center;
  padding: 80px 0 110px;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffe4e6;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--rose);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

.hero-panel {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(20px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.hero-panel h2 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.hero-panel p {
  font-size: 15px;
}

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

.hero-dot {
  width: 32px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

.search-strip {
  position: relative;
  z-index: 20;
  margin-top: -52px;
}

.search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-card input,
.search-card select,
.filter-card input,
.filter-card select {
  width: 100%;
  min-height: 50px;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-card input:focus,
.search-card select:focus,
.filter-card input:focus,
.filter-card select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.10);
}

.section {
  padding: 70px 0;
}

.section.compact {
  padding: 42px 0;
}

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

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.view-more {
  color: var(--rose);
  font-weight: 800;
}

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #881337, #111827);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 320ms ease;
}

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

.poster-badge,
.play-mark {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: rgba(225, 29, 72, 0.88);
}

.play-mark {
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  background: rgba(17, 24, 39, 0.70);
}

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

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 3em;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-line {
  display: -webkit-box;
  min-height: 3em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row span {
  color: #6b7280;
  font-size: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff1f2;
  color: #be123c;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 190px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.28), transparent 26%),
    linear-gradient(135deg, var(--red), var(--rose), var(--pink));
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.category-card span {
  display: inline-flex;
  margin-top: 26px;
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.20), transparent 28%),
    linear-gradient(135deg, var(--red), var(--rose), var(--pink));
}

.page-hero .container {
  padding: 76px 0 82px;
}

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

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

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.filter-card {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(130px, 0.34fr));
  gap: 14px;
  padding: 18px;
  margin-bottom: 30px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.4fr);
  gap: 28px;
}

.ranking-list {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 64px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row:hover {
  background: #fff1f2;
}

.ranking-number {
  color: var(--rose);
  font-size: 22px;
  font-weight: 900;
}

.ranking-row img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-title strong,
.ranking-title small {
  display: block;
}

.ranking-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-title small {
  color: var(--muted);
  font-size: 13px;
}

.ranking-arrow {
  color: var(--rose);
  font-size: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 32px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #881337, #111827);
  box-shadow: var(--shadow);
}

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

.detail-info-card,
.content-card,
.player-card {
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-info-card {
  padding: 28px;
}

.detail-info-card h2,
.content-card h2,
.player-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.info-table {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.info-table div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
}

.info-table dt {
  color: var(--muted);
}

.info-table dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.player-card {
  padding: 24px;
  background: #0f172a;
  color: #ffffff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.28), rgba(0, 0, 0, 0.38));
  transition: opacity 180ms ease, pointer-events 180ms ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-button {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--rose);
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.player-status {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.content-card {
  padding: 28px;
  margin-top: 26px;
}

.content-card p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 16px;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.search-results {
  min-height: 320px;
}

.empty-state {
  padding: 54px 20px;
  border-radius: 24px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, 0.7fr);
  gap: 40px;
  padding: 52px 0;
}

.footer-brand {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

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

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #9ca3af;
  transition: color 160ms ease;
}

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

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

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

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

  .hero-content,
  .detail-layout,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 420px;
  }

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 18px;
    background: #991b1b;
  }

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

  .nav-link {
    padding: 12px 0;
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    padding: 54px 0 100px;
  }

  .hero-panel {
    display: none;
  }

  .search-card,
  .filter-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 46px 0;
  }

  .section-head {
    display: block;
  }

  .view-more {
    display: inline-flex;
    margin-top: 10px;
  }

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

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

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

  .ranking-row {
    grid-template-columns: 44px 54px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 12px;
  }

  .ranking-row img {
    width: 54px;
    height: 72px;
  }
}

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

  .brand-text small {
    display: none;
  }
}
