:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --soft: #e2e8f0;
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --slate: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  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, #f8fafc 0%, #ffffff 52%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 18px rgba(15, 23, 42, 0.08);
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.82rem;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.22);
}

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

.nav-link {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

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

.mobile-nav {
  display: none;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 8px 16px 14px;
}

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

.mobile-link {
  padding: 12px 10px;
  border-radius: 10px;
  color: #334155;
  font-weight: 650;
}

.mobile-link:hover {
  background: #f1f5f9;
  color: var(--cyan);
}

.main-shell {
  padding: 32px 0 64px;
}

.home-shell {
  padding: 32px 0 72px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 5s ease;
  background: linear-gradient(135deg, #0f172a, #155e75);
}

.hero-slide.active .hero-image {
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.42) 50%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 56px);
  right: clamp(24px, 5vw, 56px);
  bottom: clamp(34px, 7vw, 76px);
  max-width: 760px;
  color: #ffffff;
}

.hero-pill {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--cyan);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 750;
  margin-bottom: 16px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  max-width: 690px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: var(--cyan);
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.32);
}

.btn-primary:hover {
  background: var(--cyan-dark);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 18px;
  transform: translateY(-50%);
}

.hero-next {
  right: 18px;
  transform: translateY(-50%);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

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

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.section-block {
  margin-top: 64px;
}

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

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

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--cyan);
  background: #ecfeff;
  font-weight: 900;
}

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

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

.movie-card,
.horizontal-card {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  height: 285px;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

.movie-grid.compact .poster-frame {
  height: 235px;
}

.poster-frame img,
.horizontal-poster img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 70%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.88);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.play-mark.small {
  width: 44px;
  height: 44px;
}

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

.category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--cyan);
  font-size: 0.78rem;
  font-weight: 750;
  box-shadow: 0 10px 25px rgba(8, 145, 178, 0.28);
}

.card-body {
  padding: 16px;
}

.card-body h3,
.horizontal-body h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body h3 a:hover,
.horizontal-body h3 a:hover,
.rank-title:hover {
  color: var(--cyan);
}

.card-desc {
  min-height: 43px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 0.82rem;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

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

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 0.78rem;
}

.scroller-panel {
  overflow: hidden;
  border-radius: 26px;
  padding: 28px;
  background: linear-gradient(90deg, #ecfeff, #eff6ff);
}

.horizontal-scroller {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x proximity;
}

.horizontal-scroller .movie-card {
  width: 285px;
  min-width: 285px;
  scroll-snap-align: start;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
}

.horizontal-poster {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

.horizontal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.horizontal-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-soft {
  width: max-content;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 0.78rem;
  font-weight: 750;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(130px, 0.7fr));
  gap: 12px;
  margin: 24px 0;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select,
.search-form input,
.search-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 0 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-form input:focus,
.search-form select:focus {
  border-color: var(--cyan);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.page-hero {
  padding: 34px;
  border-radius: 26px;
  color: #ffffff;
  background: radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.35), transparent 32%), linear-gradient(135deg, #0f172a, #155e75 58%, #2563eb);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

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

.category-card {
  display: block;
  padding: 22px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.category-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 90px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-no {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
}

.rank-thumb {
  height: 118px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

.rank-title {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 800;
}

.rank-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-score {
  min-width: 110px;
  padding: 9px 12px;
  border-radius: 14px;
  color: #0e7490;
  background: #ecfeff;
  font-weight: 850;
  text-align: center;
}

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

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  color: #334155;
  font-weight: 800;
}

.pagination .active,
.pagination a:hover {
  color: #ffffff;
  background: var(--cyan);
}

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

.detail-panel {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.26);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.22), rgba(0, 0, 0, 0.28));
  transition: opacity 0.25s ease;
}

.player-button {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--cyan);
  font-size: 1.8rem;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 20px 42px rgba(8, 145, 178, 0.34);
  transition: transform 0.22s ease, background 0.22s ease;
}

.player-button:hover {
  transform: scale(1.05);
  background: var(--cyan-dark);
}

.player-wrap.is-playing .player-overlay,
.player-wrap.is-ready .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
  color: var(--muted);
}

.detail-info span {
  padding: 8px 10px;
  border-radius: 12px;
  background: #f1f5f9;
}

.lead-box {
  margin: 22px 0;
  padding: 18px;
  border-radius: 18px;
  background: #ecfeff;
  color: #164e63;
  font-size: 1.08rem;
  line-height: 1.8;
  font-weight: 700;
}

.article-copy h2 {
  margin: 30px 0 12px;
  font-size: 1.55rem;
}

.article-copy p {
  margin: 0;
  color: #334155;
  line-height: 1.95;
  white-space: pre-line;
}

.review-box {
  padding: 20px;
  border-radius: 18px;
  background: #f8fafc;
}

.side-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
  box-shadow: var(--shadow-soft);
}

.detail-poster img {
  height: 430px;
}

.side-card {
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.side-card h3 {
  margin: 0 0 12px;
}

.side-card a {
  display: block;
  padding: 10px 0;
  color: #334155;
  border-top: 1px solid #eef2f7;
}

.side-card a:hover {
  color: var(--cyan);
}

.search-page-panel {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 0.65fr)) auto;
  gap: 12px;
  margin-bottom: 22px;
}

.search-form .btn {
  min-height: 46px;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  padding: 48px 0;
  color: #94a3b8;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.footer-brand p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
}

.site-footer a:hover {
  color: #22d3ee;
}

[data-movie-card].hidden {
  display: none;
}

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

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

  .side-panel {
    position: static;
    grid-template-columns: 260px 1fr;
  }

  .detail-poster img {
    height: 360px;
  }
}

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

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

  .hero-carousel {
    height: 520px;
    border-radius: 22px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .rank-item {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-score {
    grid-column: 2 / -1;
    width: max-content;
  }

  .horizontal-card {
    grid-template-columns: 120px 1fr;
  }

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

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 1.24rem;
  }

  .hero-carousel {
    height: 480px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 44px;
  }

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

  .poster-frame,
  .movie-grid.compact .poster-frame {
    height: 320px;
  }

  .page-hero {
    padding: 24px;
  }

  .detail-panel {
    padding: 16px;
  }
}
