:root {
  --deepblue-950: #00111f;
  --deepblue-900: #00233d;
  --deepblue-850: #003052;
  --deepblue-800: #003a66;
  --deepblue-700: #004166;
  --ocean-700: #005580;
  --ocean-600: #0077b3;
  --ocean-500: #0099e6;
  --ocean-400: #1ab1ff;
  --ocean-300: #4dc2ff;
  --ocean-200: #8ed8ff;
  --ocean-100: #b3e5ff;
  --teal-600: #008c73;
  --teal-500: #00b38f;
  --white: #ffffff;
  --muted: #a8cfe5;
  --card: rgba(0, 58, 102, 0.72);
  --card-strong: rgba(0, 35, 61, 0.92);
  --border: rgba(77, 194, 255, 0.16);
  --shadow-ocean: 0 18px 55px rgba(0, 153, 230, 0.18);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ocean-100);
  background:
    radial-gradient(circle at top left, rgba(0, 153, 230, 0.22), transparent 34rem),
    linear-gradient(180deg, var(--deepblue-950), var(--deepblue-900) 42%, var(--deepblue-950));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

body.no-scroll {
  overflow: hidden;
}

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

img,
video {
  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;
  background: linear-gradient(180deg, rgba(0, 35, 61, 0.96), rgba(0, 35, 61, 0.84));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  border-radius: 16px;
  box-shadow: var(--shadow-ocean);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong,
.footer-brand strong {
  color: var(--white);
  font-size: 22px;
  letter-spacing: 0.03em;
}

.brand-text small {
  color: var(--ocean-200);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--ocean-100);
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
  background: rgba(0, 153, 230, 0.14);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: rgba(0, 85, 128, 0.36);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--deepblue-950);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-slide::before {
  background: linear-gradient(90deg, rgba(0, 17, 31, 0.98), rgba(0, 35, 61, 0.82) 42%, rgba(0, 35, 61, 0.12));
}

.hero-slide::after {
  background: linear-gradient(0deg, var(--deepblue-950), rgba(0, 17, 31, 0.08) 42%, rgba(0, 17, 31, 0.26));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 70vh;
  padding: 72px 0 96px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ocean-300);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 14px 0 16px;
  color: var(--white);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--ocean-100);
  font-size: 18px;
}

.hero-meta,
.meta-row,
.tag-row,
.detail-meta,
.breadcrumb,
.form-row,
.card-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--ocean-200);
  background: rgba(0, 153, 230, 0.14);
  border: 1px solid rgba(77, 194, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
}

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

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: var(--shadow-ocean);
}

.btn-ghost {
  color: var(--ocean-100);
  background: rgba(0, 58, 102, 0.54);
  border: 1px solid var(--border);
}

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

.hero-dot {
  width: 18px;
  height: 5px;
  padding: 0;
  background: var(--ocean-700);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 40px;
  background: var(--ocean-300);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(0, 35, 61, 0.42), rgba(0, 58, 102, 0.42));
}

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

.section-head h2,
.page-hero h1,
.detail-title,
.content-card h2 {
  margin: 0;
  color: var(--white);
  line-height: 1.18;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
}

.section-head p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-action {
  color: var(--ocean-300);
  font-weight: 700;
}

.horizontal-scroll {
  display: grid;
  grid-auto-columns: minmax(220px, 260px);
  grid-auto-flow: column;
  gap: 18px;
  padding: 4px 0 16px;
  overflow-x: auto;
  scrollbar-color: var(--ocean-600) transparent;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(77, 194, 255, 0.38);
  box-shadow: var(--shadow-ocean);
}

.movie-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--deepblue-900), var(--deepblue-700));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
  opacity: 0.85;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--white);
  background: rgba(0, 153, 230, 0.88);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, #ff9b29, #ff3d71);
  border-radius: 10px;
  font-weight: 800;
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-info h3 {
  margin: 0;
  color: var(--white);
  font-size: 16px;
  line-height: 1.35;
}

.movie-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.meta-row {
  justify-content: space-between;
  color: var(--ocean-300);
  font-size: 12px;
}

.tag-row {
  gap: 6px;
}

.compact-card .movie-info {
  padding: 12px;
}

.compact-card .movie-info p {
  display: none;
}

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

.category-card,
.stat-card,
.content-card,
.filter-panel,
.player-shell,
.rank-item,
.search-result-empty {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.16);
}

.category-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.category-card h3,
.stat-card h3 {
  margin: 0;
  color: var(--white);
  font-size: 22px;
}

.category-card p,
.stat-card p {
  margin: 0;
  color: var(--muted);
}

.cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  color: var(--ocean-300);
  font-size: 34px;
  line-height: 1.1;
}

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

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--ocean-300);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--white);
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
}

.form-row {
  gap: 12px;
}

.input,
.select {
  width: 100%;
  min-height: 46px;
  color: var(--white);
  background: rgba(0, 17, 31, 0.58);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
}

.input {
  padding: 0 16px;
}

.select {
  padding: 0 12px;
}

.input:focus,
.select:focus {
  border-color: var(--ocean-300);
}

.form-row .input {
  flex: 1 1 280px;
}

.form-row .select {
  flex: 0 1 180px;
}

.result-count {
  color: var(--ocean-300);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 78px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  border-radius: 16px;
  font-weight: 900;
}

.rank-poster {
  width: 78px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info h3 {
  margin: 0 0 6px;
  color: var(--white);
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  padding: 36px 0 72px;
}

.player-shell {
  overflow: hidden;
  background: #000;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 153, 230, 0.2), rgba(0, 0, 0, 0.64));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.overlay-button {
  display: grid;
  gap: 10px;
  place-items: center;
}

.overlay-button strong {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  border-radius: 999px;
  font-size: 34px;
  box-shadow: var(--shadow-ocean);
}

.player-status {
  min-height: 42px;
  padding: 10px 18px;
  color: var(--ocean-200);
  background: rgba(0, 17, 31, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.detail-card {
  padding: 28px;
}

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

.detail-meta {
  margin-bottom: 18px;
}

.content-card {
  padding: 28px;
}

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

.content-card h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--ocean-100);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.search-results {
  min-height: 260px;
}

.search-result-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.hidden-by-filter {
  display: none !important;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.site-footer {
  margin-top: 56px;
  padding: 56px 0 24px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(0, 35, 61, 0.6), rgba(0, 17, 31, 0.96));
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p {
  max-width: 420px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--ocean-200);
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

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

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

  .nav-shell {
    min-height: 68px;
  }

  .brand-text small {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: rgba(0, 35, 61, 0.98);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-ocean);
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

  .hero-slide::before {
    background: linear-gradient(180deg, rgba(0, 17, 31, 0.88), rgba(0, 17, 31, 0.94));
  }

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

  .section {
    padding: 46px 0;
  }

  .section-head,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-item {
    grid-template-columns: 52px 62px 1fr;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .detail-card,
  .content-card {
    padding: 20px;
  }
}
