:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef5ff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #38bdf8;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  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%, var(--bg) 34%, #ffffff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

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

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.nav-link {
  padding: 10px 13px;
  color: #334155;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--blue);
  background: #eef5ff;
}

.mobile-toggle {
  display: none;
  border: 0;
  background: #eef5ff;
  color: var(--blue);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  padding: 10px 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
}

main,
.page-main,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 58px;
}

.hero-slider {
  position: relative;
  max-width: 1280px;
  min-height: 560px;
  margin: 24px auto 34px;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.24), transparent 32%),
    linear-gradient(110deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.74) 52%, rgba(30, 64, 175, 0.55));
}

.hero-content,
.hero-cover {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(191, 219, 254, 0.25);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  color: #fff;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.05;
}

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

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #1e3a8a;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-button,
.search-form button {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.28);
}

.ghost-button {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-cover {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 32px 60px rgba(0, 0, 0, 0.35);
  aspect-ratio: 3 / 4;
}

.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.panel,
.content-section,
.page-hero,
.detail-hero,
.player-card,
.detail-content {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 20px;
  align-items: center;
  padding: 28px;
  margin-bottom: 30px;
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  color: #0f172a;
}

.quick-search p,
.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input,
.filter-input,
.filter-selects select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px 15px;
  color: #0f172a;
  background: #fff;
  outline: none;
  font-size: 15px;
}

.search-form input:focus,
.filter-input:focus,
.filter-selects select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.25);
}

.content-section {
  padding: 28px;
  margin: 30px 0;
}

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

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-more {
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.card-body h3 a:hover,
.rank-content h3 a:hover,
.detail-meta a:hover {
  color: var(--blue);
}

.card-body p {
  min-height: 48px;
  margin: 9px 0 14px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

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

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

.category-card {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

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

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

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  max-width: 280px;
  margin: 12px 0 0;
  color: #dbeafe;
  line-height: 1.65;
  font-size: 14px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 28px 0 30px;
  padding: 46px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.24), transparent 34%),
    linear-gradient(135deg, #0f172a, #1e3a8a 58%, #2563eb);
}

.page-hero h1 {
  margin-top: 16px;
  color: #fff;
  font-size: clamp(32px, 4vw, 54px);
}

.page-hero p {
  max-width: 780px;
  color: #dbeafe;
  font-size: 17px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  margin-bottom: 22px;
}

.filter-selects {
  display: flex;
  gap: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 74px minmax(0, 1fr) 80px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

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

.rank-poster {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 3 / 4;
  background: #dbeafe;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-content p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.55;
}

.rank-meta {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.heat {
  justify-self: end;
  color: var(--blue);
  font-size: 22px;
  font-weight: 950;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--blue);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  background: #dbeafe;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info .hero-kicker {
  color: var(--blue);
  background: #eef5ff;
  border-color: #bfdbfe;
}

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.12;
}

.lead {
  margin: 0;
  color: #475569;
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  color: #475569;
  font-weight: 700;
}

.player-card {
  padding: 24px;
  margin-top: 30px;
  background: #0f172a;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.72));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

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

.big-play {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
}

.detail-content {
  padding: 30px;
  margin: 30px 0;
}

.detail-content h2 {
  margin-top: 26px;
  font-size: 26px;
}

.detail-content h2:first-child {
  margin-top: 0;
}

.detail-content p {
  color: #334155;
  line-height: 1.9;
  font-size: 17px;
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.site-footer p {
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: #60a5fa;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 22px 26px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

  .mobile-toggle {
    display: inline-grid;
  }

  .hero-slide {
    grid-template-columns: 1fr 260px;
    padding: 48px;
  }

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

@media (max-width: 780px) {
  main,
  .page-main,
  .detail-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-slider {
    min-height: 760px;
    margin-top: 14px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 36px 22px 70px;
  }

  .hero-cover {
    max-width: 220px;
    justify-self: center;
  }

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

  .search-form,
  .filter-selects {
    flex-direction: column;
  }

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

  .content-section,
  .page-hero,
  .detail-hero,
  .player-card,
  .detail-content,
  .quick-search {
    padding: 20px;
    border-radius: 20px;
  }

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

  .rank-row {
    grid-template-columns: 44px 62px minmax(0, 1fr);
  }

  .heat {
    grid-column: 3;
    justify-self: start;
    font-size: 16px;
  }
}

@media (max-width: 460px) {
  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

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

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