:root {
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-soft: #fdf2f8;
  --color-line: #fce7f3;
  --color-card: rgba(255, 255, 255, 0.92);
  --color-pink: #ec4899;
  --color-purple: #a855f7;
  --color-blue: #3b82f6;
  --shadow-card: 0 22px 45px rgba(236, 72, 153, 0.13);
  --shadow-soft: 0 14px 28px rgba(168, 85, 247, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgba(244, 114, 182, 0.26), transparent 32rem),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 28rem),
    linear-gradient(180deg, #fff7fb 0%, #ffffff 44%, #fff7fb 100%);
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(252, 231, 243, 0.96);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-pink), var(--color-purple));
  box-shadow: 0 12px 22px rgba(236, 72, 153, 0.28);
}

.logo-text {
  background: linear-gradient(90deg, var(--color-pink), var(--color-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #374151;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-pink), var(--color-purple));
  transition: width 0.22s ease;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  width: 100%;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(280px, 24vw);
  padding: 3px;
  border: 2px solid #fbcfe8;
  border-radius: 999px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search:focus-within {
  border-color: #f472b6;
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.14);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 8px 12px 8px 16px;
  color: #374151;
  background: transparent;
}

.header-search button {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-pink), var(--color-purple));
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #be185d;
  background: #fdf2f8;
}

.mobile-panel {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid #fce7f3;
}

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

.mobile-panel .main-nav {
  flex-direction: column;
  align-items: flex-start;
  margin-top: 12px;
}

.mobile-panel .header-search {
  width: 100%;
  margin-top: 16px;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 22px 64px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  color: #ffffff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.4s 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(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.62) 44%, rgba(17, 24, 39, 0.2) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.08) 56%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 112px 22px 118px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 22px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 950;
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-tags span,
.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #be185d;
  background: #fdf2f8;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  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, var(--color-pink), var(--color-purple));
  box-shadow: 0 18px 32px rgba(236, 72, 153, 0.28);
}

.btn-soft {
  color: #be185d;
  background: rgba(255, 255, 255, 0.9);
}

.btn-outline {
  color: #be185d;
  border: 1px solid #fbcfe8;
  background: #ffffff;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search-card {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin: -56px auto 0;
  padding: 0 22px;
}

.hero-search-card form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(252, 231, 243, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.hero-search-card input,
.filter-input,
.filter-select {
  min-height: 48px;
  border: 1px solid #fbcfe8;
  border-radius: 999px;
  outline: 0;
  padding: 0 18px;
  color: #374151;
  background: #ffffff;
}

.hero-search-card input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: #f472b6;
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.12);
}

.section {
  margin-top: 58px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--color-muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(252, 231, 243, 0.95);
  border-radius: 26px;
  background: var(--color-card);
  box-shadow: 0 10px 22px rgba(31, 41, 55, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fdf2f8, #f3e8ff);
}

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

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

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-pink), var(--color-purple));
  font-size: 12px;
  font-weight: 900;
}

.card-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.78), transparent);
}

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #be185d;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.card-line {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid #fce7f3;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(253, 242, 248, 0.96), rgba(243, 232, 255, 0.8)),
    #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.category-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.75;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #fce7f3;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.05);
}

.rank-num {
  font-size: 34px;
  font-weight: 950;
  color: #f472b6;
  letter-spacing: -0.06em;
}

.rank-thumb {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

.rank-info p {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: 34px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid #fce7f3;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #fdf2f8;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.detail-line {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 30px;
  border-radius: 30px;
  background: #111827;
  box-shadow: 0 24px 52px rgba(17, 24, 39, 0.28);
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(0deg, rgba(17, 24, 39, 0.66), rgba(17, 24, 39, 0.18)),
    rgba(17, 24, 39, 0.18);
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.play-large {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: #be185d;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
  font-size: 32px;
}

.text-panel {
  padding: 26px;
  border: 1px solid #fce7f3;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.05);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 950;
}

.text-panel p {
  margin: 0;
  color: #4b5563;
  line-height: 1.95;
}

.text-panel p + p {
  margin-top: 14px;
}

.search-panel {
  padding: 20px;
  border: 1px solid #fce7f3;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.filter-row {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr auto;
  align-items: center;
}

.filter-input,
.filter-select {
  width: 100%;
}

.site-footer {
  border-top: 1px solid #fce7f3;
  background: linear-gradient(90deg, #fdf2f8, #f3e8ff);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 22px;
  color: #6b7280;
  line-height: 1.8;
}

.footer-inner strong {
  color: #be185d;
}

.empty-state {
  display: none;
  padding: 38px;
  border: 1px dashed #f9a8d4;
  border-radius: 28px;
  color: #6b7280;
  text-align: center;
  background: #fff7fb;
}

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

@media (max-width: 1040px) {
  .main-nav,
  .header-inner > .header-search {
    display: none;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

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

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

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

  .detail-poster img {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
  }

  .logo {
    font-size: 22px;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    padding-top: 90px;
  }

  .hero-control {
    display: none;
  }

  .hero-search-card form,
  .filter-row {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 50px 74px 1fr;
  }

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

@media (max-width: 520px) {
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .detail-hero,
  .text-panel,
  .search-panel {
    border-radius: 24px;
    padding: 18px;
  }
}
