:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --emerald: #34d399;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.2), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 32rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(34, 211, 238, 0.2));
  color: var(--emerald);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.18);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: var(--soft);
  font-size: 14px;
}

.desktop-nav a,
.mobile-panel a,
.site-footer nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer nav a:hover,
.text-link:hover {
  color: var(--emerald);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 270px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
}

.header-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 8px 8px 12px;
}

.header-search button,
.search-panel button {
  border: 0;
  color: #04111b;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

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

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.44) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.12);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 22%, rgba(52, 211, 153, 0.25), transparent 24rem),
    linear-gradient(0deg, var(--bg), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  min-height: 680px;
  padding: 70px 0 90px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  font-size: clamp(42px, 7vw, 78px);
}

.hero-copy h2 {
  margin-top: 18px;
  font-size: clamp(30px, 4vw, 52px);
  color: var(--soft);
}

.hero-intro {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.tag-list,
.side-tags,
.meta-chips,
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-list span,
.side-tags span,
.meta-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(6, 78, 59, 0.22);
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #031018;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 40px rgba(45, 212, 191, 0.18);
}

.btn-ghost,
.btn-wide {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.btn-wide {
  width: 100%;
  margin-top: 18px;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  background: var(--panel-strong);
}

.hero-poster img,
.poster-link img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  border-color: transparent;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

.section-block {
  padding: 72px 0;
}

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

.section-head h2,
.rank-title h2,
.side-card h2,
.detail-copy h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.slim-head {
  margin-bottom: 24px;
}

.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.category-card {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.22);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.5)),
    var(--category-image);
  background-position: center;
  background-size: cover;
  transition: transform 0.3s ease;
}

.category-card:hover::before {
  transform: scale(1.08);
}

.category-card span,
.category-card strong {
  position: relative;
  z-index: 1;
  display: block;
}

.category-card span {
  margin-bottom: 16px;
  color: var(--emerald);
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 24px 58px rgba(2, 6, 23, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.07);
  filter: brightness(1.08);
}

.type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #032014;
  background: var(--emerald);
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  padding: 14px;
}

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

.movie-card h3 a:hover {
  color: var(--emerald);
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.card-desc {
  display: -webkit-box;
  min-height: 40px;
  margin-top: 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list {
  margin-top: 12px;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.side-card,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.rank-title {
  margin-bottom: 18px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 38px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(52, 211, 153, 0.45);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  color: #031018;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text strong {
  font-size: 14px;
}

.rank-text em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-main,
.watch-page {
  min-height: 70vh;
}

.page-hero {
  padding: 86px 0 58px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 14% 20%, rgba(52, 211, 153, 0.15), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0));
}

.page-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.9;
}

.small-actions {
  margin-top: 24px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px 120px;
  gap: 12px;
  margin-top: 28px;
  padding: 14px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  outline: 0;
  color: var(--text);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.6);
  padding: 12px 14px;
}

.filter-pills {
  margin-top: 18px;
}

.filter-pills button {
  border: 1px solid var(--line);
  color: var(--soft);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  padding: 9px 13px;
  cursor: pointer;
}

.filter-pills button.is-active,
.filter-pills button:hover {
  color: #031018;
  border-color: transparent;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

.search-grid .movie-card.is-hidden {
  display: none;
}

.watch-shell {
  padding: 36px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--emerald);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: #031018;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 22px 58px rgba(34, 211, 238, 0.25);
  font-size: 28px;
}

.player-start strong {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
}

.detail-copy {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.detail-copy h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.lead-text,
.detail-copy p {
  color: var(--soft);
  line-height: 1.95;
}

.lead-text {
  margin-top: 18px;
  font-size: 18px;
}

.meta-chips {
  margin: 22px 0 28px;
}

.detail-copy h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.side-card {
  padding: 20px;
}

.side-card p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.side-card strong {
  color: var(--text);
  text-align: right;
}

.side-tags {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer nav {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

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

  .feature-grid,
  .watch-layout {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero-slider,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 52px;
  }

  .hero-poster {
    width: min(260px, 72vw);
  }

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

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

  .search-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 64px;
  }

  .logo {
    font-size: 19px;
  }

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-intro {
    font-size: 15px;
  }

  .section-block {
    padding: 48px 0;
  }

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

  .category-grid,
  .large-category-grid,
  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .detail-side {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .card-desc,
  .tag-list {
    display: none;
  }

  .watch-shell {
    padding-top: 20px;
  }

  .detail-copy {
    padding: 20px;
  }

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

  .player-start span {
    width: 62px;
    height: 62px;
  }
}
