:root {
  --bg-deep: #020617;
  --bg-panel: rgba(15, 23, 42, 0.72);
  --bg-panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(96, 165, 250, 0.22);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --gold: #f59e0b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.26), transparent 28rem),
    radial-gradient(circle at 80% 8%, rgba(34, 211, 238, 0.16), transparent 26rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.36);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  border-radius: 12px;
  transition: 0.2s ease;
}

.desktop-nav a {
  padding: 10px 12px;
  font-size: 14px;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  color: white;
  background: rgba(37, 99, 235, 0.34);
}

.search-form,
.mobile-search-form,
.wide-search-form,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.mobile-search-form input,
.wide-search-form input,
.search-page-form input,
.filter-field input,
.filter-field select {
  color: white;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(96, 165, 250, 0.28);
  outline: none;
  border-radius: 14px;
  transition: 0.2s ease;
}

.search-form input {
  width: 220px;
  padding: 10px 12px;
}

.search-form button,
.mobile-search-form button,
.wide-search-form button,
.search-page-form button,
.primary-button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  border-radius: 14px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form button:hover,
.mobile-search-form button:hover,
.wide-search-form button:hover,
.search-page-form button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #e5e7eb;
}

.mobile-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px 24px;
  border-top: 1px solid rgba(96, 165, 250, 0.18);
}

.mobile-nav a {
  display: block;
  padding: 12px;
  margin-top: 4px;
}

.mobile-search-form input {
  flex: 1;
  padding: 11px 12px;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(15, 23, 42, 0.56) 48%, rgba(2, 6, 23, 0.16)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18) 58%, rgba(2, 6, 23, 0.74));
}

.hero-copy {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 72px;
  max-width: 760px;
}

.hero-kicker,
.card-labels span,
.detail-meta span,
.detail-meta a,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(37, 99, 235, 0.86);
}

.hero-kicker {
  padding: 7px 14px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 0 28px;
  color: #dbeafe;
  max-width: 680px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
}

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

.ghost-button {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.36);
  background: rgba(15, 23, 42, 0.54);
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dots button.active {
  width: 34px;
  background: white;
}

.quick-search-panel,
.page-shell,
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.quick-search-panel {
  margin-top: -36px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 20px;
  align-items: center;
  padding-top: 22px;
  padding-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
}

.quick-search-panel span {
  color: #7dd3fc;
  display: block;
  margin-bottom: 6px;
}

.quick-search-panel strong {
  font-size: 22px;
}

.wide-search-form input,
.search-page-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
}

.page-shell {
  padding-top: 56px;
  padding-bottom: 72px;
}

.content-section {
  margin-bottom: 64px;
}

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

.section-heading div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
}

.section-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.28);
  color: #67e8f9;
}

.section-more {
  color: #7dd3fc;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.54);
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.16);
}

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

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

.movie-card:hover .poster-link img,
.movie-card:hover .horizontal-cover img {
  transform: scale(1.06);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(37, 99, 235, 0.86);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: 0.22s ease;
}

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

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

.card-labels {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.card-labels span {
  padding: 5px 9px;
  font-size: 12px;
  background: rgba(37, 99, 235, 0.72);
}

.movie-card h3 {
  margin: 0 0 10px;
  min-height: 52px;
  font-size: 18px;
  line-height: 1.42;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.78);
  font-size: 12px;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.46);
}

.ranking-page-list {
  grid-template-columns: 1fr;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 12px;
}

.rank-number {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.8);
  font-weight: 900;
}

.rank-number.top {
  color: white;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 116px;
}

.horizontal-cover {
  position: relative;
  min-height: 116px;
  overflow: hidden;
}

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

.horizontal-body {
  padding: 14px 14px 14px 16px;
}

.horizontal-body .movie-title {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-weight: 800;
  line-height: 1.4;
}

.horizontal-body p {
  -webkit-line-clamp: 2;
}

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

.sub-hero {
  min-height: 280px;
  padding: 68px 24px 52px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.18)),
    radial-gradient(circle at 30% 10%, rgba(37, 99, 235, 0.34), transparent 32rem),
    radial-gradient(circle at 76% 0%, rgba(34, 211, 238, 0.18), transparent 24rem);
}

