* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: #f9fafb;
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-container {
  width: min(100% - 32px, 1280px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #dc2626;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #db2777);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.nav-link:hover,
.nav-link.active {
  color: #dc2626;
  background: #fee2e2;
}

.nav-toggle {
  display: none;
  border: 0;
  background: #f3f4f6;
  color: #111827;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.main-space {
  padding-top: 28px;
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.12));
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 56px;
  color: #fff;
}

.hero-kicker,
.movie-badge,
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 12px;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 24px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  color: #fff;
  background: #dc2626;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
  border: 0;
  cursor: pointer;
  transition: 0.2s ease;
}

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

.btn.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

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

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

.search-panel {
  margin: 28px 0 34px;
  padding: 22px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.search-title {
  margin-bottom: 14px;
  color: #111827;
  font-size: 20px;
  font-weight: 800;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(120px, 0.8fr));
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  color: #111827;
  background: #f9fafb;
  padding: 13px 14px;
  outline: none;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.section {
  margin: 46px 0;
}

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

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 8px 0 0;
  color: #6b7280;
  line-height: 1.7;
}

.text-link {
  color: #dc2626;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.15);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

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

.movie-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 10px;
  font-size: 12px;
  padding: 6px 9px;
}

.rank-number {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  border-radius: 50%;
  font-size: 14px;
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.34);
}

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

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

.movie-card h3 a:hover {
  color: #dc2626;
}

.movie-line {
  margin: 0 0 10px;
  min-height: 42px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span {
  padding: 4px 8px;
  background: #f3f4f6;
  border-radius: 999px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  color: #991b1b;
  background: #fee2e2;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.gradient-section {
  padding: 30px;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(135deg, #2563eb, #9333ea);
  box-shadow: 0 22px 50px rgba(37, 99, 235, 0.22);
}

.gradient-section.pink {
  background: linear-gradient(135deg, #db2777, #dc2626);
}

.gradient-section .section-title,
.gradient-section .section-desc,
.gradient-section .text-link {
  color: #fff;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  padding: 22px;
  color: #fff;
  border-radius: 22px;
  background: linear-gradient(135deg, #dc2626, #db2777);
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.22);
  transition: transform 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #111827, #374151);
}

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

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

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.category-card strong {
  margin-top: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 74px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.rank-item .rank-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #dc2626;
  border-radius: 50%;
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

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

.rank-item p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
}

.page-hero {
  padding: 42px;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(135deg, #dc2626, #db2777);
  box-shadow: 0 22px 50px rgba(220, 38, 38, 0.22);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #dc2626;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.player-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.14), rgba(0, 0, 0, 0.74));
}

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

.play-button {
  position: relative;
  z-index: 3;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #dc2626;
  font-size: 34px;
  box-shadow: 0 22px 48px rgba(220, 38, 38, 0.42);
  cursor: pointer;
}

.detail-card,
.sidebar-card {
  padding: 24px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.detail-card {
  margin-top: 22px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.detail-card h2,
.sidebar-card h2 {
  margin: 24px 0 12px;
  font-size: 22px;
}

.detail-intro,
.detail-card p {
  color: #374151;
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.detail-meta span {
  padding: 7px 11px;
  color: #374151;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-card {
  position: sticky;
  top: 92px;
}

.side-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.side-link:last-child {
  border-bottom: 0;
}

.side-link img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.4;
}

.side-link span {
  color: #6b7280;
  font-size: 13px;
}

.empty-message {
  display: none;
  padding: 28px;
  color: #6b7280;
  text-align: center;
  background: #fff;
  border-radius: 18px;
}

.empty-message.is-visible {
  display: block;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr;
  gap: 32px;
  padding: 44px 0;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

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

.footer-links a {
  color: #9ca3af;
}

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

.copyright {
  padding: 18px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid #1f2937;
}

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

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

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

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  }

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

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

  .hero-carousel {
    height: 520px;
    border-radius: 20px;
  }

  .hero-content {
    padding: 34px 24px 56px;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero {
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .site-container {
    width: min(100% - 22px, 1280px);
  }

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

  .hero-carousel {
    height: 500px;
  }

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

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

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

  .rank-item img {
    width: 60px;
    height: 82px;
  }
}
