:root {
  --bg: #f8fbff;
  --ink: #111827;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --blue: #2563eb;
  --deep: #0f172a;
  --card: rgba(255, 255, 255, 0.9);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32rem), linear-gradient(135deg, #f8fafc 0%, #eef6ff 48%, #f1f5f9 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
}

.logo-text strong,
.footer-logo {
  display: block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link,
.mobile-link {
  color: #334155;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.mobile-nav {
  display: none;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 12px;
}

.mobile-link {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 14px;
}

.hero-section {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--deep);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.1)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 46%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2));
  bottom: 80px;
  width: min(720px, calc(100% - 48px));
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--blue);
}

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

.hero-desc {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(226, 232, 240, 0.95);
  font-size: 19px;
  line-height: 1.8;
}

.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: 5px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-btn,
.panel-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.primary-btn.slim {
  min-height: 40px;
  padding: 0 18px;
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1240px) / 2));
  bottom: 48px;
  display: flex;
  gap: 10px;
}

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

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

.home-search-section,
.content-section,
.page-main,
.detail-main {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.home-search-section {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.content-section {
  padding-top: 52px;
  padding-bottom: 22px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-head a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.section-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.compact-head,
.small-head {
  display: block;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: var(--ink);
  background: #fff;
}

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

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

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

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

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

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

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

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

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

.poster-duration,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.poster-duration {
  right: 10px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-badge {
  left: 10px;
  min-width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-info h3 a {
  color: var(--ink);
  text-decoration: none;
}

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

.movie-meta,
.movie-desc {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.movie-desc {
  min-height: 44px;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: start;
  gap: 32px;
}

.ranking-panel,
.detail-side,
.detail-article,
.category-overview-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(241, 245, 249, 0.78);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #eaf2ff;
}

.rank-item img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #dbeafe;
}

.rank-item strong,
.rank-item small {
  display: block;
}

.rank-item strong {
  line-height: 1.35;
}

.rank-item small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.top-index {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.panel-more {
  width: 100%;
  margin-top: 16px;
  color: #fff;
  background: var(--deep);
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 20px;
  border-radius: 28px;
  color: #fff;
  text-decoration: none;
  background: var(--deep);
  box-shadow: var(--shadow);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.08));
}

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

.category-card strong,
.category-card small {
  display: block;
}

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

.category-card small {
  margin-top: 8px;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.6;
}

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

.page-main,
.detail-main {
  padding-top: 34px;
  padding-bottom: 56px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  padding: 56px;
  border-radius: 34px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #60a5fa);
  box-shadow: var(--shadow);
}

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

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(239, 246, 255, 0.92);
  font-size: 18px;
  line-height: 1.8;
}

.slim-hero {
  margin-bottom: 24px;
}

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 24px;
  padding: 24px;
}

.category-overview-text h2 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 900;
}

.category-overview-text h2 a {
  color: var(--ink);
  text-decoration: none;
}

.category-overview-text p {
  color: var(--muted);
  line-height: 1.8;
}

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

.page-list-section {
  padding-left: 0;
  padding-right: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: center;
  padding: 32px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  background: #dbeafe;
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.18);
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-line {
  max-width: 780px;
  margin: 18px 0;
  color: #334155;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 9px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  font-size: 13px;
}

.detail-tags {
  margin-bottom: 22px;
}

.player-section {
  margin-top: 34px;
  padding: 26px;
  border-radius: 34px;
  background: linear-gradient(135deg, #020617, #0f172a);
  box-shadow: var(--shadow);
}

.light-head h2 {
  color: #fff;
}

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

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

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

.player-cover.is-hidden {
  display: none;
}

.play-bubble {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.46);
  font-size: 30px;
  text-indent: 5px;
}

.player-cover strong {
  font-size: 22px;
}

.detail-text-section {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 28px;
  margin-top: 34px;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

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

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

.neighbor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.neighbor-links a {
  padding: 12px 16px;
  border-radius: 999px;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 900;
  background: #eff6ff;
}

[hidden] {
  display: none !important;
}

.site-footer {
  margin-top: 36px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.footer-inner p {
  max-width: 680px;
  margin: 12px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 800;
}

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

  .mobile-nav {
    display: flex;
  }

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

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

  .two-column,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

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

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

  .logo-text small {
    display: none;
  }

  .hero-section {
    height: 76vh;
    min-height: 560px;
  }

  .hero-content {
    bottom: 70px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 32px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .section-head a {
    display: inline-block;
    margin-top: 8px;
  }

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

  .category-grid,
  .category-preview-strip {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .detail-hero,
  .player-section,
  .detail-article,
  .detail-side {
    padding: 20px;
    border-radius: 24px;
  }

  .detail-cover {
    max-width: 300px;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .large-grid,
  .compact-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    border-radius: 18px;
  }

  .movie-poster {
    aspect-ratio: 16 / 10;
  }
}
