:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --orange: #f97316;
  --rose: #f43f5e;
  --pink: #ec4899;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  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(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 50%, #ecfeff 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.site-nav {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.3);
}

.brand-name {
  font-size: 22px;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

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

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

.nav-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #334155;
  background: #f1f5f9;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #ffffff;
  background: linear-gradient(110deg, #f97316 0%, #f43f5e 52%, #db2777 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.22), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.2));
}

.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(to top, #f8fafc, rgba(248, 250, 252, 0));
}

.hero-carousel {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 110px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 56px;
  min-height: 430px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.section-kicker {
  color: var(--rose);
  background: #fff1f2;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 20px 0 10px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.18;
  font-weight: 900;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: var(--rose);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn.mini {
  min-height: 40px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
}

.hero-poster {
  position: relative;
  display: block;
  width: min(100%, 390px);
  margin: 0 auto;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-radius: 18px;
  padding: 14px 16px;
  color: #ffffff;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

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

.hero-controls button {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 26px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section,
.split-section,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 62px 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 44px 0;
}

.content-panel,
.rank-panel,
.filter-panel,
.detail-card,
.side-card,
.side-poster,
.category-overview-card {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.content-panel,
.rank-panel {
  padding: 24px;
}

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

.section-heading h2,
.category-overview-head h2,
.filter-panel h2,
.side-card h2,
.detail-card h2 {
  margin: 8px 0 0;
  color: #1e293b;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 950;
}

.section-heading a,
.category-overview-head a {
  color: var(--blue);
  font-weight: 900;
}

.compact-heading h2 {
  font-size: 25px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(300px, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  padding: 22px;
}

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

.filter-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 0.56fr));
  gap: 12px;
}

.filter-controls label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

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

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

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0));
}

.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  font-size: 13px;
  font-weight: 900;
}

.movie-card-body {
  display: grid;
  gap: 5px;
  padding: 13px;
}

.movie-card-body strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card-body span,
.movie-card-body em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card[hidden],
.ranking-card[hidden] {
  display: none;
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #f43f5e 52%, #db2777);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(even) {
  background: linear-gradient(135deg, #2563eb, #7c3aed 52%, #db2777);
}

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

.category-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 950;
}

.category-card strong {
  display: block;
  min-height: 48px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.category-card em {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  font-style: normal;
}

.category-card em a {
  overflow: hidden;
  max-width: 100%;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 36px 62px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: #fff1f2;
}

.rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  font-weight: 950;
}

.rank-row img {
  width: 62px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-title strong,
.ranking-card strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-title em,
.ranking-card em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(110deg, #f97316, #f43f5e 55%, #db2777);
}

.small-hero > div {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 86px;
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 24px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 58px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-index.big {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  font-size: 18px;
}

.ranking-card img {
  width: 74px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-card span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ranking-card b {
  color: var(--rose);
}

.detail-shell {
  padding: 34px 0 60px;
}

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

.breadcrumb a {
  color: var(--blue);
  font-weight: 800;
}

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

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.24);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.play-action {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.66));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-action span {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 18px 40px rgba(244, 63, 94, 0.35);
  font-size: 30px;
}

.play-action strong {
  font-size: 20px;
  letter-spacing: 0.05em;
}

.play-action.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 950;
}

.detail-card .lead {
  margin: 0 0 20px;
  color: #475569;
  font-size: 19px;
}

.detail-card .detail-meta span {
  color: #334155;
  background: #f1f5f9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 26px;
}

.tag-list span {
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--rose);
  background: #fff1f2;
  font-size: 13px;
  font-weight: 800;
}

.detail-card p {
  color: #334155;
  font-size: 17px;
}

.detail-nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.detail-nav-links a {
  overflow: hidden;
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.side-poster,
.side-card {
  padding: 18px;
}

.side-poster img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-poster strong {
  display: block;
  margin-top: 14px;
  font-size: 20px;
  font-weight: 950;
}

.side-poster span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  border-radius: 12px;
  padding: 11px 12px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 800;
}

.related-section {
  width: 100%;
  padding-bottom: 0;
}

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

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

.footer-main p {
  max-width: 620px;
  margin: 14px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 12px 24px;
  align-content: center;
  font-weight: 800;
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .movie-grid,
  .featured-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .detail-side {
    position: static;
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .site-nav {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 11px 0;
  }

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

  .nav-menu {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-bottom: 8px;
  }

  .nav-menu.open {
    display: grid;
  }

  .nav-link {
    border-radius: 12px;
    padding: 11px 12px;
    background: #f8fafc;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 34px;
    text-align: left;
  }

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

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

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

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

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

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

@media (max-width: 620px) {
  .brand-name {
    font-size: 18px;
  }

  .hero-carousel {
    padding-top: 46px;
  }

  .hero-section {
    min-height: 720px;
  }

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

  .filter-controls,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .mini-grid,
  .related-grid,
  .category-grid,
  .ranking-grid,
  .detail-side,
  .detail-nav-links {
    grid-template-columns: 1fr 1fr;
  }

  .category-grid,
  .ranking-grid,
  .detail-side,
  .detail-nav-links {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .play-action span {
    width: 64px;
    height: 64px;
  }
}
