:root {
  color-scheme: light;
  --page-bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --soft: #f1f5f9;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #111827;
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --orange: #fb923c;
  --amber: #f59e0b;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.3);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 10px 26px rgba(244, 63, 94, 0.38);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fb7185, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 5px;
  color: #94a3b8;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #e5e7eb;
  font-size: 15px;
}

.main-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  transition: width 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fb7185;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  width: 100%;
}

.header-search {
  width: min(260px, 24vw);
}

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

.search-form input,
.filter-input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.7);
  outline: none;
  padding: 0 46px 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.filter-input {
  color: var(--text);
  background: #fff;
}

.search-form input:focus,
.filter-input:focus {
  border-color: rgba(244, 63, 94, 0.68);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.search-form button {
  position: absolute;
  right: 5px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  display: grid;
  place-items: center;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-panel {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel a {
  display: block;
  color: #e5e7eb;
  padding: 12px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.page-main {
  min-height: 60vh;
}

.hero {
  position: relative;
  overflow: hidden;
  background: #020617;
  color: #fff;
}

.hero-stage {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.015);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(244, 63, 94, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
  gap: 48px;
  align-items: center;
  padding: 96px 0 112px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(251, 113, 133, 0.45);
  border-radius: 999px;
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.14);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 18px 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero p {
  max-width: 700px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags {
  margin: 24px 0 28px;
}

.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1;
}

.meta-pill {
  background: #f1f5f9;
  color: #475569;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 16px 30px rgba(244, 63, 94, 0.32);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.52);
  aspect-ratio: 3 / 4;
  transform: rotate(1.5deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: inherit;
}

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

.hero-poster-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 10px 12px;
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, var(--rose), var(--orange));
}

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

.section-wide {
  padding: 56px 0;
  background: linear-gradient(90deg, #fff1f2, #fff7ed);
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--rose);
  font-weight: 900;
}

.section-desc {
  max-width: 740px;
  margin-top: 8px;
  color: var(--muted);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rose-dark);
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: var(--shadow);
}

.poster-link {
  display: block;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

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

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.card-title a:hover {
  color: var(--rose-dark);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 10px;
}

.card-summary {
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  margin-top: 13px;
}

.card-tags span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #9f1239;
  background: #ffe4e6;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 22px;
  background:
    radial-gradient(circle at 78% 18%, rgba(251, 146, 60, 0.45), transparent 33%),
    linear-gradient(135deg, #0f172a, #881337 58%, #f97316);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.category-card p {
  color: #f8fafc;
  opacity: 0.88;
  font-size: 14px;
}

.category-accent {
  display: inline-flex;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 62px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.rank-poster {
  width: 76px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

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

.rank-copy h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

.rank-copy p {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.24), transparent 30%),
    linear-gradient(135deg, #020617, #111827 52%, #881337);
}

.page-hero-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 420px) 1fr;
  gap: 16px;
  align-items: center;
  margin: 0 0 24px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.filter-pill {
  border: 1px solid #fecdd3;
  border-radius: 999px;
  color: #be123c;
  background: #fff1f2;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

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

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

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

.detail-main-card,
.detail-side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-main-card {
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(244, 63, 94, 0.18), transparent 30%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.38));
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.play-button {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 20px 50px rgba(244, 63, 94, 0.35);
  padding: 14px 24px;
  font-weight: 950;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.detail-body {
  padding: 26px;
}

.detail-title {
  color: var(--text);
  font-size: clamp(34px, 5vw, 58px);
}

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

.prose {
  color: #334155;
}

.prose h2 {
  margin: 28px 0 10px;
  font-size: 24px;
  font-weight: 950;
  color: var(--text);
}

.prose p {
  margin: 0 0 16px;
}

.detail-side-card {
  padding: 18px;
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

.side-info {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.side-info div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 10px;
  color: #64748b;
  font-size: 14px;
}

.side-info strong {
  color: #111827;
}

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

.search-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.search-input-large {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 18px;
  outline: none;
  font-size: 17px;
}

.search-input-large:focus {
  border-color: rgba(244, 63, 94, 0.65);
  box-shadow: 0 0 0 5px rgba(244, 63, 94, 0.1);
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  margin-top: 56px;
}

.footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr repeat(2, 0.8fr);
  gap: 32px;
  padding: 44px 0;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-inner p,
.footer-inner a {
  color: #94a3b8;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 0;
  color: #94a3b8;
  text-align: center;
  font-size: 13px;
}

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

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

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

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

  .detail-side-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
  }

  .side-info {
    margin-top: 0;
  }
}

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

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 78px;
  }

  .hero-poster {
    max-width: 320px;
    transform: none;
  }

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

@media (max-width: 720px) {
  .hero-stage {
    min-height: 720px;
  }

  .section,
  .section-wide {
    padding: 40px 0;
  }

  .section-head,
  .filter-bar {
    display: block;
  }

  .filter-pills {
    justify-content: flex-start;
    margin-top: 12px;
  }

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

  .card-body {
    padding: 13px;
  }

  .ranking-item {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .ranking-item .btn {
    grid-column: 2 / -1;
    width: max-content;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .rank-poster {
    width: 62px;
  }

  .detail-side-card {
    display: block;
  }

  .side-poster {
    max-width: 240px;
  }
}

@media (max-width: 460px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-title {
    letter-spacing: -0.04em;
  }

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

  .action-row {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
