:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #0f172a;
  --card: #ffffff;
  --text: #e5f1ff;
  --muted: #94a3b8;
  --dark: #0f172a;
  --light: #f8fafc;
  --cyan: #0891b2;
  --cyan-light: #22d3ee;
  --blue: #2563eb;
  --line: rgba(148, 163, 184, 0.22);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
  --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(--dark);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 42%, #f8fafc 100%);
}

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;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.header-inner {
  max-width: 1280px;
  height: 70px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.28);
}

.brand-text,
.footer-brand {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

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

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

.header-search,
.mobile-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #dbe7f3;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
  color: #0f172a;
  outline: none;
}

.header-search input {
  width: 210px;
  padding: 10px 13px;
}

.header-search button,
.mobile-search button,
.filter-bar button {
  border: 0;
  border-radius: 14px;
  padding: 10px 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

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

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 14px 24px 22px;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  padding: 11px 12px;
  border-radius: 14px;
  color: #334155;
  font-weight: 700;
  background: #f8fafc;
}

.hero-carousel {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.26), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.64) 46%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 112px 24px 82px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span:first-child {
  background: var(--cyan);
  color: #fff;
}

.hero-tags span:not(:first-child),
.detail-meta span {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  max-width: 720px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.wide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.26);
}

.ghost-btn {
  padding: 12px 18px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.wide-link:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.category-strip {
  margin-top: -34px;
  position: relative;
  z-index: 8;
  padding: 0 24px;
}

.strip-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.strip-inner strong,
.strip-inner a {
  white-space: nowrap;
}

.strip-inner a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #075985;
  background: #ecfeff;
  font-weight: 800;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
}

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

.eyebrow {
  margin: 0 0 7px;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.rank-head h2,
.page-hero h1,
.detail-info h1,
.article-card h2 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.section-head h2,
.rank-head h2 {
  font-size: 32px;
}

.section-more,
.wide-link {
  color: #0369a1;
  padding: 10px 14px;
  background: #e0f2fe;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(226, 232, 240, 0.96);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(8, 145, 178, 0.34);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
  padding: 15px;
}

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

.card-body h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  min-height: 45px;
  margin: 0 0 12px;
  color: #64748b;
  line-height: 1.6;
  font-size: 14px;
}

.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
}

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

.rank-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.32), transparent 34%),
    linear-gradient(160deg, #0f172a, #111827 62%, #075985);
  box-shadow: var(--shadow);
}

.rank-panel h2,
.rank-panel .eyebrow {
  color: #fff;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 32px 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
}

.compact-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: rgba(34, 211, 238, 0.28);
  font-weight: 900;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  color: #fff;
  line-height: 1.35;
}

.compact-card em {
  margin-top: 5px;
  color: #bae6fd;
  font-style: normal;
  font-size: 12px;
}

.rank-panel .wide-link {
  width: 100%;
  margin-top: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.page-hero {
  max-width: 1280px;
  margin: 34px auto 0;
  padding: 64px 24px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
}

.page-hero > div:first-child {
  max-width: 780px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 60px);
}

.page-hero p:not(.eyebrow) {
  color: #64748b;
  font-size: 18px;
  line-height: 1.8;
}

.small-hero,
.category-hero {
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.26), transparent 35%),
    linear-gradient(135deg, #0f172a, #0e7490 58%, #1d4ed8);
  box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1,
.small-hero p,
.category-hero p {
  color: #fff !important;
}

.filter-bar {
  flex: 0 0 390px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.filter-bar input,
.filter-bar select {
  min-width: 0;
  padding: 12px;
  flex: 1 1 auto;
}

.filter-bar select {
  max-width: 140px;
}

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

.category-card {
  padding: 24px;
  border-radius: 26px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.category-title {
  display: inline-flex;
  margin-bottom: 10px;
  color: #0369a1;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 16px;
  color: #64748b;
  line-height: 1.8;
}

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

.mini-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: #f1f5f9;
  font-weight: 700;
  font-size: 13px;
}

.empty-state {
  display: none;
  margin: 30px 0 0;
  padding: 20px;
  border-radius: 18px;
  text-align: center;
  color: #64748b;
  background: #fff;
}

.empty-state.show {
  display: block;
}

.detail-hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  filter: blur(2px);
}

.detail-cover {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.84) 45%, rgba(2, 6, 23, 0.56)),
    linear-gradient(0deg, #020617, transparent 45%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 92px 24px 64px;
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 30px;
  color: #cbd5e1;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

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

.detail-info h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 64px);
}

.lead-text {
  max-width: 820px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0 24px;
}

.player-section {
  max-width: 1280px;
  margin: -54px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 48px rgba(8, 145, 178, 0.4);
  font-size: 32px;
}

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

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

.detail-content {
  padding-top: 42px;
}

.article-card {
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.article-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
}

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 24px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
}

.footer-inner p {
  margin: 12px 0 0;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #cbd5e1;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--cyan-light);
}

@media (max-width: 1180px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
    margin-left: auto;
  }

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    padding: 92px 18px 76px;
  }

  .hero-control {
    display: none;
  }

  .content-section {
    padding: 38px 16px;
  }

  .movie-grid,
  .large-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }

  .page-hero {
    margin: 20px 16px 0;
    padding: 38px 18px;
    display: block;
  }

  .filter-bar {
    margin-top: 22px;
    flex: 1 1 auto;
  }

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

  .detail-poster {
    width: min(260px, 72vw);
  }

  .detail-inner {
    padding: 78px 18px 88px;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

  .hero-content p {
    font-size: 16px;
  }

  .movie-grid,
  .large-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    display: grid;
  }

  .filter-bar select {
    max-width: none;
  }
}
