:root {
  --bg: #f0fdff;
  --text: #1f2937;
  --muted: #64748b;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --teal: #0d9488;
  --blue-soft: #eff6ff;
  --card: #ffffff;
  --line: rgba(8, 145, 178, 0.16);
  --shadow: 0 18px 45px rgba(8, 145, 178, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 42%, #eff6ff 100%);
  min-height: 100vh;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(236, 254, 255, 0.96), rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(8, 145, 178, 0.12);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.28);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--cyan-dark), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 600;
  color: #334155;
}

.desktop-nav a {
  position: relative;
  padding: 22px 0;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 16px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  transition: width 0.25s ease;
}

.desktop-nav a:hover {
  color: var(--cyan-dark);
}

.desktop-nav a:hover::after {
  width: 100%;
}

.header-search,
.mobile-search,
.big-search,
.filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-controls input,
.filter-controls select {
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.header-search button,
.mobile-search button,
.big-search button,
.filter-controls button {
  border: 0;
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  cursor: pointer;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  background: rgba(6, 182, 212, 0.12);
  color: #0f172a;
  font-size: 22px;
  cursor: pointer;
}

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

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
}

.mobile-nav a:hover {
  background: #ecfeff;
  color: var(--cyan-dark);
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #164e63, #0f172a);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: #facc15;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  font-weight: 900;
  text-wrap: balance;
}

.hero-movie-title {
  font-size: clamp(28px, 4vw, 46px) !important;
  color: #cffafe;
}

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

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

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

.hero-tags span,
.detail-labels span,
.detail-labels a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.9);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.3);
}

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

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

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--cyan);
}

.section-wrap,
.page-shell,
.detail-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: 28px;
  margin-top: -34px;
  position: relative;
  z-index: 4;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.intro-panel h2,
.section-head h2,
.page-hero h1,
.detail-panel h1,
.side-card h2,
.detail-panel h2 {
  margin: 0;
  color: #0f172a;
}

.intro-panel p,
.page-hero p,
.category-tile p,
.overview-body p,
.horizontal-content p,
.detail-panel p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.big-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

.big-search button {
  min-height: 48px;
  padding: 0 24px;
}

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

.section-head h2 {
  margin-top: 4px;
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 900;
}

.section-head a {
  color: var(--cyan-dark);
  font-weight: 800;
}

.section-kicker {
  color: var(--cyan-dark);
  font-size: 13px;
  text-transform: uppercase;
}

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

.movie-card,
.horizontal-card,
.category-tile,
.category-overview-card,
.detail-panel,
.side-card,
.filter-bar {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

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

.poster-wrap img,
.horizontal-poster img,
.category-cover img,
.overview-visual img,
.related-row img,
.rank-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-wrap img,
.category-tile:hover .category-cover img,
.category-overview-card:hover .overview-visual img {
  transform: scale(1.08);
}

.year-badge,
.score-badge {
  position: absolute;
  top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.year-badge {
  left: 10px;
}

.score-badge {
  right: 10px;
  color: #fde68a;
}

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

.movie-title,
.horizontal-title {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-title:hover,
.horizontal-title:hover,
.mini-links a:hover,
.rank-item:hover strong,
.related-row:hover strong {
  color: var(--cyan-dark);
}

.movie-meta {
  margin: 8px 0;
  color: #64748b;
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: #0e7490;
  background: #cffafe;
}

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

.category-tile {
  overflow: hidden;
  padding-bottom: 18px;
}

.category-cover,
.overview-visual {
  position: relative;
  display: block;
  height: 190px;
  overflow: hidden;
  background: #0f172a;
}

.category-cover::after,
.overview-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
}

.category-cover span,
.overview-visual span {
  position: absolute;
  z-index: 2;
  left: 22px;
  bottom: 20px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
}

.category-tile p,
.overview-body {
  padding: 0 20px;
}

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

.mini-links a {
  padding: 7px 11px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 13px;
  font-weight: 700;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
}

.horizontal-list {
  display: grid;
  gap: 18px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
}

.horizontal-poster {
  display: block;
  min-height: 150px;
  background: #0f172a;
}

.horizontal-content {
  padding: 20px;
}

.rank-panel {
  position: sticky;
  top: 90px;
  height: fit-content;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.rank-number {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.rank-item img {
  width: 82px;
  height: 56px;
  border-radius: 12px;
  background: #0f172a;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em,
.related-row strong,
.related-row em {
  display: block;
}

.rank-text strong,
.related-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-style: normal;
}

.rank-text em,
.related-row em {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.rank-score {
  color: #ca8a04;
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: 52px;
  color: #ffffff;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--cyan-dark), var(--teal));
  box-shadow: var(--shadow);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero span {
  position: relative;
  z-index: 1;
  font-weight: 900;
  color: #cffafe;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 950;
}

.page-hero p,
.page-hero .hero-actions {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: #e0f2fe;
}

.filter-bar {
  margin-top: 28px;
  padding: 24px;
}

.filter-controls {
  margin-bottom: 24px;
}

.filter-controls input,
.filter-controls select {
  min-height: 46px;
  padding: 0 16px;
}

.filter-controls input {
  flex: 1;
}

.filter-controls select {
  min-width: 170px;
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: #64748b;
}

.empty-state.is-visible {
  display: block;
}

.overview-grid {
  margin-top: 30px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  overflow: hidden;
}

.category-overview-card .overview-visual {
  height: 100%;
  min-height: 230px;
}

.overview-body {
  padding: 24px;
}

.overview-body h2 {
  margin: 0 0 10px;
}

.full-rank {
  gap: 8px;
}

.detail-shell {
  padding-top: 28px;
}

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

.breadcrumb a {
  color: var(--cyan-dark);
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18));
  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: 76px;
  height: 76px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 16px 38px rgba(6, 182, 212, 0.35);
  font-size: 32px;
}

.detail-panel,
.side-card {
  padding: 24px;
}

.detail-labels {
  margin-bottom: 12px;
}

.detail-labels span,
.detail-labels a {
  color: #0e7490;
  background: #cffafe;
}

.detail-panel h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 950;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  color: #64748b;
  font-weight: 700;
}

.one-line {
  padding: 16px 18px;
  border-left: 4px solid var(--cyan);
  border-radius: 14px;
  background: #ecfeff;
  color: #0f172a !important;
  font-weight: 700;
}

.detail-panel h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 22px;
}

.detail-panel blockquote {
  margin: 0;
  padding: 18px 20px;
  border-left: 4px solid var(--cyan);
  border-radius: 14px;
  color: #334155;
  background: linear-gradient(90deg, #ecfeff, #eff6ff);
  line-height: 1.8;
}

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

.sticky-card {
  position: sticky;
  top: 92px;
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.related-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-row img {
  width: 96px;
  height: 64px;
  border-radius: 12px;
  background: #0f172a;
}

.detail-more {
  padding-left: 0;
  padding-right: 0;
}

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

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

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

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

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

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

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

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #bae6fd;
  text-align: center;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .rank-panel,
  .sticky-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
    padding: 0 14px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    padding: 0 18px;
  }

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

  .section-wrap,
  .page-shell,
  .detail-shell {
    padding: 30px 14px;
  }

  .intro-panel,
  .filter-bar,
  .detail-panel,
  .side-card {
    border-radius: 18px;
  }

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

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

  .movie-title {
    font-size: 16px;
  }

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

  .category-overview-card .overview-visual,
  .horizontal-poster {
    min-height: 190px;
  }

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

  .filter-controls,
  .big-search {
    flex-direction: column;
    align-items: stretch;
  }

  .rank-item {
    grid-template-columns: 38px 68px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .overview-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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