:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --rose: #e11d48;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7f7;
  --paper: #ffffff;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #fff5f5 48%, #ffffff 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #dc2626, #b91c1c, #e11d48);
  color: #fff;
  box-shadow: 0 12px 35px rgba(153, 27, 27, 0.32);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  color: var(--red);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

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

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.quick-cats {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  overflow-x: auto;
  white-space: nowrap;
  text-align: center;
}

.quick-cats a {
  display: inline-flex;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.quick-cats a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

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

.hero {
  position: relative;
  min-height: 560px;
  margin: 24px auto 40px;
  border-radius: 30px;
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 34px;
  padding: clamp(26px, 5vw, 58px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 10%, rgba(248, 113, 113, 0.32), transparent 32%), linear-gradient(110deg, rgba(17, 24, 39, 0.92) 0%, rgba(127, 29, 29, 0.86) 48%, rgba(17, 24, 39, 0.72) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  width: max-content;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  color: #fecaca;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 700px;
  color: #fee2e2;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-top: 28px;
}

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

.btn-primary {
  color: var(--red-dark);
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

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

.btn-soft {
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--rose));
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.24);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover {
  transform: translateY(-2px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.hero-tags span,
.meta-line span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #fee2e2;
  background: rgba(255, 255, 255, 0.13);
}

.hero-poster {
  align-self: center;
  justify-self: end;
  width: min(380px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: clamp(24px, 5vw, 58px);
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 9px;
}

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

.hero-dot.active {
  width: 30px;
  background: #fff;
}

.section {
  margin: 42px 0;
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: var(--red);
  font-weight: 800;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 10px 32px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #f3f4f6;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.score {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.play-dot {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.movie-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.movie-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
}

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

.meta-line,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-line span,
.tag-list span {
  color: #b91c1c;
  background: #fee2e2;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--rose));
  font-weight: 900;
}

.rank-thumb {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-score {
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

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

.category-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #e11d48 58%, #7f1d1d);
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.22);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 10px 0 0;
  color: #fee2e2;
  font-size: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px 150px;
  gap: 12px;
  margin: 18px 0 24px;
  padding: 14px;
  border: 1px solid #fee2e2;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

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

.movie-detail {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 26px;
  align-items: start;
  margin: 28px 0 42px;
}

.player-card,
.detail-card,
.related-card {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.56));
  z-index: 3;
}

.play-overlay.hidden {
  display: none;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--rose));
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35);
  font-size: 30px;
}

.player-info,
.detail-content,
.related-content {
  padding: 22px;
}

.player-info h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.player-info p,
.detail-content p,
.related-content p {
  color: var(--muted);
}

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

.detail-content h2,
.related-content h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--red);
  font-weight: 700;
}

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

.empty-tip {
  display: none;
  margin: 24px 0;
  padding: 18px;
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
}

.empty-tip.show {
  display: block;
}

.site-footer {
  margin-top: 70px;
  padding: 42px 0;
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  color: #fff;
  font-size: 22px;
}

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

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

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: #991b1b;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 72vw);
    transform: none;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 62px 1fr;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  main,
  .nav-wrap,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    border-radius: 22px;
    min-height: 720px;
  }

  .hero-slide {
    padding: 22px;
  }

  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }
}
