:root {
  --bg: #f8fafc;
  --bg-soft: #eff6ff;
  --bg-cyan: #ecfeff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --blue-dark: #1d4ed8;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 30px rgba(37, 99, 235, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-soft) 48%, var(--bg-cyan) 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

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

.brand-text {
  font-size: 1.22rem;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #334155;
  transition: all 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.hero {
  position: relative;
  height: min(720px, calc(100vh - 68px));
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 26%, rgba(6, 182, 212, 0.25), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.90) 0%, rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.45), transparent 40%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 700px;
  padding: 48px 0;
  color: #ffffff;
  animation: fadeUp 0.7s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 16px 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.card-tags,
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span,
.feature-pills span {
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  color: #cffafe;
  background: rgba(8, 145, 178, 0.28);
  border: 1px solid rgba(103, 232, 249, 0.28);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

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

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

.ghost-button.light {
  color: var(--blue-dark);
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(255, 255, 255, 0.78);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  color: #ffffff;
  font-size: 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.search-panel,
.page-hero,
.search-workspace,
.detail-card,
.side-card,
.feature-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel {
  position: relative;
  margin-top: -54px;
  z-index: 8;
  border-radius: 26px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 22px;
  align-items: center;
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-card h1,
.detail-card h2,
.side-card h2,
.feature-panel h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.search-panel p,
.section-head p,
.page-hero p,
.feature-panel p,
.category-card p,
.category-overview-card p,
.movie-card p,
.rank-item p,
.detail-card p {
  color: var(--muted);
  line-height: 1.75;
}

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

.search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.search-form button {
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.quick-links,
.mini-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links {
  grid-column: 1 / -1;
}

.quick-links a,
.mini-links a,
.footer-links a,
.text-link,
.section-more,
.card-bottom a {
  color: var(--blue-dark);
  font-weight: 800;
}

.quick-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #dbeafe;
}

.content-section {
  padding: 62px 0 0;
}

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

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.45rem);
}

.section-head p {
  margin: 8px 0 0;
}

.movie-grid,
.category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.category-card,
.category-overview-card,
.rank-item {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.category-overview-card:hover,
.rank-item:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 22px 55px rgba(37, 99, 235, 0.15);
}

.movie-card {
  border-radius: 22px;
  overflow: hidden;
}

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

.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);
}

.duration-badge,
.poster-play,
.rank-number {
  position: absolute;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
}

.duration-badge {
  right: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 800;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: all 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3,
.rank-item h3,
.category-card h3,
.category-overview-card h2 {
  margin: 8px 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover,
.category-card h3 a:hover,
.category-overview-card h2 a:hover {
  color: var(--blue);
}

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #64748b;
  font-size: 0.84rem;
}

.meta-line span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-tags span,
.detail-tags span,
.feature-pills span {
  color: #0369a1;
  background: #e0f2fe;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.rating {
  color: #f59e0b;
  font-weight: 900;
}

.category-card {
  border-radius: 22px;
  padding: 22px;
}

.category-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  border-radius: 22px;
  padding: 14px;
}

.large-rank-list .rank-item {
  grid-template-columns: 54px 150px minmax(0, 1fr);
  align-items: center;
}

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

.rank-poster {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

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

.feature-panel {
  position: sticky;
  top: 92px;
  border-radius: 28px;
  padding: 28px;
}

.feature-panel h2 {
  font-size: 2rem;
}

.feature-panel .primary-button {
  margin-top: 24px;
}

.page-hero {
  margin-top: 34px;
  border-radius: 30px;
  padding: 44px;
  background:
    radial-gradient(circle at 78% 20%, rgba(6, 182, 212, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(239, 246, 255, 0.88));
}

.compact-hero h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.compact-hero p {
  max-width: 760px;
  font-size: 1.06rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 0.92rem;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  border-radius: 26px;
  padding: 18px;
}

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

.category-poster-stack img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pager-link {
  min-width: 42px;
  padding: 10px 13px;
  border-radius: 12px;
  text-align: center;
  color: #1e40af;
  font-weight: 900;
  background: #dbeafe;
}

.pager-link.is-active,
.pager-link:hover {
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.search-workspace {
  margin-top: 34px;
  border-radius: 28px;
  padding: 28px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.8fr) repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.search-status {
  margin: 18px 0 22px;
  color: var(--muted);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  padding-top: 34px;
}

.detail-main {
  min-width: 0;
}

.player-shell {
  border-radius: 28px;
  padding: 12px;
  background: linear-gradient(135deg, #020617, #0f172a 48%, #0e7490);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
  overflow: hidden;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(1.12);
}

.play-core {
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.42);
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.detail-card,
.side-card {
  border-radius: 26px;
  padding: 26px;
  margin-top: 22px;
}

.detail-card h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.detail-meta {
  margin: 16px 0;
}

.detail-card .lead {
  color: #334155;
  font-size: 1.15rem;
}

.detail-card h2 {
  margin-top: 28px;
  font-size: 1.45rem;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.poster-side img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #0f172a;
}

.full-button {
  width: 100%;
  margin-top: 16px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
}

.info-list dt {
  color: var(--muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: #0f172a;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.2rem;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 1rem;
}

.site-footer p {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  flex-direction: column;
  gap: 8px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .feature-panel,
  .detail-side {
    position: static;
  }

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 620px;
  }

  .hero-copy {
    padding-top: 76px;
  }

  .hero-controls {
    bottom: 20px;
  }

  .search-panel,
  .section-head,
  .footer-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form button {
    padding: 13px 18px;
  }

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

  .large-rank-list .rank-item,
  .rank-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .large-rank-list .rank-number {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 2;
  }

  .page-hero,
  .search-workspace,
  .detail-card,
  .side-card {
    padding: 22px;
    border-radius: 22px;
  }

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