:root {
  --page: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #fff5f5;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #dc2626;
  --brand-dark: #991b1b;
  --brand-soft: #fee2e2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  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%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.26);
}

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

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

.main-nav a {
  padding: 10px 14px;
  color: #4b5563;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 0;
  border-radius: 14px;
}

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

.hero-slider {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 610px;
  margin: 28px auto 48px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 52px;
  padding: 74px;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(239, 68, 68, 0.5), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.76) 44%, rgba(17, 24, 39, 0.28));
}

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

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(254, 202, 202, 0.35);
  border-radius: 999px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 660px;
  color: #e5e7eb;
  font-size: 18px;
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.35);
}

.btn-light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-line {
  color: var(--brand);
  background: #ffffff;
  border-color: #fecaca;
}

.hero-poster {
  justify-self: end;
  width: 310px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  backdrop-filter: blur(16px);
}

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

.hero-dots {
  position: absolute;
  left: 74px;
  bottom: 36px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

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

.search-panel {
  position: relative;
  z-index: 3;
  max-width: 560px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.search-panel input,
.search-bar input {
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
}

.search-panel input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.search-panel button,
.search-bar button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--brand);
  border: 0;
  border-radius: 999px;
}

.section {
  margin: 54px 0;
}

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

.section-title small {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-weight: 800;
}

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.year-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  background: rgba(220, 38, 38, 0.92);
  border-radius: 999px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

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

.card-body p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.info-pill {
  display: inline-flex;
  padding: 5px 9px;
  color: #7f1d1d;
  background: #fee2e2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  min-height: 132px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  border: 1px solid #ffe4e6;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.06);
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 66px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  border-radius: 16px;
}

.rank-item img {
  width: 86px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

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

.page-title {
  padding: 54px 0 28px;
}

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

.filter-panel,
.search-card {
  margin-bottom: 26px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-row a,
.filter-row button {
  padding: 8px 14px;
  color: #4b5563;
  background: #f3f4f6;
  border: 0;
  border-radius: 999px;
}

.filter-row a.active,
.filter-row button.active {
  color: #ffffff;
  background: var(--brand);
}

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

.player-card,
.detail-card,
.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.player-card {
  overflow: hidden;
}

.video-box {
  position: relative;
  background: #020617;
}

.video-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-trigger {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 54px;
  padding: 0 22px;
  color: #ffffff;
  font-weight: 800;
  background: rgba(220, 38, 38, 0.94);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.35);
  transform: translate(-50%, -50%);
}

.play-trigger.is-hidden {
  display: none;
}

.player-status {
  padding: 12px 18px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid #111827;
}

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

.detail-card h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-card p {
  color: #374151;
  font-size: 17px;
}

.side-card {
  padding: 16px;
}

.side-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

.related-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.related-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f9fafb;
  border-radius: 18px;
}

.related-card img {
  grid-row: span 2;
  width: 72px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.related-card span {
  align-self: end;
  font-weight: 800;
}

.related-card small {
  align-self: start;
  color: var(--muted);
}

.search-bar {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #f3f4f6;
  border-radius: 999px;
}

.search-count {
  margin-top: 12px;
  color: var(--muted);
}

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

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

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

.footer-brand p {
  color: #9ca3af;
}

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

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

@media (max-width: 980px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: 680px;
    padding: 42px 28px 90px;
  }

  .hero-poster {
    justify-self: start;
    width: 220px;
  }

  .hero-dots {
    left: 28px;
  }

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

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

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

@media (max-width: 640px) {
  .header-inner,
  .page-main,
  .footer-inner {
    width: min(100% - 24px, 1200px);
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-slider {
    width: min(100% - 24px, 1280px);
    min-height: 720px;
    margin-top: 16px;
    border-radius: 26px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .search-panel,
  .search-bar {
    align-items: stretch;
    flex-direction: column;
    border-radius: 22px;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .rank-item {
    grid-template-columns: 44px 68px minmax(0, 1fr);
  }

  .rank-num {
    width: 38px;
    height: 38px;
  }

  .rank-item img {
    width: 68px;
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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