:root {
  --night-950: #0a1929;
  --night-925: #0d2034;
  --night-900: #102a43;
  --night-850: #1b334c;
  --night-800: #243b53;
  --night-700: #334e68;
  --harbor-900: #06312d;
  --harbor-800: #0b4b47;
  --harbor-700: #0f6965;
  --harbor-600: #157f7b;
  --harbor-500: #1a9995;
  --harbor-400: #26b3af;
  --harbor-300: #4dc4c1;
  --amber: #ffd54f;
  --text-main: #ffffff;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --line: rgba(120, 144, 156, 0.28);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top left, rgba(38, 179, 175, 0.16), transparent 30rem), var(--night-950);
  color: var(--text-main);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(102, 126, 148, 0.22);
  background: rgba(16, 42, 67, 0.94);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(1180px, calc(100% - 2rem));
  min-height: 4rem;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-icon {
  display: inline-grid;
  width: 2.05rem;
  height: 2.05rem;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--harbor-500), var(--harbor-800));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(38, 179, 175, 0.28);
  font-size: 0.8rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.desktop-nav a,
.footer-links a,
.section-head a,
.filter-bar a {
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.footer-links a:hover,
.section-head a:hover,
.filter-bar a:hover {
  color: var(--harbor-300);
}

.nav-search,
.big-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(102, 126, 148, 0.38);
  border-radius: 999px;
  background: rgba(10, 25, 41, 0.68);
}

.nav-search input,
.big-search input,
.filter-bar input,
.mobile-nav input {
  width: 16rem;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  padding: 0.75rem 1rem;
}

.nav-search input::placeholder,
.big-search input::placeholder,
.filter-bar input::placeholder,
.mobile-nav input::placeholder {
  color: var(--text-muted);
}

.nav-search button,
.big-search button,
.mobile-nav button {
  border: 0;
  background: var(--harbor-600);
  color: #ffffff;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nav-search button:hover,
.big-search button:hover,
.mobile-nav button:hover {
  background: var(--harbor-500);
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(102, 126, 148, 0.35);
  border-radius: 0.75rem;
  background: rgba(36, 59, 83, 0.72);
  color: #ffffff;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.mobile-nav {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: 1rem;
  border: 1px solid rgba(102, 126, 148, 0.24);
  border-radius: 1rem;
  background: rgba(10, 25, 41, 0.95);
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-soft);
}

.mobile-nav form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.mobile-nav input {
  flex: 1;
  border: 1px solid rgba(102, 126, 148, 0.32);
  border-radius: 0.75rem;
  background: rgba(36, 59, 83, 0.62);
}

.mobile-nav button {
  border-radius: 0.75rem;
}

main {
  min-height: 60vh;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #000000;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 25, 41, 0.96) 0%, rgba(10, 25, 41, 0.72) 44%, rgba(10, 25, 41, 0.22) 100%),
    linear-gradient(0deg, var(--night-950) 0%, rgba(10, 25, 41, 0.1) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1180px, calc(100% - 2rem));
  height: 100%;
  margin: 0 auto;
  padding: 6rem 0 7rem;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
  color: var(--harbor-300);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-panel h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 1.35rem 0 0;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

.hero-tags,
.card-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags {
  margin-top: 1.35rem;
}

.hero-tags span,
.card-tags span,
.tag-cloud span {
  display: inline-flex;
  border: 1px solid rgba(77, 196, 193, 0.32);
  border-radius: 999px;
  background: rgba(11, 75, 71, 0.38);
  color: var(--harbor-300);
  font-size: 0.76rem;
  padding: 0.28rem 0.65rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.primary-btn,
.ghost-btn,
.ranking-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--harbor-500), var(--harbor-700));
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(38, 179, 175, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(209, 213, 219, 0.3);
  background: rgba(10, 25, 41, 0.42);
  color: #ffffff;
}

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

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

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 2rem;
  background: var(--harbor-300);
}

.home-search-panel,
.content-section,
.split-section,
.page-hero,
.detail-layout {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: -4.2rem;
  padding: 2rem;
  position: relative;
  z-index: 4;
  border: 1px solid rgba(77, 196, 193, 0.18);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(36, 59, 83, 0.88), rgba(16, 42, 67, 0.92));
  box-shadow: var(--shadow);
}

.home-search-panel h2,
.section-head h2,
.panel-card h2,
.side-panel h2,
.detail-panel h2,
.site-footer h2 {
  margin: 0;
  font-family: "Noto Serif SC", Georgia, serif;
  color: #ffffff;
}

.home-search-panel p,
.page-hero p,
.detail-panel p,
.site-footer p {
  color: var(--text-soft);
}

.big-search {
  width: 100%;
}

.big-search input {
  flex: 1;
  width: auto;
  padding: 1rem 1.2rem;
}

.big-search button {
  padding: 1rem 1.35rem;
}

.content-section,
.split-section {
  padding: 4rem 0 0;
}

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

.section-head.compact {
  align-items: center;
}

.section-head a,
.filter-bar a {
  color: var(--harbor-300);
  font-weight: 700;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 1.1rem;
  transition: transform 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 1rem;
  background: var(--night-800);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

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

.movie-card:hover .poster-frame img,
.category-tile:hover img,
.media-row:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

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

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(38, 179, 175, 0.88);
  color: #ffffff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.poster-type {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  padding-top: 0.85rem;
}

