:root {
  color-scheme: dark;
  --deepblue-950: #000b10;
  --deepblue-900: #00141a;
  --deepblue-850: #001d2b;
  --deepblue-800: #002840;
  --deepblue-700: #004166;
  --ocean-100: #b3e5ff;
  --ocean-200: #80d4ff;
  --ocean-300: #4dc2ff;
  --ocean-400: #1ab1ff;
  --ocean-500: #0099e6;
  --ocean-600: #0077b3;
  --ocean-700: #005580;
  --ocean-900: #001a26;
  --teal-500: #00b394;
  --teal-700: #007c68;
  --shadow-ocean: 0 4px 20px rgba(0, 153, 230, 0.15);
  --shadow-ocean-lg: 0 18px 45px rgba(0, 153, 230, 0.28);
  --radius-xl: 1rem;
  --radius-2xl: 1.35rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--deepblue-950);
}

body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  background: linear-gradient(180deg, var(--deepblue-950), var(--deepblue-900) 45%, var(--deepblue-950));
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  min-height: 70vh;
  padding-top: 82px;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  background: linear-gradient(90deg, rgba(0, 20, 26, 0.96), rgba(0, 40, 64, 0.96), rgba(0, 26, 38, 0.96));
  box-shadow: var(--shadow-ocean);
  backdrop-filter: blur(12px);
}

.nav-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  box-shadow: 0 10px 30px rgba(0, 153, 230, 0.28);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text strong {
  display: block;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}

.brand-text em {
  display: block;
  font-style: normal;
  color: var(--ocean-200);
  font-size: 0.76rem;
  margin-top: -2px;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.nav-link {
  color: var(--ocean-100);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: 12px;
  padding: 8px 10px;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(0, 153, 230, 0.16);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 250px;
}

.nav-search input,
.filter-input,
.filter-select,
.search-page-form input {
  border: 1px solid rgba(77, 194, 255, 0.35);
  color: #ffffff;
  background: rgba(0, 20, 26, 0.72);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 100%;
  padding: 10px 12px;
}

.nav-search input:focus,
.filter-input:focus,
.filter-select:focus,
.search-page-form input:focus {
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 3px rgba(26, 177, 255, 0.15);
}

.nav-search button,
.primary-button {
  border: 0;
  color: #ffffff;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--ocean-500), var(--teal-500));
  box-shadow: var(--shadow-ocean);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-search button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-ocean-lg);
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(0, 153, 230, 0.15);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.9s ease;
  pointer-events: none;
}

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

.hero-bg,
.player-cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-layer,
.player-cover-shade,
.poster-shade {
  position: absolute;
  inset: 0;
}

.hero-layer-side {
  background: linear-gradient(90deg, var(--deepblue-950) 0%, rgba(0, 20, 26, 0.86) 44%, rgba(0, 20, 26, 0.15) 100%);
}

.hero-layer-bottom {
  background: linear-gradient(0deg, var(--deepblue-950) 0%, rgba(0, 11, 16, 0.15) 52%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  padding: 42px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ocean-200);
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 24px;
  color: var(--ocean-200);
  font-size: clamp(1.02rem, 1.8vw, 1.28rem);
}

.hero-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span {
  color: var(--ocean-300);
  background: rgba(0, 153, 230, 0.16);
  border: 1px solid rgba(77, 194, 255, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 650;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.ghost-button,
.text-link,
.section-more {
  color: var(--ocean-300);
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ghost-button {
  border: 1px solid rgba(77, 194, 255, 0.35);
  border-radius: 14px;
  padding: 10px 18px;
  background: rgba(0, 20, 26, 0.45);
}

.ghost-button:hover,
.text-link:hover,
.section-more:hover {
  color: #ffffff;
  border-color: var(--ocean-400);
}

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

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

.hero-dot.active {
  width: 38px;
  background: var(--ocean-400);
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.content-band {
  background: linear-gradient(180deg, rgba(0, 20, 26, 0.2), rgba(0, 40, 64, 0.72), rgba(0, 20, 26, 0.2));
}

.band-inner {
  padding-top: 70px;
  padding-bottom: 70px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--ocean-300);
}

.horizontal-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 270px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 20px;
  scrollbar-color: var(--ocean-600) transparent;
}

.movie-grid,
.poster-grid,
.home-category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

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

.full-grid {
  align-items: stretch;
}

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--deepblue-800);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  background: #00304d;
  box-shadow: var(--shadow-ocean-lg);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--deepblue-900);
}

.compact-card .poster-wrap {
  aspect-ratio: 2 / 3;
}

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

.movie-card:hover img {
  transform: scale(1.09);
}

.poster-shade {
  background: linear-gradient(0deg, rgba(0, 20, 26, 0.9), rgba(0, 20, 26, 0.06));
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  color: #ffffff;
  border-radius: 10px;
  padding: 5px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.rank-badge {
  right: auto;
  left: 10px;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
}

.play-bubble {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 153, 230, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.card-body strong {
  color: #ffffff;
  font-size: 1.02rem;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body em {
  min-height: 3em;
  color: var(--ocean-300);
  font-size: 0.9rem;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ocean-400);
  font-size: 0.8rem;
}

.card-tags,
.detail-tags,
.term-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags span,
.detail-tags span,
.term-cloud button {
  color: var(--ocean-300);
  border: 1px solid rgba(77, 194, 255, 0.18);
  background: rgba(0, 26, 38, 0.62);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.76rem;
}

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

.home-category-card,
.rank-panel,
.detail-card,
.category-panel,
.filter-panel,
.search-panel {
  border-radius: var(--radius-2xl);
  background: rgba(0, 40, 64, 0.82);
  border: 1px solid rgba(77, 194, 255, 0.08);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
}

.home-category-card,
.rank-panel,
.detail-card,
.filter-panel,
.search-panel {
  padding: 24px;
}

.home-category-head,
.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.home-category-head h3,
.rank-panel-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.home-category-head a,
.rank-panel-head a {
  color: var(--ocean-300);
  font-weight: 700;
}

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

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 20, 26, 0.42);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(0, 153, 230, 0.16);
  transform: translateX(3px);
}

