:root {
  --color-navy: #0a2540;
  --color-blue: #1a4d7a;
  --color-cyan: #4fb3bf;
  --color-sky: #74b9ff;
  --color-orange: #ff9f43;
  --color-red: #ff6b6b;
  --color-text: #ffffff;
  --color-muted: rgba(255, 255, 255, 0.68);
  --color-soft: rgba(255, 255, 255, 0.1);
  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--color-navy), var(--color-blue));
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  min-height: 65vh;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.glass-effect,
.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-sky));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-width: 0 0 1px;
}

.site-header__inner {
  width: min(100% - 32px, var(--container));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.site-logo__mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-sky));
  box-shadow: 0 8px 20px rgba(79, 179, 191, 0.28);
}

.site-logo__text {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
}

.nav-link,
.mobile-link {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 650;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--color-cyan);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-cyan);
}

.mobile-menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.hero,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background-position: center;
  background-size: cover;
}

.hero--home {
  min-height: min(82vh, 820px);
  display: grid;
  place-items: center;
  text-align: center;
}

.hero--home::before,
.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(79, 179, 191, 0.24), transparent 28%),
    radial-gradient(circle at 80% 15%, rgba(116, 185, 255, 0.18), transparent 25%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 900px);
  padding: 96px 0;
}

.hero__eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
}

.hero p,
.page-hero p,
.detail-hero p {
  max-width: 760px;
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2.2vw, 1.24rem);
  line-height: 1.8;
}

.hero-search,
.mini-search {
  display: flex;
  width: min(100%, 680px);
  margin: 32px auto 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.hero-search input,
.mini-search input,
.filter-toolbar input,
.filter-toolbar select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-search input,
.mini-search input {
  flex: 1;
  padding: 14px 16px;
}

.hero-search input::placeholder,
.mini-search input::placeholder,
.filter-toolbar input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.hero-search button,
.mini-search button,
.button {
  border: 0;
  border-radius: 12px;
  padding: 14px 22px;
  color: #ffffff;
  background: var(--color-cyan);
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-search button:hover,
.mini-search button:hover,
.button:hover {
  transform: translateY(-2px);
  background: #3a9aa5;
  box-shadow: 0 12px 28px rgba(79, 179, 191, 0.28);
}

.hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.hero-stats span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.78);
}

.hero-stats strong {
  color: #ffffff;
}

.page-hero {
  padding: 94px 0 72px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(10, 37, 64, 0.92), rgba(26, 77, 122, 0.86)),
    radial-gradient(circle at 50% 0%, rgba(79, 179, 191, 0.25), transparent 40%);
}

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

.section {
  padding: clamp(56px, 8vw, 112px) 0;
}

.section--dark {
  background: var(--color-navy);
}

.section--blue {
  background: linear-gradient(180deg, var(--color-navy), var(--color-blue));
}

.section--blend {
  background: linear-gradient(180deg, var(--color-blue), var(--color-navy));
}

.section--blend-reverse {
  background: linear-gradient(180deg, var(--color-navy), var(--color-blue));
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--color-muted);
  line-height: 1.8;
}

.section-more {
  flex: 0 0 auto;
  color: var(--color-cyan);
  font-weight: 800;
}

.movie-grid,
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 22px;
}

.featured-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.movie-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-card);
}

.movie-card--compact {
  border-radius: 18px;
}

.movie-poster {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(79, 179, 191, 0.2), rgba(116, 185, 255, 0.08));
}

.featured-grid .movie-poster {
  aspect-ratio: 4 / 5;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.68));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .movie-poster::after {
  opacity: 1;
}

.movie-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 159, 67, 0.94);
  font-size: 0.76rem;
  font-weight: 800;
}

.play-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

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

.movie-info h3 {
  min-height: 2.6em;
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-info p {
  min-height: 3.2em;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.86rem;
}

.movie-genre {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-grid,
.category-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
}

.category-tile span,
.category-card span {
  color: var(--accent, var(--color-cyan));
  font-weight: 850;
}

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

.category-tile p,
.category-card p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.category-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-card);
}