.card-body strong {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong,
.media-row:hover strong,
.ranking-row:hover strong {
  color: var(--harbor-300);
}

.card-meta,
.card-desc,
.media-row em,
.media-row small,
.ranking-row em,
.ranking-row small {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-style: normal;
}

.card-desc {
  margin: 0;
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1.5rem;
}

.panel-card,
.detail-panel,
.side-panel {
  border: 1px solid rgba(102, 126, 148, 0.22);
  border-radius: 1.35rem;
  background: rgba(36, 59, 83, 0.38);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.panel-card {
  padding: 1.35rem;
}

.media-list,
.rank-list {
  display: grid;
  gap: 0.85rem;
}

.media-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 1rem;
  background: rgba(10, 25, 41, 0.34);
  transition: background 0.2s ease;
}

.media-row:hover,
.rank-item:hover,
.ranking-row:hover {
  background: rgba(36, 59, 83, 0.75);
}

.media-row img,
.ranking-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.8rem;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.media-row span,
.ranking-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.media-row strong,
.ranking-row strong,
.rank-item strong {
  color: #ffffff;
}

.rank-item {
  display: grid;
  grid-template-columns: 2.8rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.75rem;
  border-radius: 0.95rem;
  background: rgba(10, 25, 41, 0.28);
  transition: background 0.2s ease;
}

.rank-item span,
.ranking-number {
  color: var(--amber);
  font-weight: 800;
}

.rank-item em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.85rem;
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 12rem;
  border: 1px solid rgba(77, 196, 193, 0.18);
  border-radius: 1.2rem;
  background: var(--night-800);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
}

.category-tile.large {
  min-height: 15rem;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 25, 41, 0.12), rgba(10, 25, 41, 0.9));
}

.category-tile span {
  position: absolute;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.45rem;
}

.category-tile strong {
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 1.25rem;
}

.category-tile small {
  color: var(--text-soft);
  line-height: 1.65;
}

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

.page-hero.slim {
  padding-bottom: 0;
}

.page-hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
}

.page-hero p {
  max-width: 760px;
  margin: 1rem 0 0;
  font-size: 1.05rem;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(102, 126, 148, 0.22);
  border-radius: 1rem;
  background: rgba(36, 59, 83, 0.34);
}

.filter-bar input {
  flex: 1;
  border: 1px solid rgba(102, 126, 148, 0.32);
  border-radius: 999px;
  background: rgba(10, 25, 41, 0.5);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 3.4rem 10rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(102, 126, 148, 0.18);
  border-radius: 1.1rem;
  background: rgba(36, 59, 83, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.ranking-number {
  font-size: 1.25rem;
  text-align: center;
}

.ranking-action {
  min-height: 2.3rem;
  background: rgba(21, 127, 123, 0.55);
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.5rem;
  padding: 2rem 0 0;
}

.detail-main {
  display: grid;
  gap: 1.25rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--harbor-300);
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 1.35rem;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 0.75rem;
  border: 0;
  background: linear-gradient(180deg, rgba(10, 25, 41, 0.1), rgba(10, 25, 41, 0.72));
  color: #ffffff;
  cursor: pointer;
}

.play-layer.is-hidden {
  display: none;
}

.big-play {
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(38, 179, 175, 0.9);
  box-shadow: 0 16px 45px rgba(38, 179, 175, 0.32);
  font-size: 1.6rem;
}

.detail-panel,
.side-panel {
  padding: 1.4rem;
}

.detail-panel h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.detail-panel h2,
.side-panel h2 {
  margin-bottom: 0.85rem;
  font-size: 1.35rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
  color: var(--text-muted);
}

.detail-meta span,
.detail-meta a {
  border-radius: 999px;
  background: rgba(10, 25, 41, 0.48);
  padding: 0.35rem 0.75rem;
}

.detail-meta a {
  color: var(--harbor-300);
}

.lead-text {
  font-size: 1.08rem;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 5.2rem;
}

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

.search-summary {
  min-height: 2rem;
  color: var(--text-soft);
  margin: 1rem 0;
}

.search-page-form {
  max-width: 760px;
}

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(102, 126, 148, 0.22);
  background: rgba(16, 42, 67, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 0.85fr;
  gap: 2rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
  color: var(--text-muted);
}

.copyright {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  border-top: 1px solid rgba(102, 126, 148, 0.22);
  color: var(--text-muted);
  padding: 1.2rem 0;
  text-align: center;
  font-size: 0.92rem;
}

.is-filtered-out {
  display: none;
}

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

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

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

  .detail-side {
    position: static;
  }
}

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

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

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

  .hero-layer {
    background: linear-gradient(180deg, rgba(10, 25, 41, 0.56), var(--night-950));
  }

  .home-search-panel,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 2.8rem 6rem 1fr;
  }

  .ranking-action {
    display: none;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .home-search-panel,
  .content-section,
  .split-section,
  .page-hero,
  .detail-layout,
  .footer-grid,
  .copyright {
    width: min(100% - 1rem, 1180px);
  }

  .brand span:last-child {
    font-size: 1rem;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    width: min(100% - 1.5rem, 1180px);
  }

  .hero-actions,
  .big-search {
    align-items: stretch;
    flex-direction: column;
    border-radius: 1rem;
  }

  .big-search input,
  .big-search button {
    width: 100%;
  }

  .home-search-panel {
    padding: 1.25rem;
  }

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

  .media-row {
    grid-template-columns: 6.5rem 1fr;
  }

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

  .rank-item em {
    display: none;
  }
}
