:root {
  --bg: #fff7f7;
  --text: #111827;
  --muted: #6b7280;
  --line: #f3d7d7;
  --card: #ffffff;
  --soft: #fff1f2;
  --red: #ef4444;
  --red-dark: #dc2626;
  --pink: #ec4899;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(127, 29, 29, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fffafa 0%, #ffffff 42%, #fff7f7 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(127, 29, 29, 0.08);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--red-dark), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--red-dark);
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #f1b4b4;
  background: #ffffff;
  border-radius: 999px;
  padding: 10px 15px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input {
  width: 210px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.nav-search button,
.mobile-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  border: 0;
  background: #fff1f2;
  color: var(--red-dark);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid #fee2e2;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
}

.mobile-menu.open {
  display: grid;
  gap: 12px;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.66) 45%, rgba(17, 24, 39, 0.16) 100%);
}

.hero-slider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(0deg, #fff7f7, rgba(255, 247, 247, 0));
  pointer-events: none;
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  transform: translateY(-50%);
  max-width: 680px;
  color: #ffffff;
  animation: slideIn 0.7s ease both;
}

.eyebrow,
.section-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.eyebrow.dark {
  color: var(--red-dark);
  background: #ffe4e6;
}

.hero-content h1,
.hero-content h2 {
  margin: 20px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 28px;
  max-width: 620px;
  color: #f3f4f6;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-actions,
.card-actions,
.footer-links,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-arrow,
.hero-dots button {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: 72px 0;
}

.soft-section,
.ranking-section {
  background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 50%, #ffffff 100%);
}

.section-heading {
  margin-bottom: 30px;
}

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

.section-heading.center {
  text-align: center;
  display: grid;
  place-items: center;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.player-heading h2,
.detail-panel h2 {
  margin: 10px 0 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  margin: 14px auto 0;
  max-width: 720px;
  color: var(--muted);
}

.arrow-link,
.text-link {
  color: var(--red-dark);
  font-weight: 900;
}

.text-link.muted {
  color: var(--muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 32px rgba(127, 29, 29, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.movie-card.hidden {
  display: none;
}

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

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.66), rgba(17, 24, 39, 0));
}

.movie-type {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.92);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 900;
}

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

.movie-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

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

.movie-card p {
  margin: 0 0 14px;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  color: #be123c;
  background: #ffe4e6;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 800;
}

.card-actions {
  margin-top: 16px;
  justify-content: space-between;
}

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

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

.category-card {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  box-shadow: var(--shadow);
}

.category-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--red), var(--pink));
  font-size: 26px;
}

.category-card strong {
  font-size: 22px;
}

.category-card em {
  color: var(--muted);
  font-style: normal;
}

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

.rank-line {
  display: grid;
  grid-template-columns: 54px 132px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(127, 29, 29, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-line:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

.rank-line img {
  width: 132px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
  background: #fee2e2;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-copy strong {
  font-size: 20px;
}

.rank-copy em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-heat {
  color: #be123c;
  background: #ffe4e6;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

.page-hero {
  padding: 74px 0 62px;
}

.soft-hero {
  background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 55%, #ffffff 100%);
}

.rank-hero {
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(236, 72, 153, 0.5), transparent 34%), linear-gradient(135deg, #7f1d1d, #111827 76%);
}

.rank-hero h1,
.rank-hero p {
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: #9f1239;
  font-weight: 800;
}

.breadcrumb.light {
  color: #fecdd3;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.06);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
  padding: 76px 0;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(127, 29, 29, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #fee2e2;
}

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(40px, 6vw, 66px);
}

.detail-copy .lead {
  max-width: 820px;
  color: #f3f4f6;
  font-size: 20px;
}

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

.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 7px 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags {
  margin-bottom: 22px;
}

.player-card,
.detail-panel {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(248, 113, 113, 0.14);
}

.player-card {
  padding: 20px;
}

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

.player-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.48), rgba(127, 29, 29, 0.32));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 20px 40px rgba(236, 72, 153, 0.32);
  font-size: 30px;
}

.detail-content {
  display: grid;
  gap: 22px;
}

.detail-panel {
  padding: 28px;
}

.detail-panel h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.detail-panel p {
  color: #374151;
  font-size: 17px;
}

.info-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.info-panel div {
  padding: 14px;
  border-radius: 16px;
  background: #fff7f7;
}

.info-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.info-panel dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.site-footer {
  padding: 46px 0;
  background: #111827;
  color: #e5e7eb;
}

.footer-inner {
  display: grid;
  gap: 14px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: #d1d5db;
}

.footer-links a {
  color: #fecdd3;
  font-weight: 800;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 22px));
  }

  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

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

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

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

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

@media (max-width: 820px) {
  .hero-slider {
    min-height: 560px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
  }

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

  .movie-grid,
  .catalog-grid,
  .latest-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-line {
    grid-template-columns: 44px 96px 1fr;
  }

  .rank-heat {
    grid-column: 3;
    width: fit-content;
  }

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

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

  .filter-bar,
  .info-panel dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 520px;
  }

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

  .hero-controls {
    bottom: 22px;
  }

  .section {
    padding: 52px 0;
  }

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

  .rank-line {
    grid-template-columns: 42px 82px 1fr;
    gap: 12px;
  }

  .rank-line img {
    width: 82px;
    height: 64px;
  }

  .rank-copy em,
  .rank-copy .tag-row {
    display: none;
  }

  .detail-hero {
    padding: 52px 0;
  }

  .player-card,
  .detail-panel {
    padding: 16px;
  }
}
