:root {
  --rose: #e11d48;
  --rose-dark: #be123c;
  --pink: #db2777;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-size: 21px;
  background: linear-gradient(135deg, #f43f5e, #db2777);
  box-shadow: 0 14px 28px rgba(225, 29, 72, 0.25);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #e11d48, #db2777);
  -webkit-background-clip: text;
  color: transparent;
}

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

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

.nav-link:hover,
.nav-link.is-active {
  color: var(--rose);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 260px;
  height: 40px;
  padding: 0 44px 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  background: #fff;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.header-search button {
  position: absolute;
  right: 4px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #db2777);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: #374151;
  background: #f3f4f6;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #fff;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
}

.mobile-search button,
.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #f43f5e, #db2777);
  box-shadow: 0 14px 30px rgba(225, 29, 72, 0.24);
}

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

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-nav-link.is-active,
.mobile-nav-link:hover {
  color: var(--rose);
  background: #fff1f2;
}

.hero-carousel {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #881337, #9d174d 48%, #be123c);
}

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

.hero-slide.is-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(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(32px, calc((100vw - 1180px) / 2));
  width: min(650px, calc(100% - 64px));
  transform: translateY(-50%);
  color: #fff;
}

.hero-kicker,
.hero-site-title,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: rgba(244, 63, 94, 0.92);
}

.hero-content h1,
.hero-content h2 {
  margin: 16px 0 8px;
  line-height: 1.08;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  font-size: clamp(30px, 5vw, 56px);
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 10px 22px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.primary-button.full {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  margin-top: 16px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.30);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

.stat-strip {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -44px;
}

.stat-card {
  min-height: 120px;
  padding: 22px;
  border-radius: 20px;
  color: #fff;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.stat-blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
}

.stat-amber {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.stat-purple {
  background: linear-gradient(135deg, #8b5cf6, #c026d3);
}

.section {
  padding: 72px 0;
}

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

.section-head h2,
.category-band h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  color: var(--rose);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card,
.movie-row,
.mini-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card {
  display: block;
}

.movie-card:hover,
.movie-row:hover,
.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.14);
}

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

.card-poster img,
.row-cover img,
.mini-card img,
.category-tile img,
.category-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .card-poster img,
.movie-row:hover .row-cover img,
.mini-card:hover img,
.category-tile:hover img,
.category-overview-card:hover .category-cover img {
  transform: scale(1.08);
}

.card-shade,
.play-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade,
.movie-row:hover .play-mask,
.mini-card:hover .play-mask {
  opacity: 1;
}

.card-badge,
.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(225, 29, 72, 0.95);
}

.card-badge {
  top: 12px;
  left: 12px;
}

.card-year {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.row-title .rank-badge {
  position: static;
  display: inline-flex;
  margin-right: 8px;
  vertical-align: middle;
}

.card-body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.card-body strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover .card-body strong,
.movie-row:hover .row-title,
.mini-card:hover strong {
  color: var(--rose);
}

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

.card-meta,
.row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.card-meta em,
.row-meta em {
  font-style: normal;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.category-band,
.muted-section {
  background: linear-gradient(135deg, #eef2ff, #faf5ff 48%, #fff1f2);
}

.category-band {
  padding: 72px 0;
}

.category-band h2 {
  text-align: center;
  margin-bottom: 28px;
}

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

.category-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.category-tile::after,
.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.72), rgba(219, 39, 119, 0.72));
  z-index: 1;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.46;
}

.category-tile span {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}

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

.category-tile small {
  display: -webkit-box;
  overflow: hidden;
  max-width: 92%;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tile-blue::after {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.72), rgba(79, 70, 229, 0.72));
}

.tile-emerald::after {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.72), rgba(13, 148, 136, 0.72));
}

.tile-amber::after {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.72), rgba(234, 88, 12, 0.72));
}

.tile-purple::after {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.72), rgba(192, 38, 211, 0.72));
}

.tile-cyan::after {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.72), rgba(37, 99, 235, 0.72));
}

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

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

.movie-row {
  display: flex;
  min-height: 150px;
}

.row-cover {
  position: relative;
  flex: 0 0 210px;
  overflow: hidden;
  background: #111827;
}

.row-content {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  min-width: 0;
}

.row-title {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.scroll-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
}

.scroll-item {
  width: 330px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.page-hero {
  padding: 74px 0;
  color: #fff;
  background: linear-gradient(135deg, #be123c, #db2777);
}

.page-hero h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 740px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.category-hero {
  background: linear-gradient(135deg, #881337, #be123c 55%, #db2777);
}

.ranking-hero {
  background: linear-gradient(135deg, #7c2d12, #c2410c 52%, #e11d48);
}

.search-hero {
  background: linear-gradient(135deg, #1e3a8a, #7c3aed 50%, #db2777);
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-search {
  flex: 1;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 13px;
  padding: 0 14px;
  outline: none;
  background: #fff;
}

.filter-selects {
  display: grid;
  grid-template-columns: repeat(3, 150px);
  gap: 12px;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-cover {
  position: relative;
  display: block;
  height: 230px;
  overflow: hidden;
  color: #fff;
}

.category-cover span {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 2;
  font-size: 30px;
  font-weight: 900;
}

.category-overview-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.category-overview-body h2 {
  margin: 0;
  color: var(--ink);
}

.category-overview-body p {
  margin: 0;
  color: var(--muted);
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.category-samples a {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--rose);
  background: #fff1f2;
  font-size: 13px;
  font-weight: 700;
}

.watch-area {
  padding: 24px 0 42px;
  background: #030712;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #d1d5db;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #000;
}

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

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

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(225, 29, 72, 0.14), rgba(0, 0, 0, 0.76));
}

.player-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, #f43f5e, #db2777);
  box-shadow: 0 20px 44px rgba(225, 29, 72, 0.35);
  transform: translate(-50%, -50%);
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.detail-poster {
  position: sticky;
  top: 92px;
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-main {
  padding: 32px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-kicker {
  color: #fff;
}

.detail-main h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: #374151;
  font-size: 18px;
  font-weight: 700;
}

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

.detail-meta span,
.tag-list span {
  border-radius: 999px;
  padding: 6px 12px;
  color: #374151;
  background: #f3f4f6;
  font-size: 14px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.tag-list span {
  color: var(--rose);
  background: #fff1f2;
}

.detail-main h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-main p {
  color: #4b5563;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.mini-card img {
  width: 96px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.mini-card span {
  display: grid;
  gap: 5px;
}

.mini-card strong {
  color: var(--ink);
}

.mini-card small {
  color: var(--muted);
}

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

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-logo .brand-text {
  color: #fff;
  background: none;
}

.footer-brand p {
  max-width: 420px;
  color: #9ca3af;
}

.footer-group h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: #9ca3af;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 18px 16px;
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

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

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

  .rank-list,
  .rank-list.large,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    left: 24px;
    width: calc(100% - 48px);
  }

  .hero-control {
    display: none;
  }

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

  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-selects {
    grid-template-columns: 1fr;
  }

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

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

  .movie-grid,
  .movie-grid.four-col,
  .category-movie-grid,
  .category-grid,
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .row-cover {
    flex-basis: 130px;
  }

  .movie-row {
    min-height: 126px;
  }

  .category-cover {
    height: 190px;
  }

  .detail-main {
    padding: 22px;
  }

  .player-shell {
    border-radius: 16px;
  }
}
