:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #34d399;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(52, 211, 153, 0.14), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 46%, #111827 100%);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #00110d;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.22);
}

.brand-text {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav-link {
  padding: 10px 13px;
  color: #cbd5e1;
  border-radius: 999px;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(148, 163, 184, 0.15);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(320px, 34vw);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  overflow: hidden;
}

.top-search input,
.mobile-search input,
.filter-input,
.search-hero input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input {
  flex: 1;
  padding: 11px 8px 11px 16px;
}

.top-search button,
.mobile-search button,
.search-hero button {
  border: 0;
  cursor: pointer;
  color: #06130f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.top-search button {
  align-self: stretch;
  padding: 0 16px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(100% - 32px, var(--content));
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 14px;
  color: #dbeafe;
}

.mobile-link.is-active,
.mobile-link:hover {
  background: rgba(148, 163, 184, 0.14);
}

.mobile-search {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.mobile-search input {
  flex: 1;
  padding: 11px 12px;
}

.mobile-search button {
  padding: 0 16px;
}

.hero {
  position: relative;
  min-height: 70vh;
}

.hero-viewport {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 32%, rgba(34, 211, 238, 0.22), transparent 34rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(0deg, #020617 0%, transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - var(--content)) / 2));
  bottom: clamp(48px, 12vh, 120px);
  width: min(720px, calc(100vw - 48px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.32);
  font-size: 14px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  line-height: 1.08;
}

.hero-content h1 {
  font-size: clamp(38px, 7vw, 76px);
  letter-spacing: -0.07em;
}

.hero-content h2 {
  margin-top: 14px;
  font-size: clamp(20px, 3vw, 34px);
  color: #e2e8f0;
  letter-spacing: -0.04em;
}

.hero-content p:not(.eyebrow) {
  max-width: 650px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: clamp(15px, 1.8vw, 18px);
}

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

.primary-btn,
.ghost-btn,
.soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #03120e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.2);
}

.ghost-btn,
.soft-btn {
  border: 1px solid var(--line);
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.66);
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-tag,
.info-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
  font-size: 13px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.hero-control.prev {
  left: 20px;
}

.hero-control.next {
  right: 20px;
}

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

.hero-dot {
  width: 30px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.main-content {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.content-section {
  margin-top: 52px;
}

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

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-heading p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
}

.section-link {
  color: #67e8f9;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62));
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
  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.44);
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.36);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.05);
}

.score-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #052e22;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 13px;
  font-weight: 900;
}

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

.movie-card h3,
.movie-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a,
.movie-card h2 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 7px 0 0;
  color: #a5b4fc;
  font-size: 13px;
}

.movie-line {
  min-height: 44px;
  margin: 9px 0 12px;
  color: #cbd5e1;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.24));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  margin-top: 68px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 6px;
  color: #cbd5e1;
}

.category-tile:hover img {
  transform: scale(1.06);
  opacity: 0.48;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-index {
  color: #67e8f9;
  font-size: 22px;
  font-weight: 900;
}

.rank-row img {
  width: 56px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title {
  font-weight: 850;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 60px 0 28px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgba(52, 211, 153, 0.14), transparent 26rem),
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.16), transparent 24rem);
}

.page-hero .page-heading {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-input {
  flex: 1;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.46);
}

.result-empty {
  display: none;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

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

.search-hero {
  display: flex;
  width: min(100%, 760px);
  margin-top: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.search-hero input {
  flex: 1;
  padding: 15px 20px;
}

.search-hero button {
  min-width: 104px;
  border: 0;
  cursor: pointer;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 30px;
  align-items: start;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: #67e8f9;
}

.detail-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-desc {
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0 0;
}

.player-card,
.detail-panel,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-card {
  margin-top: 28px;
}

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

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(2, 6, 23, 0.58)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.22));
  cursor: pointer;
}

.player-start[hidden] {
  display: none;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #03120e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 56px rgba(34, 211, 238, 0.28);
  font-size: 34px;
  font-weight: 900;
}

.player-caption {
  padding: 16px 18px;
  color: #cbd5e1;
  border-top: 1px solid var(--line);
}

.detail-panel {
  margin-top: 24px;
  padding: 26px;
}

.detail-panel h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.detail-panel p {
  margin: 0 0 16px;
  color: #dbeafe;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.side-card {
  padding: 18px;
}

.side-card + .side-card {
  margin-top: 18px;
}

.side-poster {
  border-radius: 22px;
  overflow: hidden;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-meta {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.side-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: #cbd5e1;
}

.side-meta strong {
  color: #fff;
}

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

.related-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.26);
}

.related-item img {
  width: 60px;
  height: 82px;
  border-radius: 10px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  line-height: 1.35;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.footer-shell {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: var(--muted);
}

.footer-brand {
  color: #fff;
  font-weight: 900;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  color: #67e8f9;
}

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

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

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

  .side-card {
    max-width: 560px;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-shell {
    height: 64px;
  }

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

  .hero-content {
    bottom: 70px;
  }

  .hero-control {
    display: none;
  }

  .section-heading,
  .page-heading,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 18px;
  }

  .hero-viewport {
    height: 76vh;
    min-height: 580px;
  }

  .hero-content {
    left: 18px;
    width: calc(100vw - 36px);
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .soft-btn {
    width: 100%;
  }

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

  .rank-row {
    grid-template-columns: 42px 48px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