.sub-hero > * {
  width: min(1280px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.sub-hero span {
  color: #7dd3fc;
  font-weight: 800;
}

.sub-hero h1 {
  margin: 12px auto 14px;
  font-size: clamp(34px, 5vw, 56px);
}

.sub-hero p {
  margin-top: 0;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  color: #cbd5e1;
  line-height: 1.8;
}

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

.category-box {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid rgba(96, 165, 250, 0.16);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 170px;
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-info {
  padding: 20px;
}

.category-info h2 {
  margin: 0 0 10px;
}

.category-info p {
  color: var(--muted);
  line-height: 1.65;
}

.category-info span {
  color: #7dd3fc;
  font-weight: 800;
}

.filter-bar,
.search-page-panel {
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
  margin-bottom: 34px;
}

.filter-bar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
}

.filter-field {
  display: grid;
  gap: 8px;
}

.filter-field.grow {
  flex: 1 1 280px;
}

.filter-field label {
  color: #93c5fd;
  font-weight: 700;
  font-size: 13px;
}

.filter-field input,
.filter-field select {
  min-height: 44px;
  padding: 0 12px;
}

.filter-count {
  margin: 0 0 10px;
  color: var(--muted);
}

.search-status {
  color: var(--muted);
  margin-bottom: 0;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
}

.breadcrumb a {
  color: #7dd3fc;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: black;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.16));
  cursor: pointer;
}

.player-start span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  font-size: 32px;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.34);
}

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

.player-message {
  position: absolute;
  left: 18px;
  bottom: 12px;
  margin: 0;
  color: #bfdbfe;
  font-size: 13px;
  pointer-events: none;
}

.detail-card,
.sidebar-box,
.sidebar-cover {
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.detail-card {
  margin-top: 22px;
  padding: 24px;
}

.detail-card h1,
.detail-card h2,
.sidebar-box h2 {
  margin-top: 0;
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 16px;
}

.detail-card p {
  color: #d1d5db;
  line-height: 1.9;
  text-align: justify;
}

.detail-card .one-line {
  color: #bfdbfe;
  font-size: 18px;
  font-weight: 700;
}

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

.detail-meta span,
.detail-meta a {
  padding: 7px 12px;
  background: rgba(37, 99, 235, 0.72);
}

.detail-sidebar {
  display: grid;
  gap: 20px;
  align-content: start;
}

.sidebar-cover {
  overflow: hidden;
}

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

.sidebar-box {
  padding: 20px;
}

.sidebar-box dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
}

.sidebar-box dt {
  color: #93c5fd;
  font-weight: 800;
}

.sidebar-box dd {
  margin: 0;
  color: #cbd5e1;
}

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

.related-list .movie-card-horizontal {
  grid-template-columns: 110px 1fr;
}

.related-list .horizontal-cover {
  min-height: 86px;
}

.related-list .horizontal-body p,
.related-list .movie-meta {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(96, 165, 250, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 1));
}

.footer-inner {
  padding-top: 48px;
  padding-bottom: 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 32px;
}

.site-footer h2 {
  margin-top: 0;
  font-size: 16px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 9px;
}

.site-footer a,
.site-footer p {
  color: var(--muted);
}

.site-footer a:hover {
  color: #7dd3fc;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

[hidden] {
  display: none !important;
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

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

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

  .detail-sidebar {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero-carousel {
    height: 520px;
  }

  .hero-copy {
    left: 20px;
    bottom: 64px;
  }

  .hero-control {
    display: none;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
    margin-left: 16px;
    margin-right: 16px;
  }

  .page-shell,
  .quick-search-panel,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

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

@media (max-width: 560px) {
  .hero-carousel {
    height: 480px;
  }

  .hero-copy p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .movie-grid,
  .large-grid,
  .category-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .category-movie-grid .movie-card h3 {
    font-size: 16px;
    min-height: auto;
  }

  .category-movie-grid .movie-card p,
  .category-movie-grid .tag-row {
    display: none;
  }

  .filter-bar {
    display: grid;
  }
}
