:root {
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --color-soft: #fff7fa;
  --color-rose: #f43f5e;
  --color-pink: #ec4899;
  --color-orange: #fb923c;
  --color-dark: #111827;
  --shadow-card: 0 18px 45px rgba(17, 24, 39, 0.10);
  --shadow-soft: 0 10px 30px rgba(244, 63, 94, 0.18);
  --radius-card: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: #f9fafb;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 16px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-rose), var(--color-pink));
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--color-rose), var(--color-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: #374151;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.header-search input,
.search-controls input,
.search-controls select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--color-rose);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.header-search button,
.search-controls button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--color-rose);
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  border-top: 1px solid var(--color-line);
  background: #ffffff;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 48%, #fb923c 100%);
}

.hero-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
}

.hero-glow-left {
  top: 30px;
  left: 6%;
  background: #ffffff;
}

.hero-glow-right {
  right: 8%;
  bottom: -80px;
  background: #fde047;
}

.hero-carousel {
  position: relative;
  max-width: 1280px;
  min-height: 610px;
  margin: 0 auto;
  padding: 86px 24px 92px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 52px;
  position: relative;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.5s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  margin: 18px 0 10px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-title {
  margin: 0 0 14px;
  color: #fef3c7;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 22px;
  color: #ffe4e6;
  font-size: 19px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.tag-cloud a {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.20);
}

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

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

.primary-button {
  color: var(--color-rose);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-art {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.28);
  transition: transform 0.28s ease;
}

.hero-art:hover {
  transform: scale(1.025);
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-art-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 80px 24px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

.hero-art-caption strong,
.hero-art-caption span {
  display: block;
}

.hero-art-caption strong {
  font-size: 24px;
}

.hero-art-caption span {
  margin-top: 6px;
  color: #e5e7eb;
}

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 32px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

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

.hero-prev,
.hero-next {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 34px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1180px;
  margin: -42px auto 38px;
  padding: 0 24px;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.stats-strip div {
  border: 1px solid rgba(244, 63, 94, 0.08);
  border-radius: 20px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.stats-strip strong {
  display: block;
  color: var(--color-rose);
  font-size: 30px;
}

.stats-strip span {
  display: block;
  color: var(--color-muted);
  font-size: 14px;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.content-section.soft-bg {
  max-width: none;
  background: linear-gradient(90deg, #fff7ed, #fff1f2);
}

.content-section.soft-bg > * {
  max-width: 1280px;
  margin-right: auto;
  margin-left: auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--color-muted);
}

.section-more {
  min-height: 40px;
  color: var(--color-rose);
  background: #fff1f2;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fdf2f8, #fff7ed);
}

.poster-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-fallback {
  display: grid;
  place-items: center;
  min-height: 180px;
  aspect-ratio: 16 / 10;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-rose), var(--color-orange));
  font-size: 42px;
  font-weight: 900;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  background: rgba(244, 63, 94, 0.92);
}

.rank-badge {
  top: 12px;
  left: 12px;
  background: rgba(17, 24, 39, 0.78);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #6b7280;
  font-size: 12px;
}

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

.tag-row span,
.detail-tags a,
.tag-cloud a {
  color: var(--color-rose);
  background: #fff1f2;
}

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

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

.category-tile {
  display: grid;
  min-height: 120px;
  align-content: center;
  border: 1px solid rgba(244, 63, 94, 0.12);
  border-radius: 22px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.35);
}

.category-tile span {
  font-weight: 800;
}

.category-tile strong {
  margin-top: 8px;
  color: var(--color-rose);
  font-size: 30px;
}

.category-tile small {
  color: var(--color-muted);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  border-radius: 24px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.ranking-panel h2 {
  margin: 0 0 6px;
}

.ranking-panel p {
  margin: 0 0 18px;
  color: var(--color-muted);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: #f9fafb;
}

.rank-item strong {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-rose);
}

.rank-item span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item small {
  color: var(--color-muted);
}

.page-hero {
  padding: 84px 24px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 30%), linear-gradient(135deg, #111827, #be123c 55%, #fb923c);
  text-align: center;
}

.page-hero.compact {
  padding: 58px 24px;
}

.page-hero .eyebrow {
  margin: 0 auto 16px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.page-hero p,
.lead-text {
  max-width: 820px;
  margin: 16px auto 0;
  color: #fee2e2;
  font-size: 18px;
  line-height: 1.8;
}

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

.pagination a,
.pagination strong,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0 12px;
  background: #ffffff;
}

.pagination strong {
  color: #ffffff;
  background: var(--color-rose);
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.detail-poster-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info {
  display: grid;
  align-content: center;
}

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

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #9f1239;
  background: #fff1f2;
  font-size: 14px;
  font-weight: 800;
}

.detail-stats {
  align-items: center;
  color: var(--color-muted);
}

.detail-stats strong {
  color: var(--color-dark);
}

.player-section {
  padding-top: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow-card);
}

.movie-video {
  display: block;
  width: 100%;
  max-height: 72vh;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.42), rgba(0, 0, 0, 0.45));
  cursor: pointer;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: var(--color-rose);
  box-shadow: 0 18px 45px rgba(244, 63, 94, 0.35);
  font-size: 38px;
}

.player-start strong {
  font-size: 18px;
}

.player-start.is-hidden {
  display: none;
}

.player-status {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  margin: 0;
  border-radius: 14px;
  padding: 10px 12px;
  color: #e5e7eb;
  background: rgba(17, 24, 39, 0.72);
  font-size: 13px;
}

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

.detail-text-card,
.prose-card {
  border: 1px solid var(--color-line);
  border-radius: 24px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.detail-text-card h2,
.prose-card h2,
.prose-card h3 {
  margin-top: 0;
}

.detail-text-card p,
.prose-card p,
.prose-card li {
  color: #4b5563;
  line-height: 1.9;
}

.search-panel {
  border-radius: 26px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 160px auto;
  gap: 12px;
  margin-bottom: 16px;
}

.search-summary {
  margin: 0 0 20px;
  color: var(--color-muted);
}

.table-wrap {
  overflow: auto;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid var(--color-line);
  padding: 14px 16px;
  text-align: left;
}

.ranking-table th {
  color: #9f1239;
  background: #fff1f2;
}

.ranking-table a:hover {
  color: var(--color-rose);
}

.tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
}

.tag-cloud small {
  color: var(--color-muted);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 30px;
  gap: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 20px;
}

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

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

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #fb7185;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px 28px;
  text-align: center;
}

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

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

  .two-column,
  .detail-body-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

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

  .hero-carousel {
    min-height: auto;
    padding: 56px 20px 86px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

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

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

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

  .search-controls {
    grid-template-columns: 1fr;
  }
}

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

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

  .content-section {
    padding: 40px 16px;
  }

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

  .stats-strip,
  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid,
  .category-grid.wide,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

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

  .page-hero {
    padding: 50px 18px;
  }

  .player-status {
    position: static;
    border-radius: 0;
  }
}
