:root {
  --deepblue-950: #020617;
  --deepblue-900: #0f172a;
  --deepblue-850: #111c33;
  --deepblue-800: #1e293b;
  --deepblue-700: #334155;
  --ocean-500: #0ea5e9;
  --ocean-400: #38bdf8;
  --ocean-300: #7dd3fc;
  --ocean-200: #bae6fd;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --text-main: #ffffff;
  --text-muted: #a9c9dc;
  --card-radius: 1rem;
  --shadow-ocean: 0 20px 60px rgba(14, 165, 233, 0.18);
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(14, 165, 233, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(20, 184, 166, 0.14), transparent 34rem),
    linear-gradient(180deg, var(--deepblue-950), var(--deepblue-900) 38%, var(--deepblue-950));
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.main-nav a {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  color: var(--ocean-200);
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fff;
  background: rgba(14, 165, 233, 0.18);
}

.header-search {
  width: min(260px, 24vw);
  display: flex;
  align-items: center;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  overflow: hidden;
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0.68rem 0.9rem;
}

.header-search button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  padding: 0.68rem 1rem;
}

.menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 0.8rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
}

.page-hero {
  padding: 5rem 0 2.5rem;
}

.page-hero.compact {
  padding: 3rem 0 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ocean-300);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-title,
.hero-title {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-desc,
.hero-desc {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--ocean-200);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-slider {
  position: relative;
  height: min(76vh, 760px);
  min-height: 540px;
  overflow: hidden;
  border-bottom: 1px solid rgba(125, 211, 252, 0.14);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.86) 42%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 48%, rgba(2, 6, 23, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  padding-top: 2rem;
}

.hero-movie-title {
  margin: 1rem 0 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.08;
  font-weight: 900;
}

.hero-movie-desc {
  color: var(--ocean-200);
  font-size: 1.08rem;
  line-height: 1.8;
  margin: 1rem 0 0;
  max-width: 680px;
}

.hero-meta,
.meta-line,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.hero-meta {
  margin: 1.3rem 0 1.8rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 999px;
  color: var(--ocean-200);
  background: rgba(14, 165, 233, 0.12);
  padding: 0.38rem 0.78rem;
  font-size: 0.86rem;
}

.pill.strong {
  color: #fff;
  border-color: rgba(45, 212, 191, 0.5);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.8), rgba(20, 184, 166, 0.8));
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 0.95rem;
  padding: 0.82rem 1.12rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-ocean);
}

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

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

.hero-dot {
  width: 1.1rem;
  height: 0.28rem;
  border: 0;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.42);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2.3rem;
  background: var(--ocean-400);
}

.section {
  padding: 3.5rem 0;
}

.section.alt {
  background: rgba(15, 23, 42, 0.34);
  border-top: 1px solid rgba(125, 211, 252, 0.1);
  border-bottom: 1px solid rgba(125, 211, 252, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.6rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  line-height: 1.75;
}

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

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

.movie-card {
  display: block;
  border: 1px solid rgba(125, 211, 252, 0.1);
  border-radius: var(--card-radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.96));
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: var(--shadow-ocean);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.6);
}

.poster-wrap.wide {
  aspect-ratio: 16 / 9;
}

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

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

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

.type-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.78);
  padding: 0.25rem 0.58rem;
  font-size: 0.74rem;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.92), rgba(20, 184, 166, 0.92));
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 1rem;
}

.card-title {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 0.75rem;
  color: var(--ocean-300);
  font-size: 0.82rem;
  justify-content: space-between;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.tag {
  border-radius: 999px;
  color: var(--ocean-300);
  background: rgba(14, 165, 233, 0.1);
  padding: 0.22rem 0.5rem;
  font-size: 0.72rem;
}

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

.category-card {
  display: block;
  min-height: 12rem;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: var(--card-radius);
  background:
    radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.25), transparent 40%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92));
  padding: 1.3rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0.8rem 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.mini-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
  color: var(--ocean-200);
  font-size: 0.9rem;
}

.ranking-list {
  display: grid;
  gap: 0.8rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 4rem 5.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(125, 211, 252, 0.1);
  border-radius: var(--card-radius);
  background: rgba(15, 23, 42, 0.82);
  padding: 0.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(5px);
  border-color: rgba(56, 189, 248, 0.34);
}

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

.rank-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 0.8rem;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.7);
}

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

.rank-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 780;
}

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

.rank-score {
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  padding: 0.45rem 0.7rem;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 1rem;
}

.search-box {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.55);
}

.search-box input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0.95rem 1rem;
}

.search-box button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  padding: 0.95rem 1.3rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-chip {
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 999px;
  color: var(--ocean-200);
  background: rgba(14, 165, 233, 0.08);
  padding: 0.48rem 0.75rem;
}

.filter-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.88), rgba(20, 184, 166, 0.88));
}

.empty-state {
  display: none;
  border: 1px dashed rgba(125, 211, 252, 0.25);
  border-radius: 1rem;
  color: var(--ocean-200);
  padding: 1.5rem;
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.3rem 0 0;
  color: var(--ocean-300);
  font-size: 0.92rem;
}

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

.detail-poster {
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 1.2rem;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow-card);
}

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-meta {
  margin: 1.1rem 0;
}

.detail-summary {
  color: var(--ocean-200);
  font-size: 1.08rem;
  line-height: 1.85;
}

.content-card {
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.78);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  margin: 0 0 0.9rem;
  font-size: 1.45rem;
}

.content-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.9;
}

.content-stack {
  display: grid;
  gap: 1rem;
}

.player-shell {
  position: relative;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 1.2rem;
  background: #000;
  box-shadow: var(--shadow-ocean);
  overflow: hidden;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.18));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 5.4rem;
  height: 5.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.45);
  font-size: 2.2rem;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(125, 211, 252, 0.12);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding: 2.4rem 0;
}

.footer-title {
  margin: 0 0 0.7rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.footer-text,
.footer-link {
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid rgba(125, 211, 252, 0.1);
  color: var(--text-muted);
  padding: 1rem 0;
  font-size: 0.9rem;
}

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

  .detail-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav,
  .header-search {
    position: fixed;
    left: 1rem;
    right: 1rem;
    z-index: 60;
    display: none;
    width: auto;
  }

  .main-nav {
    top: 4.9rem;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.96);
    padding: 0.7rem;
  }

  .header-search {
    top: 18.5rem;
  }

  body.menu-open .main-nav,
  body.menu-open .header-search {
    display: flex;
  }

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

  .hero-bg::after {
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.96)),
      linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.34));
  }

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

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

  .detail-poster {
    max-width: 320px;
  }

  .rank-item {
    grid-template-columns: 3rem 4.5rem minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

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

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

  .header-inner {
    min-height: 4rem;
  }

  .logo {
    font-size: 1rem;
  }

  .hero-slider {
    height: auto;
    min-height: 650px;
  }

  .hero-copy {
    padding-top: 3rem;
  }

  .hero-actions,
  .section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .search-box button {
    width: 100%;
  }

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

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

  .search-box {
    flex-direction: column;
  }
}
