:root {
  --page-bg: linear-gradient(135deg, #fff4e6 0%, #ffe8e0 42%, #f8e8ee 100%);
  --card-bg: rgba(255, 255, 255, 0.9);
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(236, 72, 153, 0.14);
  --pink: #ec4899;
  --pink-dark: #db2777;
  --purple: #a855f7;
  --orange: #fb923c;
  --shadow: 0 18px 45px rgba(236, 72, 153, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page-bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.12);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: transparent;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-badge {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
  color: #374151;
  font-weight: 700;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--pink);
}

.header-search {
  display: flex;
  align-items: center;
  width: 320px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input,
.mobile-panel input,
.search-hero input,
.page-filter {
  width: 100%;
  outline: none;
  border: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 0 16px;
}

.header-search button,
.mobile-panel button,
.search-hero button {
  height: 100%;
  padding: 0 18px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  font-weight: 800;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: rgba(236, 72, 153, 0.1);
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 10px;
  background: var(--pink);
}

.mobile-panel {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px 22px;
  border-top: 1px solid rgba(236, 72, 153, 0.12);
}

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

.mobile-panel form {
  display: flex;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
}

.mobile-panel input {
  padding: 13px 15px;
}

.page-main {
  padding-top: 68px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-slide img {
  height: 600px;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 56px;
  z-index: 2;
  width: min(1180px, calc(100% - 44px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-meta span {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.section-link,
.category-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 900;
}

.primary-button {
  padding: 13px 22px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  box-shadow: 0 18px 34px rgba(236, 72, 153, 0.28);
}

.ghost-button {
  padding: 12px 20px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  width: min(1180px, calc(100% - 44px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
  background: #ffffff;
}

.content-section,
.category-page,
.detail-page,
.search-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 22px 0;
}

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

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.section-heading h2,
.category-hero h1,
.detail-title h1,
.search-hero h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p,
.category-hero p,
.detail-title p,
.search-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link,
.category-card-link {
  flex: 0 0 auto;
  padding: 10px 16px;
  color: var(--pink-dark);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.12);
}

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

.movie-card,
.category-card,
.rank-panel,
.detail-panel,
.player-shell,
.search-hero {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.movie-card {
  overflow: hidden;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(168, 85, 247, 0.18));
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

.play-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  color: var(--pink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: all 260ms ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

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

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

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tags span {
  padding: 6px 9px;
  color: var(--pink-dark);
  background: #fdf2f8;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.2), transparent 44%);
  pointer-events: none;
}

.category-card h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  min-height: 48px;
  margin: 0 0 18px;
  color: var(--muted);
}

.rank-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  font-weight: 900;
}

.rank-row img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 900;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rank-row > a:last-child {
  color: var(--pink-dark);
  font-weight: 900;
}

.category-hero,
.detail-hero,
.search-hero {
  margin-top: 34px;
}

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

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(236, 72, 153, 0.1);
}

.page-filter {
  height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  background: #ffffff;
}

.detail-hero {
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: stretch;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.detail-title {
  padding: 8px 0;
}

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

.breadcrumb a {
  color: var(--pink-dark);
  font-weight: 800;
}

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

.detail-meta span {
  padding: 9px 12px;
  border-radius: 999px;
  color: #374151;
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 900;
}

.player-section {
  margin-top: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.16));
  cursor: pointer;
  transition: opacity 240ms ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.big-play {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--pink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 22px;
}

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

.detail-panel {
  padding: 26px;
}

.detail-panel h2,
.detail-panel h3 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.detail-panel p {
  margin: 0 0 18px;
  color: #374151;
  line-height: 1.86;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.side-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
}

.side-item strong {
  display: block;
  margin-bottom: 4px;
  color: #1f2937;
  font-size: 14px;
}

.side-item span {
  color: var(--muted);
  font-size: 12px;
}

.search-hero {
  padding: 34px;
}

.search-box-large {
  display: flex;
  height: 56px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid rgba(236, 72, 153, 0.18);
  border-radius: 20px;
  background: #ffffff;
}

.search-box-large input {
  padding: 0 18px;
  font-size: 16px;
}

.search-results {
  margin-top: 28px;
}

.site-footer {
  margin-top: 70px;
  padding: 36px 22px;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(236, 72, 153, 0.1);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 28px;
}

.footer-inner p {
  max-width: 640px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #6b21a8;
  background: #ffffff;
  font-weight: 800;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

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

  .detail-poster img {
    max-height: 520px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

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

  .page-main {
    padding-top: 62px;
  }

  .hero,
  .hero-slide img {
    min-height: 560px;
    height: 560px;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-controls {
    bottom: 28px;
  }

  .hero-arrows {
    display: none;
  }

  .section-heading,
  .toolbar,
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .content-section,
  .category-page,
  .detail-page,
  .search-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .rank-row {
    grid-template-columns: 34px 54px 1fr;
  }

  .rank-row > a:last-child {
    display: none;
  }

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

  .movie-card p {
    display: none;
  }

  .detail-panel {
    padding: 20px;
  }

  .search-box-large {
    height: auto;
    display: grid;
  }

  .search-box-large input {
    height: 54px;
  }

  .search-box-large button {
    height: 48px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-strip {
    grid-template-columns: 1fr;
  }
}
