:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --brand: #2563eb;
  --brand-dark: #0f3b8f;
  --cyan: #06b6d4;
  --gold: #f59e0b;
  --dark: #020617;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 35%, #f8fafc 100%);
  min-height: 100vh;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #020617 0%, #0f3b8f 48%, #020617 100%);
  box-shadow: 0 18px 35px rgba(2, 6, 23, 0.25);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 24px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 12px 24px rgba(34, 211, 238, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 19px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #dbeafe, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: #93c5fd;
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: #dbeafe;
  border-radius: 12px;
  padding: 10px 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.55);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

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

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

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

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

.hero-bg {
  position: fixed;
  inset: 0;
  opacity: 0.26;
  filter: blur(2px) saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 35%, rgba(37, 99, 235, 0.48), transparent 38%), linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.8) 52%, rgba(2, 6, 23, 0.96));
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 720px;
}

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

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-summary {
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.primary-button,
.quick-search button {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
}

.ghost-button {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.quick-search button:hover,
.filter-bar button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  height: 520px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.42));
  z-index: 1;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #22d3ee;
}

.quick-search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: -38px auto 0;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 700;
}

.quick-search div {
  display: flex;
  gap: 12px;
}

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

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

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

.quick-links a {
  padding: 12px 16px;
  color: var(--brand-dark);
  background: #eff6ff;
  border-radius: 14px;
  font-weight: 800;
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 54px auto;
}

.dark-section {
  width: 100%;
  max-width: none;
  padding: 58px max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #0f172a, #0f3b8f 48%, #020617);
  color: #ffffff;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.dark-section .section-heading p {
  color: #bfdbfe;
}

.section-more {
  flex: none;
  color: var(--brand);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.poster-link img {
  transition: transform 0.3s ease;
}

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

.play-corner,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.play-corner {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: rgba(37, 99, 235, 0.92);
  font-size: 13px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--brand);
}

.meta-line {
  margin: 8px 0;
  color: #2563eb;
  font-weight: 700;
  font-size: 13px;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card,
.category-overview-card a {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 230px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.16);
  transition: transform 0.22s ease, background 0.22s ease;
}

.category-overview-card a {
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.category-card:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.18);
}

.category-overview-card a:hover {
  background: #f8fbff;
}

.category-posters,
.overview-posters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  height: 120px;
}

.overview-posters {
  grid-template-columns: repeat(4, 1fr);
}

.category-posters img,
.overview-posters img {
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a, #020617);
}

.category-card strong,
.category-overview-card h2 {
  font-size: 20px;
  margin: 0;
}

.category-card span,
.category-overview-card p {
  color: #bfdbfe;
  line-height: 1.6;
}

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

.category-overview-card span {
  color: var(--brand);
  font-weight: 900;
}

.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  border-radius: 32px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 22% 28%, rgba(34, 211, 238, 0.34), transparent 30%), linear-gradient(135deg, #0f172a, #0f3b8f 55%, #020617);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 56px;
}

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

.category-hero p,
.slim-hero p,
.rank-hero p {
  max-width: 760px;
  color: #dbeafe;
  line-height: 1.8;
}

.rank-hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: center;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #bfdbfe;
  font-weight: 800;
  margin-bottom: 28px;
}

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

.detail-hero {
  padding: 32px;
}

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

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.detail-one-line {
  margin: 20px 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-meta dt {
  color: #93c5fd;
  font-size: 13px;
  margin-bottom: 5px;
}

.detail-meta dd {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
}

.detail-tags span {
  color: #ecfeff;
  background: rgba(34, 211, 238, 0.18);
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.38);
  font-size: 34px;
  padding-left: 5px;
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(20px, 4vw, 34px);
  text-align: center;
}

.article-block {
  padding: 34px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.article-block p {
  margin: 0 0 28px;
  color: #334155;
  line-height: 2;
  font-size: 17px;
}

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

.compact-card .poster-link {
  aspect-ratio: 16 / 10;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 190px 160px 110px;
  gap: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.filter-bar button {
  background: #eff6ff;
  color: var(--brand-dark);
}

.movie-card.is-hidden {
  display: none;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

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

.site-footer p,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.8;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .featured-grid,
  .all-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-poster {
    height: 440px;
  }
}

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

  .menu-button {
    display: block;
  }

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

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 42px 0 80px;
  }

  .hero-poster {
    height: 360px;
    max-width: 270px;
  }

  .quick-search-panel,
  .rank-hero,
  .detail-layout,
  .footer-inner,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    padding: 36px 24px;
  }

  .detail-layout {
    align-items: start;
  }

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

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

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

  .brand-text small {
    display: none;
  }

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

  .content-section {
    margin: 38px auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-search div {
    flex-direction: column;
  }

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

  .movie-card h3 {
    font-size: 16px;
  }

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

  .article-block {
    padding: 24px;
  }
}
