:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --line: rgba(34, 211, 238, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.20), transparent 28rem),
    radial-gradient(circle at 88% 10%, rgba(59, 130, 246, 0.18), transparent 32rem),
    radial-gradient(circle at 50% 72%, rgba(139, 92, 246, 0.14), transparent 34rem),
    var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1220px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
}

.logo-text {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(34, 211, 238, 0.10);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

.top-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  padding: 10px 14px;
}

.top-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.play-btn {
  border: 0;
  color: white;
  cursor: pointer;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.top-search button,
.mobile-search button {
  padding: 10px 16px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 700;
}

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

.top-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.22);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  color: white;
  background: rgba(15, 23, 42, 0.72);
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.92);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

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

.hero {
  position: relative;
  min-height: 640px;
  margin: 26px auto 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.82));
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  min-height: 640px;
  position: relative;
  isolation: isolate;
}

.hero-slide.active {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  align-items: center;
  gap: 36px;
  padding: 70px 64px 54px;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(1.25);
  transform: scale(1.12);
  opacity: 0.38;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 42%, rgba(15, 23, 42, 0.42) 100%),
    radial-gradient(circle at 40% 40%, rgba(34, 211, 238, 0.15), transparent 38rem);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a5f3fc;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-title h1,
.detail-title h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h1 span,
.page-title h1 span,
.detail-title h1 span {
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #c084fc, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead,
.page-title p,
.detail-title p {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

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

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

.hero-meta span,
.tag-row span,
.info-pill,
.category-chip a {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 999px;
  padding: 7px 11px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.64);
}

.hero-visual {
  position: relative;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.42);
}

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

.hero-card {
  position: absolute;
  right: -18px;
  bottom: 28px;
  width: min(320px, 86%);
  padding: 18px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.hero-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

.hero-dots button.active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.category-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 0;
}

.section {
  margin: 42px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-head a {
  flex: 0 0 auto;
  color: #a5f3fc;
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.70);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.32);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.84));
}

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  line-height: 1;
}

.score {
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  padding: 10px;
  text-align: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover {
  color: #67e8f9;
}

.meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #cbd5e1;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  padding: 5px 9px;
  font-size: 13px;
}

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

.category-card {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  background:
    radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.22), transparent 12rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.62));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.20);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.category-card span {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: #67e8f9;
  font-weight: 800;
}

.filter-bar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.70);
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  outline: none;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.44);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 84px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.70);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.22));
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.rank-hot {
  color: #a5f3fc;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 18px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 28px;
  align-items: stretch;
  margin: 0 0 34px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 30px;
  background:
    radial-gradient(circle at 88% 16%, rgba(34, 211, 238, 0.16), transparent 18rem),
    rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.long-text {
  color: #dbeafe;
  font-size: 17px;
  line-height: 2;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78)),
    var(--poster-image) center / cover no-repeat;
}

.play-mask[hidden] {
  display: none;
}

.play-btn {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  font-size: 34px;
  box-shadow: 0 24px 58px rgba(34, 211, 238, 0.25);
}

.content-box {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.70);
}

.content-box h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.content-box p {
  margin: 0;
  color: #dbeafe;
  line-height: 2;
}

.search-results {
  min-height: 360px;
}

.empty-state {
  display: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.70);
}

.empty-state.show {
  display: block;
}

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

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

.footer-inner p {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

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

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

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

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

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

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

  .hero-visual {
    max-width: 460px;
  }
}

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

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

  .header-inner {
    min-height: 62px;
  }

  .logo-text {
    font-size: 18px;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide.active {
    padding: 38px 22px 84px;
  }

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

  .hero h1 {
    font-size: 42px;
  }

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

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

  .section-head,
  .page-title,
  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 44px 68px 1fr;
  }

  .rank-hot {
    grid-column: 3;
  }

  .detail-panel,
  .content-box {
    padding: 20px;
  }

  .detail-poster img {
    min-height: 0;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-thumb {
    width: 120px;
  }
}
