:root {
  --deepblue-950: #06111f;
  --deepblue-900: #0b1b30;
  --deepblue-850: #0f2239;
  --deepblue-800: #132c49;
  --deepblue-700: #18395c;
  --ocean-500: #0ea5e9;
  --ocean-400: #38bdf8;
  --ocean-300: #7dd3fc;
  --ocean-200: #bae6fd;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --white: #ffffff;
  --muted: #9ec8dd;
  --shadow-ocean: 0 18px 60px rgba(14, 165, 233, 0.24);
  --card-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--white);
  background: linear-gradient(180deg, var(--deepblue-950), var(--deepblue-900) 42%, var(--deepblue-950));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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: 40;
  backdrop-filter: blur(18px);
  background: rgba(6, 17, 31, 0.82);
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.nav-link,
.mobile-link {
  color: var(--ocean-200);
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
  background: rgba(14, 165, 233, 0.16);
}

.menu-toggle {
  display: none;
  color: var(--white);
  background: rgba(19, 44, 73, 0.9);
  border: 1px solid rgba(125, 211, 252, 0.18);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(19, 44, 73, 0.96);
  border: 1px solid rgba(125, 211, 252, 0.12);
}

.mobile-menu.open {
  display: grid;
  gap: 4px;
}

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 25%, rgba(20, 184, 166, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(6, 17, 31, 0.96), rgba(11, 27, 48, 0.78) 46%, rgba(6, 17, 31, 0.18)),
    linear-gradient(0deg, var(--deepblue-950), transparent 44%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 720px;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ocean-300);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 16px 0 12px;
  max-width: 760px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.hero-subtitle {
  margin: 0 0 12px;
  color: var(--white);
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 700;
}

.hero-desc {
  max-width: 640px;
  margin: 0 0 18px;
  color: var(--ocean-200);
  font-size: 1.05rem;
}

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

.hero-tags span,
.detail-tags span,
.detail-meta span,
.detail-meta a,
.movie-meta-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--ocean-200);
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(125, 211, 252, 0.13);
  font-size: 0.82rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 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-200);
  background: rgba(19, 44, 73, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.18);
}

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

.hero-dots button {
  width: 18px;
  height: 6px;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.38);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 42px;
  background: var(--ocean-400);
}

.section {
  padding: 72px 0;
}

.section-band {
  background: linear-gradient(180deg, rgba(15, 34, 57, 0.72), rgba(19, 44, 73, 0.82));
}

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

.section-head h2,
.page-hero h1 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
  font-weight: 900;
}

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

.section-more {
  color: var(--ocean-300);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 14px;
  margin-bottom: 28px;
  border-radius: 20px;
  background: rgba(19, 44, 73, 0.74);
  border: 1px solid rgba(125, 211, 252, 0.12);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--ocean-300);
  background: rgba(6, 17, 31, 0.56);
}

.search-box input,
.filter-selects select {
  width: 100%;
  color: var(--white);
  background: transparent;
  border: 0;
  outline: none;
}

.filter-selects {
  display: flex;
  gap: 12px;
}

.filter-selects select {
  min-height: 50px;
  min-width: 132px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(6, 17, 31, 0.56);
  border: 1px solid rgba(125, 211, 252, 0.1);
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link,
.category-panel,
.category-overview-card > a,
.rank-card > a {
  display: block;
  height: 100%;
}

.poster-box {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--deepblue-800), var(--deepblue-700));
  box-shadow: var(--card-shadow);
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-box img {
  transform: scale(1.08);
  filter: brightness(1.06);
}

.poster-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 45%);
  pointer-events: none;
}

.type-badge,
.rank-pill {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
}

.rank-pill {
  top: auto;
  right: auto;
  left: 10px;
  bottom: 10px;
  color: var(--ocean-200);
}

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

.movie-card-body h3 {
  margin: 0;
  color: var(--white);
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

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

.category-panel,
.category-overview-card > a {
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  background: rgba(19, 44, 73, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.12);
  box-shadow: var(--card-shadow);
  transition: transform 0.24s ease, border 0.24s ease;
}

.category-panel:hover,
.category-overview-card > a:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.36);
}

