:root {
  --rose: #f43f5e;
  --pink: #ec4899;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff1f2;
  --line: #f3f4f6;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

body {
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(244, 63, 94, 0.1);
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.32);
}

.brand-text,
.footer-brand {
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--rose), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link,
.footer-links a {
  color: #4b5563;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active,
.footer-links a:hover {
  color: var(--rose);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid #fecdd3;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--rose);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff1f2;
}

.mobile-nav.open {
  display: grid;
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-backdrop::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.22), transparent 24%), linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.48));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 76vh;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 64px;
  padding: 72px 0 96px;
  color: #fff;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin: 18px 0 22px;
}

.hero-copy p,
.page-hero p,
.detail-one {
  max-width: 720px;
  font-size: 1.1rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.82);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(244, 63, 94, 0.78);
  box-shadow: 0 12px 30px rgba(244, 63, 94, 0.28);
  font-weight: 800;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

.movie-card .tag-row span,
.detail-article .tag-row span {
  background: #fff1f2;
  color: #be123c;
}

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

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

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

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

.section-action {
  color: var(--rose);
  background: #fff1f2;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.site-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  height: min(58vh, 520px);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: inherit;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-band {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.search-panel {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px;
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px);
  gap: 24px;
  align-items: center;
}

.search-panel h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.search-panel p,
.section-heading p,
.category-block-head p,
.movie-desc,
.movie-meta,
.detail-article p,
.site-footer p {
  color: var(--muted);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  background: #fff;
}

.site-search input {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0 14px;
  outline: none;
}

.page-section {
  width: min(1240px, calc(100% - 32px));
  margin: 86px auto;
}

.wide-section {
  width: min(1440px, 100%);
  padding-left: max(16px, calc((100% - 1240px) / 2));
}

.no-top {
  margin-top: 32px;
}

.section-heading,
.category-block-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2,
.category-block-head h2,
.detail-article h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: end;
  box-shadow: 0 16px 36px rgba(15,23,42,0.14);
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: saturate(1.1);
  transition: transform 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.82));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile small {
  margin-top: 8px;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 6px 16px 22px 0;
  scroll-snap-type: x proximity;
}

.rail .movie-card {
  flex: 0 0 250px;
  scroll-snap-align: start;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1f2, #fdf2f8);
}

.poster-link img {
  transition: transform 0.55s ease;
}

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35), transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.movie-card:hover .poster-shine {
  transform: translateX(100%);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(244,63,94,.35);
}

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

.movie-card h3 {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
}

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

.movie-meta {
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.movie-desc {
  min-height: 3.4em;
  line-height: 1.7;
  font-size: 0.92rem;
}

.filter-panel {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 18px;
  border: 1px solid #ffe4e6;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 220px;
  gap: 14px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #9f1239;
}

.filter-panel input,
.filter-panel select {
  height: 46px;
  border: 1px solid #fecdd3;
  border-radius: 16px;
  padding: 0 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.page-main {
  padding-bottom: 40px;
}

.page-hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 36px auto 0;
  border-radius: 34px;
  padding: clamp(36px, 7vw, 76px);
  color: #fff;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.22), transparent 25%), linear-gradient(135deg, #111827, #be123c 54%, #ec4899);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  max-width: 880px;
}

.compact-hero p {
  max-width: 780px;
}

.category-stack {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 80px;
  display: grid;
  gap: 34px;
}

.category-block {
  padding: 28px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(15,23,42,.08);
}

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

.full-ranking {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.detail-main {
  background: linear-gradient(180deg, #fff, #fff7f8);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 54px;
  padding: 72px 0;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 86px rgba(0,0,0,.42);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: rgba(255,255,255,.78);
  font-weight: 700;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-weight: 800;
}

.play-section {
  width: min(1100px, calc(100% - 32px));
  margin: -86px auto 0;
  position: relative;
  z-index: 5;
}

.player-card {
  padding: 14px;
  border-radius: 34px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 30px 80px rgba(15,23,42,.24);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  cursor: pointer;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: #fff;
  background: radial-gradient(circle, rgba(15,23,42,.22), rgba(15,23,42,.68));
  transition: opacity .25s ease, visibility .25s ease;
}

.player-card.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 20px 45px rgba(244,63,94,.38);
  position: relative;
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 23px;
  border-left: 24px solid #fff;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
}

.detail-content {
  margin-top: 58px;
}

.detail-article {
  padding: clamp(24px, 5vw, 48px);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15,23,42,.08);
}

.detail-article h2 + p {
  margin-top: 12px;
}

.detail-article p + h2,
.large-tags {
  margin-top: 28px;
}

.detail-article p {
  font-size: 1.05rem;
  line-height: 1.95;
}

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

.site-footer {
  margin-top: 90px;
  background: #111827;
  color: #fff;
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.footer-links a {
  color: rgba(255,255,255,.74);
}

@media (max-width: 1080px) {
  .hero-content,
  .detail-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 360px;
  }

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

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.active {
    display: block;
  }

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(2.1rem, 14vw, 3.6rem);
  }

  .hero-poster {
    height: 420px;
    max-width: none;
  }

  .page-section {
    margin: 58px auto;
  }

  .section-heading,
  .category-block-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .movie-desc {
    display: none;
  }

  .detail-wrap {
    padding: 42px 0 126px;
  }

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

  .play-section {
    margin-top: -70px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .nav-wrap {
    height: 64px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .movie-grid,
  .full-ranking,
  .related-grid,
  .category-grid,
  .preview-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .rail .movie-card {
    flex-basis: 210px;
  }

  .site-search {
    border-radius: 20px;
    flex-direction: column;
    align-items: stretch;
  }

  .site-search input,
  .site-search button {
    width: 100%;
  }
}
