:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.10);
  --card: rgba(255, 255, 255, 0.92);
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

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

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

.brand {
  font-size: 22px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan), var(--teal));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.30);
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #eff6ff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 3px;
  background: #1e40af;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

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

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 48%, #14b8a6 100%);
}

.hero-track,
.hero-slide {
  min-height: 650px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.28;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.18)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.75), rgba(20, 184, 166, 0.48));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 58px;
  padding: 72px 0 82px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
}

.eyebrow.dark {
  background: #e0f2fe;
  color: #0369a1;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.4vw, 25px);
  line-height: 1.6;
}

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

.hero-tags span,
.detail-tags span,
.tag-line span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-btn,
.ghost-btn,
.panel-link,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  transition: 0.25s ease;
}

.primary-btn,
.home-search button {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.primary-btn.dark,
.home-search button,
.panel-link {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.primary-btn:hover,
.ghost-btn:hover,
.panel-link:hover,
.home-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.22);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 34px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 36px 90px rgba(15, 23, 42, 0.34);
  transform: rotate(2deg);
  transition: 0.3s ease;
}

.hero-poster:hover {
  transform: translateY(-6px) rotate(0deg);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.section,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 56px 0;
}

.page-main,
.detail-main {
  padding: 34px 0 20px;
}

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

.section-heading.compact,
.section-heading.inline {
  display: block;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
  color: #2563eb;
  font-weight: 900;
}

.search-entry {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  align-items: center;
  gap: 24px;
}

.home-search,
.filter-panel {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.home-search input,
.search-box input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  outline: none;
  background: #ffffff;
  color: #0f172a;
}

.home-search input {
  flex: 1;
  padding: 0 18px;
}

.filter-panel {
  align-items: end;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.filter-panel label {
  flex: 1 1 220px;
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}

.search-box input,
.filter-panel select {
  padding: 0 14px;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.05);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.35));
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  font-weight: 900;
}

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

.movie-title {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-meta {
  margin-top: 7px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.movie-card p {
  min-height: 43px;
  margin: 10px 0 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-line span {
  padding: 5px 8px;
  color: #0369a1;
  background: #e0f2fe;
}

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

.ranking-panel,
.article-card,
.category-overview,
.detail-hero,
.page-hero,
.player-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: 0.25s ease;
}

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

.rank-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-cover img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info strong {
  color: #0f172a;
}

.rank-info em {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 20px;
}

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

.category-card,
.category-overview {
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.category-card:hover,
.category-overview:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(37, 99, 235, 0.16);
}

.category-title,
.category-overview strong {
  font-size: 22px;
  font-weight: 900;
}

.category-desc,
.category-overview em {
  color: #64748b;
  font-style: normal;
  line-height: 1.6;
}

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

.category-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
}

.category-thumbs.wide img {
  aspect-ratio: 4 / 3;
}

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

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

.category-samples span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 48px;
  background:
    radial-gradient(circle at right top, rgba(6, 182, 212, 0.25), transparent 36%),
    linear-gradient(135deg, #ffffff, #eff6ff);
}

.page-hero.slim h1 {
  max-width: 820px;
  font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: #475569;
  font-size: 18px;
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 24px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a {
  color: #2563eb;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  padding: 30px;
  background:
    radial-gradient(circle at right top, rgba(6, 182, 212, 0.16), transparent 38%),
    #ffffff;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-info p {
  color: #475569;
  font-size: 18px;
  line-height: 1.75;
}

.detail-tags span {
  color: #0369a1;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.detail-meta-list li {
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
}

.detail-meta-list span,
.detail-meta-list strong {
  display: block;
}

.detail-meta-list span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.detail-meta-list strong {
  margin-top: 5px;
  color: #0f172a;
}

.detail-section {
  padding-bottom: 0;
}

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

.video-element {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
  outline: none;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.36), rgba(2, 6, 23, 0.72));
}

.play-overlay.hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #2563eb;
  font-size: 30px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.32);
}

.play-overlay strong {
  font-size: 20px;
}

.article-card {
  padding: 34px;
}

.article-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.article-card p {
  margin: 0 0 24px;
  color: #475569;
  font-size: 17px;
  line-height: 1.85;
}

.article-card p:last-child {
  margin-bottom: 0;
}

.empty-state {
  margin: 20px 0;
  padding: 18px;
  border-radius: 18px;
  color: #475569;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #64748b;
}

.footer-brand {
  color: #0f172a;
  font-size: 20px;
}

.hidden-card {
  display: none;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .search-entry,
  .split-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 34px;
    padding-top: 52px;
  }

  .hero-poster {
    width: min(330px, 78vw);
    margin: 0 auto;
  }

  .ranking-panel {
    position: static;
  }

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

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

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

  .brand {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide,
  .hero-content {
    min-height: 610px;
  }

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

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

  .hero-control {
    display: none;
  }

  .section {
    padding: 38px 0;
  }

  .section-heading,
  .footer-inner {
    display: grid;
    align-items: start;
  }

  .home-search {
    display: grid;
  }

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

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

  .movie-title {
    font-size: 15px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .page-hero,
  .detail-hero,
  .article-card {
    padding: 22px;
  }

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

@media (max-width: 420px) {
  .movie-grid,
  .home-grid,
  .compact-grid,
  .catalogue-grid,
  .rank-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }
}
