:root {
  --rose: #f43f5e;
  --pink: #ec4899;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff1f2;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dark);
  background: linear-gradient(180deg, #fff7f8 0%, #ffffff 34%, #f9fafb 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.82);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 12px 26px rgba(244, 63, 94, 0.32);
}

.brand-name {
  font-size: 22px;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--rose), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #374151;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--rose);
  background: #fff1f2;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: #fff1f2;
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--rose);
}

.mobile-panel {
  display: none;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-link {
  display: flex;
  padding: 12px 14px;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 60px;
  width: 100%;
  padding: 128px max(24px, calc((100vw - 1180px) / 2)) 92px;
  color: #ffffff;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

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

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 72% 30%, rgba(244, 63, 94, 0.32), transparent 32%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.72));
}

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

.hero-content {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #fecdd3;
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-content p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

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

.primary-button,
.ghost-button,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 16px 30px rgba(244, 63, 94, 0.34);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  width: 320px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
}

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

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

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

.page-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 104px 24px 48px;
}

.page-hero,
.search-panel,
.content-section,
.rank-panel,
.story-card,
.player-section {
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 44px;
  margin-bottom: 30px;
  background:
    radial-gradient(circle at 84% 16%, rgba(244, 63, 94, 0.16), transparent 28%),
    linear-gradient(135deg, #ffffff, #fff1f2);
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

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

.home-search {
  max-width: 1180px;
  margin: -52px auto 34px;
  position: relative;
  z-index: 5;
}

.search-panel {
  padding: 28px;
}

.search-panel h2 {
  margin: 8px 0 18px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.inline-results,
.search-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.search-hit {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.search-hit h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

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

.content-section {
  max-width: 1180px;
  margin: 34px auto;
  padding: 28px;
}

.content-section.no-margin {
  margin: 0;
}

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

.section-head h2,
.rank-panel h2 {
  margin: 8px 0 0;
  font-size: 30px;
  letter-spacing: -0.05em;
}

.section-head a {
  color: var(--rose);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(244, 63, 94, 0.32);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
}

.poster-link,
.mini-card {
  position: relative;
  display: block;
}

.poster-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.6), transparent 30%),
    linear-gradient(135deg, #fb7185, #be185d 50%, #111827);
}

.movie-card .poster-frame {
  border-radius: 0;
}

.poster-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.poster-frame.is-missing img {
  opacity: 0;
}

.poster-frame.is-missing .poster-fallback,
.poster-frame:not(.is-missing) .poster-fallback {
  position: relative;
  z-index: 1;
}

.poster-fallback {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.08em;
  background: rgba(17, 24, 39, 0.16);
  backdrop-filter: blur(8px);
}

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

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 7px 12px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.92);
  box-shadow: 0 10px 22px rgba(244, 63, 94, 0.32);
  font-size: 13px;
  font-weight: 800;
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.04em;
}

.movie-card h2 a:hover {
  color: var(--rose);
}

.movie-card p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-list span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 8px;
  color: #be123c;
  border-radius: 999px;
  background: #ffe4e6;
  font-size: 12px;
  font-weight: 700;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  max-width: 1180px;
  margin: 34px auto;
}

.rank-panel {
  padding: 28px;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #fff1f2;
  transform: translateX(4px);
}

.rank-number,
.ranking-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-info {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
}

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

.category-tile {
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 18%, rgba(244, 63, 94, 0.13), transparent 28%),
    #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.28);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}

.category-tile span {
  display: block;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-pill {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #374151;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.filter-pill.is-active,
.filter-pill:hover {
  color: #ffffff;
  border-color: var(--rose);
  background: linear-gradient(135deg, var(--rose), var(--pink));
}

.page-list {
  margin-top: 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}

.pagination a {
  min-width: 42px;
  padding: 10px 14px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  font-weight: 800;
}

.pagination a:hover,
.pagination a.is-current {
  color: #ffffff;
  border-color: var(--rose);
  background: var(--rose);
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, border 0.2s ease;
}

.ranking-card:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 63, 94, 0.32);
}

.ranking-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-card p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.7;
}

.ranking-card em {
  color: var(--rose);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

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

.breadcrumb a:hover {
  color: var(--rose);
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  overflow: hidden;
  min-height: 390px;
  padding: 34px;
  border-radius: 30px;
  color: #ffffff;
  background: #111827;
  box-shadow: var(--shadow);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
}

.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 72% 22%, rgba(244, 63, 94, 0.28), transparent 30%);
}

.detail-poster,
.detail-info {
  position: relative;
  z-index: 1;
}

.detail-poster .poster-frame {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin: 14px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.detail-info p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

.player-section {
  margin: 28px 0;
  padding: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #05070d;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #05070d;
}

.player-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.52));
  cursor: pointer;
}

.player-play span {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 18px 46px rgba(244, 63, 94, 0.42);
  clip-path: polygon(34% 25%, 34% 75%, 76% 50%);
}

.player-shell.is-playing .player-play {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
  gap: 22px;
}

.story-card {
  padding: 26px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.story-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.facts-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.facts-card dt {
  color: var(--muted);
  font-weight: 800;
}

.facts-card dd {
  margin: 0;
  color: #111827;
}

.related-section {
  margin-left: 0;
  margin-right: 0;
}

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

.mini-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, border 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.3);
}

.mini-card span,
.mini-card em {
  display: block;
}

.mini-card span {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.mini-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f3f4f6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px;
}

.footer-brand p {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--rose);
}

@media (max-width: 1024px) {
  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 34px;
  }

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

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

  .menu-button {
    display: block;
  }

  .mobile-panel.is-open {
    display: grid;
  }

  .hero-carousel {
    min-height: 820px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 112px 24px 78px;
  }

  .hero-poster {
    width: min(280px, 70vw);
  }

  .home-search {
    margin: -36px 16px 24px;
  }

  .search-form {
    flex-direction: column;
  }

  .content-section,
  .rank-panel,
  .page-hero,
  .search-panel {
    padding: 22px;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

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

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

@media (max-width: 520px) {
  .nav-wrap {
    padding: 0 16px;
  }

  .page-main {
    padding: 92px 16px 36px;
  }

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

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

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

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

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