:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #e5e7eb;
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --accent: #06b6d4;
  --orange: #f97316;
  --gold: #eab308;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

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);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  max-width: 1180px;
  height: 70px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.28);
}

.brand-text {
  font-size: 22px;
  color: var(--ink);
}

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

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #eef6ff;
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--brand-dark);
  border-radius: 20px;
}

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

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

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  background: #082f49;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(120deg, rgba(2, 132, 199, 0.94), rgba(3, 105, 161, 0.86), rgba(15, 23, 42, 0.82)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15), transparent 28%), radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.28), transparent 26%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
  color: white;
}

.hero-copy h1 {
  margin: 12px 0 20px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  font-size: clamp(18px, 2vw, 24px);
  color: #dff6ff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.28);
}

.primary-btn.light {
  color: var(--brand-dark);
  background: white;
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.34);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-dots button.active {
  width: 34px;
  background: white;
}

.stats-panel {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 48px));
  margin: -48px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stats-panel div {
  padding: 24px;
  text-align: center;
  background: white;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.stats-panel strong {
  display: block;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.stats-panel span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.section-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading.centered {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

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

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

.text-link {
  color: var(--brand);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0ea5e9);
}

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

.compact-card .poster-wrap img {
  height: 210px;
}

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

.poster-tag,
.rank-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 10px;
  color: white;
  background: rgba(2, 132, 199, 0.9);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.rank-badge {
  left: 14px;
  right: auto;
  background: rgba(249, 115, 22, 0.95);
}

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

.movie-card-body h2 {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-card .movie-card-body h2 {
  min-height: 46px;
  font-size: 16px;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.category-band,
.soft-section {
  background: linear-gradient(180deg, #f8fafc, #eef6ff);
}

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

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

.category-tile {
  min-height: 212px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-icon {
  font-size: 36px;
}

.category-tile strong {
  margin-top: 12px;
  color: var(--ink);
  font-size: 20px;
}

.category-tile small {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.category-tile em {
  align-self: flex-start;
  padding: 5px 10px;
  color: var(--brand-dark);
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 110px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.list-rank {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border-radius: 12px;
}

.rank-row img {
  width: 110px;
  height: 96px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-row h2 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.rank-row p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-row span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.cta-strip {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 76px;
  padding: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #1d4ed8);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.cta-strip h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 42px);
}

.cta-strip p {
  margin: 0;
  color: #dff6ff;
}

.page-hero {
  color: white;
  background: linear-gradient(135deg, #0284c7, #1d4ed8 58%, #0f172a);
}

.small-hero {
  padding: 86px 24px;
}

.page-hero > div {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.page-hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #dff6ff;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  color: var(--ink);
  font-weight: 900;
}

.filter-panel input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  color: var(--ink);
  font-size: 15px;
  outline: 0;
}

.filter-panel input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.filter-panel span {
  color: var(--muted);
  font-weight: 800;
}

.detail-page {
  background: linear-gradient(180deg, #f8fafc, #eef6ff);
}

.detail-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 86px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--brand);
  font-weight: 800;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card,
.detail-card,
.info-card,
.related-card {
  overflow: hidden;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
}

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

.movie-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.56));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  background: rgba(2, 132, 199, 0.92);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(2, 132, 199, 0.3);
  font-size: 34px;
}

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

.detail-card {
  padding: 28px;
}

.detail-category {
  display: inline-flex;
  padding: 6px 12px;
  color: var(--brand-dark);
  background: #e0f2fe;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-meta span {
  padding: 6px 10px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.detail-card h2,
.info-card h2,
.related-card h2 {
  margin: 26px 0 12px;
  color: var(--ink);
  font-size: 22px;
}

.detail-card p {
  margin: 0 0 14px;
  color: #334155;
}

.detail-card blockquote {
  margin: 0;
  padding: 18px;
  color: #334155;
  background: #f8fafc;
  border-left: 4px solid var(--brand);
  border-radius: 16px;
}

.detail-side {
  display: grid;
  gap: 24px;
}

.info-card,
.related-card {
  padding: 22px;
}

.info-card h2,
.related-card h2 {
  margin-top: 0;
}

.info-card dl {
  margin: 0;
}

.info-card div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-card div:last-child {
  border-bottom: 0;
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  font-weight: 800;
}

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

.related-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 16px;
}

.related-item h2 {
  display: -webkit-box;
  margin: 0 0 5px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.related-item span {
  display: inline-flex;
  padding: 3px 8px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

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

.ranking-main {
  display: grid;
  gap: 16px;
}

.ranking-side {
  position: sticky;
  top: 92px;
  padding: 22px;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.ranking-side h2 {
  margin: 0 0 16px;
}

.ranking-side a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: #334155;
  font-weight: 800;
}

.ranking-side a:last-child {
  border-bottom: 0;
}

.ranking-side em {
  color: var(--brand);
  font-style: normal;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-logo .brand-text {
  color: white;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #94a3b8;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 16px;
}

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

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
}

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

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

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

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

  .hero-content {
    grid-template-columns: 1fr 300px;
    gap: 34px;
  }

  .hero-poster img {
    height: 430px;
  }
}

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

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

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-poster img {
    height: 360px;
  }

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

  .featured-grid,
  .card-grid,
  .category-movie-grid,
  .compact-grid,
  .rated-grid,
  .rank-grid,
  .large-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid,
  .ranking-layout,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .ranking-side {
    position: static;
  }
}

@media (max-width: 620px) {
  .nav-shell,
  .section-shell,
  .detail-shell,
  .stats-panel,
  .cta-strip,
  .footer-shell {
    width: calc(100% - 32px);
  }

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

  .hero-content {
    width: calc(100% - 32px);
  }

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

  .hero-copy p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-actions,
  .page-hero-actions,
  .cta-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .stats-panel,
  .featured-grid,
  .card-grid,
  .category-movie-grid,
  .compact-grid,
  .rated-grid,
  .rank-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: auto 92px minmax(0, 1fr);
  }

  .rank-row img {
    width: 92px;
    height: 92px;
  }

  .detail-card,
  .info-card,
  .related-card {
    padding: 20px;
  }
}
