:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-strong: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --primary: #34d399;
  --primary-strong: #10b981;
  --primary-soft: rgba(16, 185, 129, 0.14);
  --gold: #facc15;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.22), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(14, 165, 233, 0.18), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #020617 45%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.35);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--primary), #67e8f9);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.28);
}

.nav-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.8);
  overflow: hidden;
}

.nav-search input,
.mobile-menu input,
.large-search input,
.inline-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  padding: 12px 16px;
}

.nav-search button,
.large-search button,
.mobile-menu button {
  border: 0;
  color: #052e2b;
  background: var(--primary);
  padding: 10px 18px;
  cursor: pointer;
  transition: 0.25s ease;
}

.nav-search button:hover,
.large-search button:hover,
.mobile-menu button:hover {
  background: #6ee7b7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
}

.nav-links a,
.nav-dropdown > button {
  border: 0;
  padding: 8px 0;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-dropdown:hover > button,
.nav-links .active {
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 10px;
}

.dropdown-menu a:hover {
  color: var(--text);
  background: rgba(51, 65, 85, 0.8);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.75);
  padding: 8px 12px;
}

.mobile-menu {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-menu form {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.8);
}

.mobile-menu input {
  padding: 12px;
}

.mobile-menu a {
  color: #cbd5e1;
  padding: 8px 0;
}

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

.mobile-grid a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
}

.section-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  width: min(1360px, calc(100% - 24px));
  margin: 24px auto 0;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 40px;
  padding: 70px;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.15);
  transform: scale(1.14);
  opacity: 0.25;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.8) 45%, rgba(2, 6, 23, 0.6) 100%),
    radial-gradient(circle at 75% 20%, rgba(16, 185, 129, 0.22), transparent 32%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(36px, 5.6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.quick-panel p,
.detail-line {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn.primary {
  color: #052e2b;
  background: linear-gradient(135deg, var(--primary), #67e8f9);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.26);
}

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

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

.hero-tags span,
.card-tags span,
.tag-cloud span {
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.1);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.hero-poster {
  display: block;
  justify-self: center;
  width: min(380px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.66);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

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

.hero-poster span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  color: #052e2b;
  background: var(--primary);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  left: 70px;
  bottom: 36px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

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

.quick-search,
.section-wrap.page-main {
  padding-top: 38px;
}

.quick-panel,
.page-hero,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 28px;
  padding: 28px;
}

.quick-panel h2,
.section-head h2,
.content-panel h2,
.site-footer h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.large-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.44);
}

.large-search input {
  min-height: 56px;
  padding: 0 18px;
}

.large-search button {
  min-width: 124px;
  font-weight: 900;
}

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

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

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

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

.movie-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.26);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 24px 62px rgba(16, 185, 129, 0.16);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.movie-card:not(.compact-card) .card-cover {
  aspect-ratio: 2 / 3;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.card-type,
.card-duration,
.rank-num {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-type {
  top: 10px;
  left: 10px;
  color: #052e2b;
  background: var(--primary);
  padding: 5px 9px;
}

.card-duration {
  right: 10px;
  bottom: 10px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.74);
  padding: 5px 9px;
}

.rank-num {
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #052e2b;
  background: linear-gradient(135deg, var(--gold), #fde68a);
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover {
  color: var(--primary);
}

.card-meta,
.card-desc,
.site-footer p,
.content-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.card-meta {
  min-height: 22px;
  margin: 0 0 8px;
  font-size: 13px;
}

.card-desc {
  min-height: 72px;
  margin: 0 0 12px;
  font-size: 14px;
}

.compact-card .card-desc,
.compact-card .card-tags {
  display: none;
}

.compact-card .card-body h3 {
  font-size: 15px;
}

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

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.card-foot span:first-child {
  color: var(--gold);
  font-weight: 900;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.24);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.42;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.9));
}

.category-card div {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.category-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.category-card h3 {
  margin: 8px 0;
  font-size: 26px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.page-main {
  padding-bottom: 68px;
}

.page-hero {
  padding: 42px;
}

.slim-hero {
  min-height: 260px;
}

.category-hero {
  margin-bottom: 24px;
}

.inline-filter {
  max-width: 520px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
}

.inline-filter input {
  padding: 16px 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin: 4px 0 18px;
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--primary), #67e8f9);
  box-shadow: 0 18px 48px rgba(16, 185, 129, 0.38);
  font-size: 30px;
}

.detail-info,
.content-panel {
  padding: 28px;
}

.detail-info {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 10px;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: #e2e8f0;
}

.content-panel {
  margin-top: 24px;
}

.content-panel h2 {
  font-size: 28px;
}

.content-panel p {
  margin: 16px 0 0;
  font-size: 17px;
}

.related-head {
  margin-top: 44px;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.98));
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px 0 26px;
  color: var(--muted);
  font-size: 14px;
}

.search-results:empty::before {
  content: "输入关键词后显示匹配影片";
  display: block;
  grid-column: 1 / -1;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.7);
}

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

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

  .hero-slide,
  .detail-hero,
  .quick-panel {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 820px) {
  .top-nav {
    height: auto;
    min-height: 66px;
    padding: 12px 0;
  }

  .nav-search,
  .nav-links {
    display: none;
  }

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

  .hero-slider {
    min-height: 720px;
    border-radius: 22px;
  }

  .hero-slide {
    padding: 36px 22px 70px;
  }

  .hero-dots {
    left: 22px;
    bottom: 24px;
  }

  .category-grid,
  .movie-grid,
  .rank-strip,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

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

  .page-hero,
  .detail-info,
  .content-panel {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .section-wrap,
  .footer-inner,
  .footer-bottom,
  .top-nav,
  .mobile-menu {
    width: min(100% - 22px, 1240px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 690px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-content p,
  .page-hero p,
  .quick-panel p,
  .detail-line {
    font-size: 16px;
  }

  .category-grid,
  .movie-grid,
  .rank-strip,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .large-search {
    flex-direction: column;
    border-radius: 18px;
  }

  .large-search button {
    min-height: 48px;
  }

  .player-shell,
  .movie-player {
    min-height: 260px;
  }

  .card-desc {
    min-height: auto;
  }
}
