:root {
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --orange: #f97316;
  --amber: #f59e0b;
  --emerald: #10b981;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --violet: #8b5cf6;
  --text: #1f2937;
  --muted: #6b7280;
  --light: #fff7ed;
  --surface: #ffffff;
  --line: rgba(148, 163, 184, 0.26);
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.12), transparent 32rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 38%, #fff 100%);
}

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-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

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

.brand {
  font-size: 24px;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark,
.footer-brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 12px 26px rgba(244, 63, 94, 0.26);
  font-size: 15px;
}

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

.desktop-nav a,
.mobile-panel a {
  color: #475569;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

.top-search input,
.mobile-search input,
.search-toolbar input,
.search-toolbar select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.top-search input:focus,
.mobile-search input:focus,
.search-toolbar input:focus,
.search-toolbar select:focus {
  border-color: rgba(244, 63, 94, 0.7);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.14);
}

.top-search button,
.mobile-search button,
.btn-primary,
.btn-light,
.filter-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button,
.btn-primary,
.filter-button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 14px 26px rgba(244, 63, 94, 0.25);
}

.top-search button,
.mobile-search button {
  padding: 10px 16px;
}

.btn-primary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
}

.btn-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-primary:hover,
.btn-light:hover,
.top-search button:hover,
.mobile-search button:hover,
.filter-button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

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

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

.mobile-panel nav {
  display: grid;
  gap: 13px;
  padding: 14px 0;
}

.mobile-search input {
  flex: 1;
}

.hero-shell {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.74) 48%, rgba(17, 24, 39, 0.34) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.98) 0%, transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 118px 0 156px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--rose);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 900;
  font-size: 14px;
}

.hero-content h1 {
  margin: 22px 0 16px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
  border-radius: 999px;
  padding: 7px 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.tag-row span,
.meta-pill {
  color: var(--rose-dark);
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.14);
}

.hero-thumbs {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  cursor: pointer;
  text-align: left;
}

.hero-thumb.active {
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.22);
}

.hero-thumb img {
  width: 74px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
}

.hero-thumb strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-thumb small {
  color: rgba(255, 255, 255, 0.7);
}

.main-section {
  padding: 72px 0 0;
}

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

.section-head h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--rose);
  font-weight: 900;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border 0.24s ease;
}

.card-link:hover {
  transform: translateY(-8px);
  border-color: rgba(244, 63, 94, 0.3);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #ffe4e6, #fed7aa);
}

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

.card-link:hover .poster-frame img,
.ranking-item:hover img,
.related-item:hover img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 17px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-body h3 {
  margin: 11px 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  border-radius: 26px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 18px 40px rgba(244, 63, 94, 0.18);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -30px;
  bottom: -30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 56px 116px 1fr auto;
  gap: 16px;
  align-items: center;
  border-radius: 22px;
  padding: 12px;
  transition: background 0.2s ease;
}

.ranking-item:hover {
  background: #fff7ed;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  font-weight: 950;
}

.ranking-item img {
  width: 116px;
  height: 76px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.35s ease;
}

.ranking-item h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

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

.rank-score {
  color: var(--rose);
  font-weight: 900;
}

.page-hero {
  padding: 76px 0 34px;
}

.page-title {
  display: grid;
  gap: 14px;
  max-width: 820px;
}

.filter-bar,
.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 20px 0 30px;
}

.filter-button {
  padding: 10px 14px;
  color: #475569;
  background: #fff;
  border: 1px solid var(--line);
}

.search-toolbar input {
  width: min(420px, 100%);
}

.search-toolbar select {
  min-width: 150px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

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

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.1);
  opacity: 0.46;
}

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

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 40px;
  align-items: center;
  padding: 78px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
  color: #fff;
  margin: 18px 0 14px;
}

.detail-copy p {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.85;
  font-size: 17px;
}

.detail-meta {
  color: rgba(255, 255, 255, 0.78);
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.46));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 20px 45px rgba(244, 63, 94, 0.35);
  font-size: 30px;
  transform: translateX(3px);
}

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

.content-block {
  display: grid;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.content-block h2 {
  margin: 0;
  color: #111827;
}

.content-block p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
}

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

.related-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.related-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-item h3 {
  margin: 0;
  padding: 12px 12px 4px;
  font-size: 15px;
  line-height: 1.4;
}

.related-item p {
  margin: 0;
  padding: 0 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.empty-message {
  display: none;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

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

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

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

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

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

  .hero-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

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

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

  .brand {
    font-size: 20px;
  }

  .hero-shell {
    min-height: 760px;
  }

  .hero-content {
    padding: 86px 0 258px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
    bottom: 18px;
  }

  .hero-thumb:nth-child(n + 4) {
    display: none;
  }

  .section-head,
  .ranking-item {
    display: grid;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 14px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .ranking-item {
    grid-template-columns: 42px 86px 1fr;
  }

  .ranking-item img {
    width: 86px;
    height: 64px;
  }

  .rank-score {
    grid-column: 3;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 48px 0;
  }

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

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