.category-card img {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

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

.home-panel {
  align-self: start;
  padding: 26px;
  border-radius: var(--radius-lg);
}

.home-panel h2,
.glass-panel h2 {
  margin: 0 0 14px;
}

.home-panel p,
.prose-panel p {
  color: var(--color-muted);
  line-height: 1.9;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.1);
}

.rank-row--hot .rank-number {
  color: var(--color-orange);
}

.rank-number {
  font-size: 1.25rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.45);
}

.rank-row img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.rank-title {
  min-width: 0;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.86rem;
}

.filter-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
}

.filter-toolbar label {
  display: grid;
  gap: 8px;
  min-width: 220px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.filter-toolbar input,
.filter-toolbar select {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.filter-count,
.search-status {
  color: var(--color-muted);
  font-weight: 700;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

.pagination a.is-current,
.pagination a:hover {
  background: var(--color-cyan);
  color: #ffffff;
}

.detail-hero {
  padding: 74px 0;
}

.detail-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
}

.detail-hero__content p {
  margin-left: 0;
}

.detail-meta {
  margin-top: 20px;
  gap: 12px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag-cloud span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(79, 179, 191, 0.16);
  color: #bceff4;
  font-size: 0.86rem;
  font-weight: 700;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-card);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.player-overlay__icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(79, 179, 191, 0.92);
  font-size: 2rem;
  box-shadow: 0 18px 40px rgba(79, 179, 191, 0.34);
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.16);
  color: #ffd8d8;
}

.player-error:not(:empty) {
  display: block;
}

.prose-panel,
.sticky-panel {
  padding: 26px;
  border-radius: var(--radius-lg);
}

.prose-panel .lead {
  color: #ffffff;
  font-weight: 750;
}

.detail-sidebar {
  min-width: 0;
}

.sticky-panel {
  position: sticky;
  top: 98px;
}

.movie-grid--sidebar {
  grid-template-columns: 1fr;
  gap: 14px;
}

.movie-grid--sidebar .movie-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-radius: 16px;
}

.movie-grid--sidebar .movie-poster {
  height: 100%;
  aspect-ratio: auto;
}

.movie-grid--sidebar .movie-info p,
.movie-grid--sidebar .movie-genre,
.movie-grid--sidebar .play-bubble {
  display: none;
}

.site-footer {
  background: var(--color-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 30px;
  padding: 54px 0 34px;
}

.footer-grid h2 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.footer-grid p,
.footer-grid a {
  display: block;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.8;
}

.footer-grid a:hover {
  color: var(--color-cyan);
}

.footer-bottom {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 20px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
}

.search-status {
  margin-bottom: 22px;
}

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

@media (max-width: 1024px) {
  .featured-grid,
  .split-layout,
  .detail-layout,
  .detail-hero__grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .sticky-panel {
    position: static;
  }
}

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

  .mobile-menu-toggle {
    display: block;
  }

  .hero__content {
    padding: 70px 0;
  }

  .hero-search,
  .mini-search {
    flex-direction: column;
  }

  .hero-search button,
  .mini-search button {
    width: 100%;
  }

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

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

  .movie-info p,
  .movie-genre {
    display: none;
  }

  .movie-info h3 {
    min-height: 2.4em;
    font-size: 0.92rem;
  }

  .rank-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

  .category-card {
    grid-template-columns: 88px 1fr;
  }

  .category-card img {
    width: 88px;
    height: 118px;
  }

  .movie-grid--sidebar .movie-card {
    grid-template-columns: 92px 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .container,
  .site-header__inner,
  .mobile-nav,
  .footer-bottom {
    width: min(100% - 22px, var(--container));
  }

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

  .movie-info {
    padding: 10px;
  }

  .movie-badge {
    font-size: 0.68rem;
  }
}
