:root {
  --bg: #fff7fb;
  --card: rgba(255, 255, 255, 0.86);
  --text: #1f2937;
  --muted: #667085;
  --line: rgba(248, 113, 113, 0.16);
  --red: #ef4444;
  --orange: #f97316;
  --pink: #ec4899;
  --purple: #8b5cf6;
  --shadow: 0 18px 55px rgba(239, 68, 68, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(254, 202, 202, 0.9), transparent 28rem),
    radial-gradient(circle at 92% 8%, rgba(221, 214, 254, 0.9), transparent 30rem),
    linear-gradient(180deg, #fff7fb 0%, #eff6ff 46%, #faf5ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #fee2e2, #e0e7ff);
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 35px rgba(244, 114, 182, 0.08);
}

.site-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--pink));
  -webkit-background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.28);
  font-size: 14px;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 18px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: all 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover {
  color: var(--pink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.12);
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #374151;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 18px 16px;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

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

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  position: relative;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.35), rgba(255, 255, 255, 0.08)),
    linear-gradient(180deg, rgba(236, 72, 153, 0.20), rgba(249, 115, 22, 0.18));
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  min-height: 620px;
  margin: 0 auto;
  padding: 82px 18px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
}

.hero-copy {
  color: #ffffff;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 900;
}

.hero-copy .eyebrow,
.page-hero .eyebrow {
  color: #fed7aa;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 950;
  text-shadow: 0 16px 50px rgba(0, 0, 0, 0.34);
}

.hero-desc {
  margin: 0 0 24px;
  max-width: 660px;
  font-size: 20px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.card-tags,
.detail-tags,
.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-tags span,
.detail-tags span,
.category-links a {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.card-tags span,
.detail-tags span,
.category-links a {
  color: #be123c;
  background: #fff1f2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

.btn-primary,
.btn-light,
.home-search button,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.home-search button,
.search-panel button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--red), var(--orange));
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.28);
}

.btn-light {
  color: #374151;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.18);
}

.btn-primary:hover,
.btn-light:hover,
.home-search button:hover,
.search-panel button:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary.full {
  width: 100%;
}

.btn-light.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

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

.hero-poster span,
.card-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.88);
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.35);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #111827;
  font-size: 32px;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 32px;
  background: #ffffff;
}

.search-band {
  max-width: 1060px;
  margin: -38px auto 0;
  position: relative;
  z-index: 3;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search,
.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.home-search input,
.search-panel input,
.search-panel select {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 999px;
  padding: 0 18px;
  background: #ffffff;
  outline: none;
}

.home-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.10);
}

.home-entry-links,
.pager-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.home-entry-links a,
.pager-mini a,
.text-link {
  color: var(--pink);
  font-weight: 900;
}

.section-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 18px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.section-heading a {
  color: var(--pink);
  font-weight: 900;
}

.compact-heading {
  margin-bottom: 18px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(236, 72, 153, 0.18);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

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

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

.card-play {
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

.card-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.70);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
}

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

.card-body p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

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

.category-chip-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.category-chip-card:hover {
  transform: translateY(-4px);
}

.category-chip-card strong {
  font-size: 20px;
  font-weight: 950;
}

.category-chip-card span {
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.rank-panel,
.side-panel,
.poster-panel,
.detail-card,
.player-card {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 241, 242, 0.76);
}

.rank-num,
.ranking-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 950;
}

.rank-list a {
  min-width: 0;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-list em {
  color: var(--pink);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(249, 115, 22, 0.84), rgba(236, 72, 153, 0.86));
}

.page-hero > div {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero h1 {
  color: #ffffff;
  max-width: 850px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.75;
}

.small-hero {
  padding-top: 74px;
  padding-bottom: 74px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.category-thumb-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-thumb-row img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 950;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.65;
}

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

.pagination:last-child {
  margin: 28px 0 0;
}

.pagination a,
.pagination strong,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #4b5563;
  font-weight: 900;
}

.pagination strong {
  color: #ffffff;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.ranking-wrap {
  display: grid;
  gap: 16px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 56px 116px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.ranking-cover img {
  width: 116px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
}

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

.ranking-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.search-page {
  padding-top: 42px;
}

.search-panel {
  grid-template-columns: 1fr 180px 180px auto;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.search-status {
  margin: 22px 0;
  color: var(--muted);
  font-weight: 900;
}

.detail-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

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

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

.player-card {
  padding: 12px;
  margin-bottom: 22px;
}

.movie-player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.24), rgba(17, 24, 39, 0.74));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 20px 44px rgba(239, 68, 68, 0.38);
  font-size: 30px;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin-bottom: 18px;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #be123c;
  background: #fff1f2;
  font-size: 13px;
  font-weight: 900;
}

.lead-text {
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 700;
}

.detail-card h2 {
  margin: 26px 0 10px;
  font-size: 22px;
  font-weight: 950;
}

.detail-card p {
  color: var(--muted);
  line-height: 1.9;
}

.detail-tags,
.category-links {
  margin-top: 20px;
}

.detail-side {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 18px;
}

.poster-panel,
.side-panel {
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 16px;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 241, 242, 0.68);
}

.compact-card img {
  width: 78px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  font-weight: 950;
  line-height: 1.3;
}

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

.detail-related-wide {
  padding: 34px 0 0;
}

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

.site-footer {
  margin-top: 86px;
  padding: 54px 18px 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.82));
  border-top: 1px solid rgba(255, 255, 255, 0.86);
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 14px;
}

.site-footer p,
.site-footer a {
  color: #667085;
  line-height: 1.7;
}

.site-footer a {
  display: block;
  margin: 7px 0;
  font-weight: 700;
}

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

.site-footer h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 950;
}

.footer-bottom {
  max-width: 1180px;
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(209, 213, 219, 0.55);
  color: #6b7280;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-inner,
  .split-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-side {
    display: none;
  }

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

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

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

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

  .hero-carousel,
  .hero-inner {
    min-height: 560px;
  }

  .hero-inner {
    padding-top: 62px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

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

  .section-wrap {
    padding-top: 54px;
  }

  .section-heading,
  .ranking-row {
    align-items: start;
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 44px 84px 1fr;
  }

  .ranking-row .btn-light {
    grid-column: 1 / -1;
  }

  .ranking-cover img {
    width: 84px;
  }

  .detail-layout {
    padding-top: 20px;
  }

  .detail-card {
    padding: 22px;
  }
}
