
:root {
  --red: #ef4444;
  --red-dark: #dc2626;
  --pink: #ec4899;
  --orange: #f97316;
  --mint: #10b981;
  --cool: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff1f2;
  --paper: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 42%, #ffffff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--red-dark), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 14px 25px rgba(239, 68, 68, 0.28);
}

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

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

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

.nav-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.nav-search input,
.mobile-search input,
.search-hero input {
  border: 0;
  outline: 0;
  min-width: 190px;
  padding: 12px 14px;
  background: transparent;
}

.nav-search button,
.mobile-search button,
.search-hero button {
  border: 0;
  color: #fff;
  font-weight: 800;
  padding: 12px 18px;
  background: linear-gradient(90deg, var(--red), var(--pink));
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
}

.mobile-panel {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mobile-search {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
  animation: slideIn 0.55s ease both;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #fecdd3;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

.hero p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.btn,
.ghost-btn,
.filter-btn,
.page-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
  color: #fff;
  padding: 14px 24px;
  background: linear-gradient(90deg, var(--red), var(--pink));
  box-shadow: 0 14px 32px rgba(236, 72, 153, 0.32);
}

.btn:hover,
.ghost-btn:hover,
.filter-btn:hover,
.page-chip:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #fff;
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

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

.hero-dot.is-active {
  background: #fff;
}

.hero-fade {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(0deg, #fff1f2, rgba(255, 241, 242, 0));
}

.section {
  padding: 76px 0;
}

.section.alt {
  background: linear-gradient(135deg, rgba(255, 228, 230, 0.8), rgba(253, 242, 248, 0.9), rgba(255, 255, 255, 0.92));
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card img,
.category-tile img,
.rank-row img,
.reco-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img,
.category-tile:hover img,
.rank-row:hover img,
.reco-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.68), rgba(17, 24, 39, 0.02));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.84);
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  min-height: 194px;
}

.card-category,
.meta-chip,
.tag-chip {
  display: inline-flex;
  width: fit-content;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1f2;
}

.card-body strong {
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: #6b7280;
  font-size: 13px;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f9fafb;
}

.list-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 150px;
}

.list-card .poster-wrap {
  aspect-ratio: auto;
  height: 100%;
}

.list-card .card-body {
  min-height: 0;
}

.category-tile {
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  min-height: 218px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  grid-template-rows: 76px 76px;
  gap: 8px;
}

.category-covers img {
  border-radius: 16px;
  overflow: hidden;
}

.category-covers img:first-child {
  grid-row: span 2;
}

.category-title {
  font-size: 22px;
  font-weight: 900;
}

.category-desc {
  color: var(--muted);
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 132px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
  overflow: hidden;
}

.rank-num {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

.rank-row img {
  height: 82px;
  border-radius: 14px;
}

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

.rank-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 18px;
}

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

.rank-info span {
  color: #9ca3af;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  padding: 72px 0;
  background: linear-gradient(135deg, #ffe4e6, #fdf2f8 48%, #fff);
}

.page-hero h1,
.detail-title h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.filter-card {
  padding: 18px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
}

.filter-btn,
.page-chip {
  padding: 10px 16px;
  color: #374151;
  background: #fff;
  border: 1px solid var(--line);
}

.filter-btn.active,
.page-chip.active {
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--pink));
  border-color: transparent;
}

.search-hero {
  display: flex;
  width: min(760px, 100%);
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.1);
}

.search-hero input {
  flex: 1;
  min-width: 0;
  padding: 18px 22px;
}

.search-hero button {
  padding-inline: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  padding: 42px 0 78px;
}

.player-card,
.content-card,
.side-card {
  overflow: hidden;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
}

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

.play-ring {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: var(--red-dark);
  font-size: 34px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
  max-width: min(560px, calc(100% - 42px));
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.25;
}

.content-card {
  margin-top: 26px;
  padding: 28px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 20px;
  color: #374151;
  line-height: 1.92;
  font-size: 17px;
}

.meta-row,
.tag-row,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--red-dark);
  font-weight: 800;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 20px;
}

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

.reco-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.reco-card:hover {
  background: #f9fafb;
}

.reco-card img {
  height: 76px;
  border-radius: 13px;
}

.reco-card span {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.reco-card strong,
.reco-card em {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.reco-card strong {
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.reco-card em {
  -webkit-line-clamp: 1;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.index-columns {
  columns: 3 260px;
  column-gap: 26px;
}

.index-block {
  break-inside: avoid;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.86);
}

.index-block h2 {
  margin: 0 0 12px;
  color: var(--red-dark);
}

.index-block a {
  display: block;
  padding: 7px 0;
  color: #374151;
  line-height: 1.45;
}

.index-block a:hover {
  color: var(--red-dark);
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding: 52px 0;
}

.site-footer p {
  max-width: 420px;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fecdd3;
  font-size: 18px;
}

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

.footer-links a {
  color: #d1d5db;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.45);
}

.footer-bottom {
  text-align: center;
  color: #9ca3af;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.hidden-card {
  display: none !important;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .side-card {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

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

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    height: 640px;
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .ghost-btn {
    width: 100%;
  }

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

  .list-card,
  .rank-row,
  .reco-card {
    grid-template-columns: 1fr;
  }

  .rank-row img,
  .reco-card img {
    height: 150px;
  }

  .search-hero {
    border-radius: 22px;
    flex-direction: column;
  }

  .search-hero button {
    width: 100%;
  }

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