.rank-number {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  font-weight: 800;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
}

.rank-meta {
  color: var(--ocean-300);
  font-size: 0.82rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 18% 22%, rgba(26, 177, 255, 0.22), transparent 38%), linear-gradient(135deg, var(--deepblue-950), var(--deepblue-800));
}

.compact-hero {
  padding: 84px 0 72px;
}

.page-hero-content {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--ocean-200);
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
  color: var(--ocean-300);
  font-size: 0.95rem;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.category-panel {
  overflow: hidden;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}

.category-panel-cover {
  min-height: 100%;
  background: var(--deepblue-900);
}

.category-cover-grid {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.category-cover-grid img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.category-panel-body {
  padding: 24px;
}

.category-panel-body h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
}

.category-panel-body p {
  margin: 0 0 16px;
  color: var(--ocean-200);
}

.category-title-list {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.category-title-list a {
  color: var(--ocean-300);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-title-list a:hover {
  color: #ffffff;
}

.filter-panel,
.search-page-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 26px;
}

.search-panel {
  padding: 24px;
}

.search-page-form {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.filter-input,
.filter-select,
.search-page-form input {
  width: 100%;
  padding: 13px 15px;
}

.large-input {
  font-size: 1.08rem;
  padding: 16px 18px;
}

.term-cloud {
  margin: 4px 0 28px;
}

.term-cloud button {
  cursor: pointer;
}

.term-cloud button:hover {
  color: #ffffff;
  background: rgba(0, 153, 230, 0.28);
}

.watch-layout {
  background: linear-gradient(180deg, var(--deepblue-950), var(--deepblue-900));
}

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

.detail-breadcrumb {
  margin: 0 0 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: #000000;
  box-shadow: var(--shadow-ocean-lg);
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  z-index: 3;
  inset: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #000000;
}

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

.player-cover-bg {
  background-size: cover;
  background-position: center;
  filter: brightness(0.68);
  transform: scale(1.02);
}

.player-cover-shade {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 20, 26, 0.18));
}

.player-play-icon {
  position: relative;
  z-index: 5;
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: 0 16px 45px rgba(0, 153, 230, 0.36);
  transition: transform 0.2s ease;
}

.player-cover:hover .player-play-icon {
  transform: scale(1.08);
}

.detail-card {
  margin-top: 28px;
}

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

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-xl);
  background: var(--deepblue-900);
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
}

.detail-copy h2 {
  margin: 26px 0 10px;
  font-size: 1.3rem;
}

.detail-copy p {
  margin: 0 0 12px;
  color: var(--ocean-200);
}

.detail-copy .lead-text {
  color: #ffffff;
  font-weight: 650;
}

.detail-related {
  width: 100%;
}

.site-footer {
  margin-top: 70px;
  color: var(--ocean-100);
  background: linear-gradient(180deg, var(--deepblue-900), var(--deepblue-950));
  border-top: 1px solid rgba(77, 194, 255, 0.08);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 1fr 1fr;
  gap: 34px;
}

.footer-brand p,
.footer-column a {
  color: var(--ocean-300);
}

.footer-column h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.08rem;
}

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

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  color: var(--ocean-400);
  border-top: 1px solid rgba(77, 194, 255, 0.08);
}

.filter-card.is-hidden {
  display: none;
}

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

  .two-column-section {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    order: -1;
  }

  .category-overview-grid,
  .home-category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  main {
    padding-top: 72px;
  }

  .nav-container {
    min-height: 72px;
  }

  .brand-text strong {
    font-size: 1.2rem;
  }

  .brand-text em {
    display: none;
  }

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

  .nav-panel {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(0, 20, 26, 0.97);
    border: 1px solid rgba(77, 194, 255, 0.14);
    box-shadow: var(--shadow-ocean-lg);
  }

  .nav-panel.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav-search {
    min-width: 0;
  }

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

  .hero-layer-side {
    background: linear-gradient(180deg, rgba(0, 11, 16, 0.54), var(--deepblue-950));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 70px;
  }

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

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

  .filter-panel,
  .search-page-form {
    grid-template-columns: 1fr;
  }

  .category-panel,
  .detail-main,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-cover-grid img {
    min-height: 160px;
  }

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

@media (max-width: 560px) {
  .content-section {
    width: min(100% - 22px, 1180px);
    padding: 44px 0;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 2.45rem;
  }

  .hero-meta span,
  .detail-meta span {
    font-size: 0.82rem;
    padding: 5px 9px;
  }

  .movie-grid,
  .poster-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-rail {
    grid-auto-columns: minmax(240px, 84vw);
  }

  .home-category-card,
  .rank-panel,
  .detail-card,
  .filter-panel,
  .search-panel {
    padding: 18px;
  }

  .watch-container {
    width: min(100% - 22px, 1180px);
  }

  .player-shell {
    border-radius: 18px;
  }

  .player-play-icon {
    width: 72px;
    height: 72px;
    font-size: 1.8rem;
  }
}
