:root {
  --sky: #0ea5e9;
  --sky-dark: #0284c7;
  --blue: #2563eb;
  --slate: #0f172a;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --soft: #f0f9ff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%, #eff6ff 100%);
}

body.detail-theme {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

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

img {
  display: block;
  max-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;
  border-bottom: 1px solid rgba(125, 211, 252, 0.38);
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.94), rgba(239, 246, 255, 0.94));
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 12px rgba(14, 165, 233, 0.08);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.24);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.logo-title {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--sky-dark), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 650;
  color: #334155;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--sky-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #334155;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #dbeafe;
  background: #ffffff;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
}

.mobile-panel a:hover {
  color: var(--sky-dark);
  background: #f0f9ff;
}

.hero-slider {
  position: relative;
  height: 520px;
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 850ms ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.48) 44%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 56px 0 74px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--sky);
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 16px;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}

.hero-title {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 900;
}

.hero-description {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.btn:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--sky), var(--blue));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.23);
}

.btn-white {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(255, 255, 255, 0.18);
}

.btn-white:hover {
  color: #ffffff;
  background: var(--sky);
}

.btn-ghost {
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.36);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.page-hero {
  padding: 58px 0 34px;
}

.page-hero-card {
  padding: clamp(26px, 5vw, 42px);
  border-radius: 30px;
  background: linear-gradient(135deg, #e0f2fe 0%, #eff6ff 52%, #ffffff 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(125, 211, 252, 0.38);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.75;
}

.section {
  margin: 54px 0;
}

.section-card {
  padding: clamp(20px, 4vw, 34px);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.section-soft {
  padding: clamp(20px, 4vw, 34px);
  border-radius: 30px;
  background: linear-gradient(90deg, #e0f2fe 0%, #dbeafe 100%);
  box-shadow: var(--shadow);
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.title-line {
  flex: 1;
  height: 4px;
  min-width: 60px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), rgba(14, 165, 233, 0));
}

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

.card-grid.compact {
  gap: 16px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.84);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.48);
  box-shadow: 0 24px 48px rgba(14, 165, 233, 0.15);
}

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

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 42%, rgba(15, 23, 42, 0.6) 100%);
  opacity: 0.88;
}

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.92);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

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

.card-play:hover {
  color: #ffffff;
  background: var(--sky);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.movie-body h3 a:hover {
  color: var(--sky-dark);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
}

.movie-desc {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 750;
}

.horizontal-scroll {
  overflow-x: auto;
  padding: 2px 0 18px;
}

.scroll-row {
  display: flex;
  gap: 18px;
  min-width: min-content;
}

.scroll-row .movie-card {
  width: 310px;
  flex: 0 0 auto;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 76px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(3px);
  border-color: rgba(14, 165, 233, 0.46);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 13px;
  background: #e0f2fe;
}

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

.rank-info h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.3;
}

.rank-info p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

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

.category-tile {
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.46);
  box-shadow: 0 22px 42px rgba(14, 165, 233, 0.13);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.category-tile p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 170px));
  gap: 12px;
  margin: 26px 0 0;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

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

.pagination a,
.pagination span {
  min-width: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-weight: 750;
}

.pagination a:hover,
.pagination span.current {
  color: #ffffff;
  border-color: var(--sky);
  background: var(--sky);
}

.detail-main {
  padding: 34px 0 68px;
  color: #e2e8f0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.back-link:hover {
  color: #ffffff;
}

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

.player-shell {
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.22), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-inner {
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 22px 42px rgba(255, 255, 255, 0.18);
}

.play-inner strong {
  font-size: 20px;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.player-message.visible {
  display: block;
}

.detail-card {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.22);
}

.detail-card h1 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.detail-card h2 {
  color: #ffffff;
  margin: 30px 0 12px;
  font-size: 23px;
}

.detail-card p {
  color: #cbd5e1;
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.detail-meta span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(14, 165, 233, 0.28);
  font-size: 13px;
  font-weight: 750;
}

.sidebar-card {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
}

.sidebar-card + .sidebar-card {
  margin-top: 20px;
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

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

.related-list {
  display: grid;
  gap: 13px;
}

.related-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
  transform: translateX(3px);
  border-color: rgba(14, 165, 233, 0.45);
}

.related-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: #e0f2fe;
}

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

.related-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.35;
}

.related-item p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 30px;
  padding: 42px 0;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-inner p,
.footer-inner a {
  color: #64748b;
  line-height: 1.75;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid #e2e8f0;
  padding: 18px 0;
  color: #64748b;
  font-size: 14px;
}

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

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

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

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

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

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

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

  .nav-links {
    display: none;
  }

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

  .header-inner {
    min-height: 58px;
  }

  .logo-title {
    font-size: 18px;
  }

  .logo-subtitle {
    display: none;
  }

  .hero-slider {
    height: 520px;
    min-height: 520px;
  }

  .hero-content {
    padding: 44px 0 78px;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-control {
    width: 40px;
    height: 40px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

  .card-grid,
  .card-grid.compact,
  .category-tile-grid {
    grid-template-columns: 1fr;
  }

  .scroll-row .movie-card {
    width: 270px;
  }

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

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

  .title-line {
    width: 100%;
  }

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

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