.category-thumbs,
.overview-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.category-thumbs img,
.overview-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--deepblue-700);
}

.category-panel h3,
.overview-body h2 {
  margin: 0;
  font-size: 1.35rem;
}

.category-panel p,
.overview-body p {
  margin: 8px 0 0;
  color: var(--muted);
}

.overview-body span {
  color: var(--ocean-300);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: auto 64px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 86px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(19, 44, 73, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.1);
}

.ranking-list img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-number,
.rank-index {
  color: var(--ocean-300);
  font-weight: 900;
}

.ranking-list strong {
  display: block;
  font-size: 1rem;
}

.ranking-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.ranking-list em,
.rank-card em {
  color: var(--teal-400);
  font-style: normal;
  font-weight: 900;
}

.page-hero {
  padding: 74px 0 28px;
}

.page-actions {
  margin-top: 22px;
}

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

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

.rank-card > a {
  display: grid;
  grid-template-columns: 54px 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(19, 44, 73, 0.74);
  border: 1px solid rgba(125, 211, 252, 0.1);
}

.rank-card img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: var(--deepblue-700);
}

.rank-card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.rank-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-layout {
  padding-top: 34px;
}

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

.breadcrumb a {
  color: var(--ocean-300);
}

.player-card,
.detail-card,
.detail-text {
  border-radius: 26px;
  background: rgba(19, 44, 73, 0.76);
  border: 1px solid rgba(125, 211, 252, 0.12);
  box-shadow: var(--card-shadow);
}

.player-card {
  padding: 14px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.center-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
  color: var(--white);
  background: radial-gradient(circle, rgba(6, 17, 31, 0.1), rgba(0, 0, 0, 0.42));
}

.center-play span {
  display: grid;
  place-items: center;
  width: clamp(70px, 10vw, 108px);
  height: clamp(70px, 10vw, 108px);
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: var(--shadow-ocean);
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  transition: transform 0.2s ease;
}

.center-play:hover span {
  transform: scale(1.08);
}

.video-shell.playing .center-play {
  opacity: 0;
  pointer-events: none;
}

.detail-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 24px;
  margin-top: 24px;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  background: var(--deepblue-700);
}

.detail-info h1 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08;
  font-weight: 900;
}

.detail-one-line {
  margin: 0 0 18px;
  color: var(--ocean-200);
  font-size: 1.08rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.detail-text {
  margin-top: 24px;
  padding: 28px;
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
}

.detail-text h2:not(:first-child) {
  margin-top: 28px;
}

.detail-text p {
  margin: 0;
  color: var(--ocean-200);
  font-size: 1.02rem;
}

.related-section {
  padding-bottom: 24px;
}

.site-footer {
  margin-top: 72px;
  padding: 50px 0 24px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(11, 27, 48, 0.2), var(--deepblue-950));
  border-top: 1px solid rgba(125, 211, 252, 0.1);
}

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

.footer-brand {
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 1.1rem;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(125, 211, 252, 0.08);
  font-size: 0.9rem;
}

.movie-card.hidden,
.rank-card.hidden {
  display: none;
}

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

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

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-carousel {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 88px;
  }

  .filter-panel,
  .section-head,
  .detail-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-list a {
    grid-template-columns: auto 54px 1fr;
  }

  .ranking-list em {
    display: none;
  }

  .rank-card > a {
    grid-template-columns: 40px 72px 1fr;
  }

  .rank-card em {
    display: none;
  }

  .detail-cover {
    max-width: 240px;
  }
}

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

  .brand {
    font-size: 0.95rem;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 2.25rem;
  }

  .hero-actions,
  .page-actions {
    width: 100%;
  }

  .btn {
    flex: 1 1 100%;
  }

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

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

  .rank-card > a {
    grid-template-columns: 34px 62px 1fr;
    gap: 10px;
  }

  .detail-card,
  .detail-text {
    padding: 18px;
  }
}
