:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --rose: #e11d48;
  --teal: #0d9488;
  --emerald: #059669;
  --dark: #0f172a;
  --dark-soft: #111827;
  --shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.nav-wrap,
.strip-inner,
.footer-grid,
.footer-bottom,
.content-section,
.detail-wrap,
.search-band,
.rank-panel,
.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--brand);
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #4b5563;
  font-weight: 650;
}

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
}

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

.mobile-panel {
  padding: 12px 24px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  font-weight: 650;
  color: #475569;
}

.category-strip {
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.strip-inner {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  overflow-x: auto;
}

.strip-inner a {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  color: #475569;
  background: #ffffff;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease;
}

.strip-inner a:hover {
  color: #ffffff;
  background: var(--brand);
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(120deg, #0f172a, #334155);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.85s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-slide img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 32%, rgba(37, 99, 235, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.48) 48%, rgba(2, 6, 23, 0.12)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 96px 0 82px;
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: #60a5fa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 20px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  color: #475569;
  background: #eef2ff;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.site-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  border: 0;
  color: #ffffff;
  background: var(--emerald);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover,
.site-search button:hover {
  transform: translateY(-1px);
  background: #047857;
  box-shadow: 0 14px 24px rgba(5, 150, 105, 0.25);
}

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

.ghost-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.24);
}

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

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

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

.search-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: -36px;
  position: relative;
  z-index: 10;
  padding: 20px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.site-search {
  flex: 1;
  display: flex;
  gap: 12px;
}

.site-search input,
.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.site-search input {
  flex: 1;
}

.site-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  background: var(--surface-soft);
  font-weight: 700;
}

.content-section,
.rank-panel {
  padding: 72px 0;
}

.gradient-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #f0fdfa, #ecfeff);
}

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

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--brand);
  font-weight: 800;
}

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

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

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

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #111827;
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(8px);
}

.play-chip {
  inset: 50% auto auto 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 28px;
  border-radius: 10px;
  background: var(--rose);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #64748b;
  font-size: 13px;
}

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

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.category-card {
  min-height: 190px;
  padding: 22px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.3s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.16));
  z-index: 1;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 24px;
  font-weight: 900;
}

.category-card em {
  margin-top: 8px;
  font-style: normal;
  color: #e5e7eb;
}

.rank-section {
  background: #ffffff;
}

.rank-panel {
  padding-top: 42px;
}

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

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

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
  margin-top: 36px;
  margin-bottom: 28px;
  padding: 48px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.28), transparent 30%),
    linear-gradient(135deg, #0f172a, #334155);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.slim-hero {
  min-height: 260px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.advanced-filter {
  grid-template-columns: 1fr 180px 180px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pager a {
  min-width: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  text-align: center;
  color: #475569;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  font-weight: 800;
}

.pager a.active,
.pager a:hover {
  color: #ffffff;
  background: var(--brand);
}

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

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

.category-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.category-title-row h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
}

.category-title-row a:last-child {
  color: var(--brand);
  font-weight: 800;
}

.category-overview-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

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

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

.mini-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: #eef2ff;
}

.mini-card img {
  grid-row: span 2;
  width: 72px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.mini-card span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.mini-card em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-main {
  background: #ffffff;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: var(--dark);
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.02);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  padding: 48px 0 72px;
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  color: #dbeafe;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.42);
}

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

.detail-info h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 820px;
  color: #e5e7eb;
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.16);
}

.player-section {
  background: #0f172a;
  padding: 54px 0;
}

.player-card {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 28px 50px rgba(2, 6, 23, 0.4);
}

.video-shell {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.55));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.26);
  font-size: 36px;
  text-indent: 6px;
}

.video-shell.is-playing .play-overlay {
  display: none;
}

.player-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: #ffffff;
}

.player-title-row h2 {
  margin: 0;
  font-size: 22px;
}

.player-title-row span {
  color: #cbd5e1;
}

.detail-text {
  max-width: 980px;
}

.detail-text h2 {
  margin: 0 0 16px;
  font-size: 30px;
  font-weight: 900;
}

.detail-text p {
  margin: 0 0 30px;
  color: #475569;
  font-size: 18px;
  line-height: 1.9;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 36px;
  padding: 56px 0;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
  margin-bottom: 16px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
}

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

@media (max-width: 1024px) {
  .movie-grid,
  .compact-grid,
  .rank-list,
  .category-grid,
  .wide-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .main-nav,
  .category-strip {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .logo {
    font-size: 20px;
  }

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

  .hero-content {
    padding: 72px 0 72px;
  }

  .hero-text,
  .lead {
    font-size: 17px;
  }

  .search-band,
  .section-heading,
  .player-title-row,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .site-search,
  .quick-links {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .rank-list,
  .category-grid,
  .category-overview-grid,
  .mini-grid,
  .wide-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar,
  .advanced-filter {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 22px;
  }

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

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

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

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .rank-list,
  .category-grid,
  .category-overview-grid,
  .mini-grid,
  .wide-mini-grid {
    grid-template-columns: 1fr;
  }

  .site-search {
    flex-direction: column;
  }

  .hero-content h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .play-overlay span {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
