:root {
  --bg-deep: #0a2540;
  --bg-mid: #1a4d7a;
  --brand: #4fb3bf;
  --brand-strong: #3a9aa5;
  --warm: #ff9f43;
  --hot: #ff6b6b;
  --blue: #74b9ff;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.065);
  --card-strong: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --radius: 22px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -8%, rgba(79, 179, 191, 0.32), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(255, 159, 67, 0.16), transparent 28%),
    linear-gradient(180deg, var(--bg-deep), var(--bg-mid) 48%, var(--bg-deep));
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
}

body.no-scroll {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(79, 179, 191, 0.18), rgba(10, 37, 64, 0.88));
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 37, 64, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16);
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  box-shadow: 0 12px 28px rgba(79, 179, 191, 0.24);
}

.brand-text,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(120deg, #ffffff, var(--brand) 56%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.main-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 650;
  transition: color 0.22s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: white;
}

.main-nav a.is-active::after,
.main-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.top-search {
  width: 300px;
  height: 42px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.top-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: white;
  padding: 0 16px;
  background: transparent;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.top-search button {
  height: 100%;
  border: 0;
  color: white;
  cursor: pointer;
  padding: 0 18px;
  background: var(--brand);
  transition: background 0.2s ease;
}

.top-search button:hover {
  background: var(--brand-strong);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: white;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-panel {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 37, 64, 0.96);
}

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

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-brand {
  font-weight: 800;
  color: var(--brand);
  padding: 4px 12px 8px;
}

.hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 37, 64, 0.96), rgba(10, 37, 64, 0.58) 45%, rgba(10, 37, 64, 0.72)),
    radial-gradient(circle at 76% 30%, rgba(79, 179, 191, 0.26), transparent 30%);
  z-index: 1;
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 48px;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0 78px;
  z-index: 2;
}

.hero-slide.is-active {
  display: grid;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(79, 179, 191, 0.36);
  border-radius: 999px;
  color: #d9fbff;
  background: rgba(79, 179, 191, 0.12);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.hero h1 span {
  display: block;
  background: linear-gradient(120deg, #ffffff, var(--brand) 52%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 26px;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-meta span,
.tag-row span,
.info-tags span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  box-shadow: 0 18px 40px rgba(79, 179, 191, 0.24);
}

.btn-primary:hover,
.btn-ghost:hover,
.movie-card:hover,
.category-tile:hover,
.compact-card:hover {
  transform: translateY(-4px);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(420px, 100%);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(1.2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.78));
}

.hero-card-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.hero-card-caption strong {
  display: block;
  font-size: 24px;
}

.hero-card-caption em {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.25);
}

.hero-dots button.is-active {
  background: var(--brand);
}

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.section.tight {
  padding-top: 36px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(79, 179, 191, 0.44);
  background: var(--card-strong);
}

.card-link {
  display: grid;
  min-height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.84));
}

.play-pill {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(79, 179, 191, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--hot), var(--warm));
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.tag-row,
.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 4px 8px;
  color: #d9fbff;
  background: rgba(79, 179, 191, 0.14);
  font-size: 12px;
}

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

.side-panel,
.info-panel,
.text-panel,
.player-shell,
.category-tile,
.toolbar,
.breadcrumb,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.side-panel h2,
.info-panel h2,
.text-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 42px 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  transition: transform 0.22s ease, background 0.22s ease;
}

.compact-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.compact-card img {
  width: 74px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.35;
}

.compact-card em {
  display: block;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-style: normal;
}

.mini-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  background: rgba(79, 179, 191, 0.22);
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -25% -10% auto auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--accent, var(--brand));
  opacity: 0.18;
  filter: blur(8px);
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.category-tile span {
  position: relative;
  display: inline-flex;
  color: var(--brand);
  font-weight: 800;
}

.page-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 32px;
}

.page-hero h1 {
  margin: 0 0 14px;
  max-width: 940px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: white;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
}

.toolbar input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.toolbar select option {
  color: #0a2540;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 0;
  padding: 12px 14px;
}

.breadcrumb a,
.breadcrumb span {
  font-size: 13px;
}

.player-shell {
  overflow: hidden;
  background: black;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(79, 179, 191, 0.18), rgba(0, 0, 0, 0.74)),
    rgba(0, 0, 0, 0.32);
}

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

.player-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 34px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  box-shadow: 0 18px 50px rgba(79, 179, 191, 0.36);
}

.detail-layout {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 0;
  align-items: start;
}

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

.info-panel,
.text-panel {
  padding: 24px;
}

.movie-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.66);
}

.info-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.summary-lead {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.text-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.detail-side {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 96px;
}

.cover-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
}

.cover-panel img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.cover-panel div {
  padding: 18px;
}

.cover-panel strong {
  display: block;
  font-size: 20px;
}

.cover-panel em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(6, 24, 42, 0.72);
}

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: 34px;
}

.footer-grid p {
  max-width: 460px;
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.64);
}

.footer-links a:hover {
  color: var(--brand);
}

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

@media (max-width: 1120px) {
  .top-search {
    display: none;
  }

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

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

  .side-panel,
  .detail-side {
    position: static;
  }
}

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

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

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 56px;
  }

  .hero-poster {
    justify-self: start;
    width: min(300px, 78vw);
  }

  .section-head {
    display: block;
  }

  .more-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 620px) {
  .nav-shell,
  .section,
  .page-hero,
  .detail-layout,
  .breadcrumb,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, var(--max));
  }

  .brand-text {
    font-size: 19px;
  }

  .hero {
    min-height: 720px;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body p {
    display: none;
  }

  .compact-card {
    grid-template-columns: 32px 64px minmax(0, 1fr);
  }

  .compact-card img {
    width: 64px;
    height: 50px;
  }
}
