:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #0891b2;
  --dark: #020617;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32rem), var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

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

.nav-link,
.mobile-cat-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #334155;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-cat-link:hover {
  color: var(--blue);
  background: #dbeafe;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

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

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) 360px;
  align-items: center;
  gap: 48px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.22), transparent 28rem);
}

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

.eyebrow {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.inner-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc {
  width: min(680px, 100%);
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 20px;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin: 26px 0 0;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.ghost-button,
.text-button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-button.dark {
  color: var(--blue);
  background: #dbeafe;
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.filter-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

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

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.search-band,
.page-section,
.filter-bar,
.content-section,
.player-section,
.inner-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-band {
  position: relative;
  z-index: 2;
  margin-top: -42px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.search-panel,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-panel label,
.filter-bar label {
  font-weight: 800;
  white-space: nowrap;
}

.search-panel input,
.filter-bar input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  outline: none;
}

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

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

.hero-mini-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--blue);
  background: #dbeafe;
  font-weight: 800;
}

.page-section {
  padding: 64px 0 0;
}

.soft-section {
  padding-bottom: 64px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

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

.section-more,
.text-button {
  color: var(--blue);
  font-weight: 800;
}

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

.category-card,
.category-overview-card {
  min-height: 170px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(even) {
  background: linear-gradient(135deg, #7c3aed, var(--blue));
}

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

.category-name {
  font-size: 14px;
  color: #bfdbfe;
  font-weight: 800;
}

.category-card strong {
  font-size: 19px;
  line-height: 1.3;
}

.category-card small {
  color: #e0f2fe;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.movie-info {
  padding: 14px;
}

.movie-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-info h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.movie-info h2 a:hover {
  color: var(--blue);
}

.movie-line {
  min-height: 44px;
  margin: 8px 0 10px;
  color: #475569;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  color: var(--blue);
  background: #dbeafe;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 112px 1fr;
}

.movie-card.compact .poster-wrap img {
  height: 100%;
  min-height: 170px;
}

.movie-card.compact .movie-line {
  min-height: auto;
}

.inner-hero,
.detail-hero {
  margin-top: 34px;
  padding: 54px;
  border-radius: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, var(--blue) 58%, var(--cyan));
  box-shadow: var(--shadow);
}

.inner-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.category-overview-card {
  min-height: 260px;
  color: var(--text);
  background: var(--surface);
}

.category-overview-card h2 {
  margin: 0;
  font-size: 26px;
}

.category-overview-card p {
  color: var(--muted);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--blue);
  background: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar {
  margin-top: 28px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: 40px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb {
  margin: 0 0 12px;
  color: #bfdbfe;
  font-size: 14px;
}

.detail-line {
  max-width: 760px;
  color: #dbeafe;
  font-size: 19px;
}

.detail-meta {
  margin-top: 22px;
}

.detail-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin-top: 14px;
}

.player-section {
  padding-top: 44px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.48));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  font-size: 36px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.32);
}

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

.content-section {
  padding-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.story-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: #334155;
}

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

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

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

.hidden-by-filter {
  display: none !important;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr 280px;
  }
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero,
  .hero-stage {
    min-height: 740px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: 34px 0 80px;
  }

  .hero-poster {
    width: 220px;
    justify-self: start;
  }

  .search-band,
  .filter-bar,
  .content-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .search-band,
  .search-panel,
  .filter-bar {
    align-items: stretch;
  }

  .search-panel,
  .filter-bar {
    flex-direction: column;
  }

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

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

  .movie-card.compact {
    grid-template-columns: 96px 1fr;
  }

  .inner-hero,
  .detail-hero {
    padding: 32px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .search-band,
  .page-section,
  .filter-bar,
  .content-section,
  .player-section,
  .inner-hero,
  .detail-hero {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero-desc,
  .detail-line {
    font-size: 16px;
  }

  .movie-grid {
    gap: 12px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-line {
    display: none;
  }
}
