:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.16);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --cyan-soft: rgba(34, 211, 238, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 30rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

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

.brand-text,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(90deg, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
  transition: 0.22s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.12);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.12);
  color: #ffffff;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.7) 44%, rgba(2, 6, 23, 0.32) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 36%, transparent 100%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  align-items: center;
  gap: 44px;
  padding: 74px 0 84px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 47, 73, 0.38);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-copy p {
  max-width: 690px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  color: #04111f;
  background: linear-gradient(135deg, #67e8f9, #3b82f6);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

.btn-ghost {
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.72);
}

.hero-poster {
  min-height: 480px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transform: rotate(2.5deg);
  overflow: hidden;
}

.hero-poster::after {
  content: "";
  display: block;
  height: 100%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), transparent 48%);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, #67e8f9, #3b82f6);
}

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

.main-shell {
  padding: 54px 0 72px;
}

.section-block {
  margin-top: 64px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.035em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card,
.category-card,
.rank-item,
.info-panel,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.movie-card {
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(15, 23, 42, 0.96);
}

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

.poster-image,
.poster-shade {
  position: absolute;
  inset: 0;
}

.poster-image {
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72) 0%, transparent 46%);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(34, 211, 238, 0.88);
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.32);
}

.movie-body {
  padding: 16px;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}

.mini-tags span,
.meta-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #a5f3fc;
  background: var(--cyan-soft);
  font-size: 12px;
  font-weight: 700;
}

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

.movie-body h3 a:hover,
.rank-item h3 a:hover,
.category-card h2 a:hover {
  color: #67e8f9;
}

.movie-body p {
  min-height: 3.2em;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 12px;
}

.category-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

.category-cover,
.rank-thumb,
.detail-poster {
  background-size: cover;
  background-position: center;
  background-color: #0f172a;
}

.category-cover {
  min-height: 170px;
  border-radius: 16px;
}

.category-card h2 {
  margin: 2px 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.category-links {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.category-links a {
  color: #a5f3fc;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 60px 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #03131d;
  background: linear-gradient(135deg, #67e8f9, #3b82f6);
  font-weight: 900;
}

.rank-thumb {
  width: 72px;
  height: 98px;
  border-radius: 12px;
}

.rank-item h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 70px 0 28px;
}

.page-hero h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  padding: 16px;
  margin-bottom: 26px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.68);
  padding: 0 14px;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(34, 211, 238, 0.54);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.detail-shell {
  padding: 34px 0 74px;
}

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

.breadcrumb a {
  color: #a5f3fc;
}

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

.detail-poster {
  min-height: 478px;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.42));
}

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

.detail-info p {
  margin: 18px 0 0;
  color: #cbd5e1;
}

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

.player-section,
.content-section,
.related-section {
  margin-top: 44px;
}

.player-section h2,
.content-section h2,
.related-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.36));
  cursor: pointer;
}

.video-overlay.is-hidden {
  display: none;
}

.play-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: #03131d;
  background: linear-gradient(135deg, #67e8f9, #3b82f6);
  box-shadow: 0 22px 54px rgba(34, 211, 238, 0.28);
  font-size: 28px;
}

.content-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
}

.info-panel {
  padding: 24px;
}

.info-panel p {
  margin: 0 0 16px;
  color: #cbd5e1;
}

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

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

.info-list dd {
  margin: 0;
  text-align: right;
}

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

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

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

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

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

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

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

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

  .hero-poster {
    display: none;
  }
}

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

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

  .hero-carousel,
  .hero-inner {
    min-height: 76vh;
  }

  .hero-inner {
    padding: 64px 0 88px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

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

  .category-card,
  .detail-hero,
  .content-section,
  .footer-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .category-cover {
    min-height: 220px;
  }

  .detail-poster {
    min-height: 420px;
  }

  .detail-info {
    padding: 24px;
  }

  .rank-item {
    grid-template-columns: 44px 64px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .rank-thumb {
    width: 64px;
    height: 88px;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .main-shell,
  .detail-shell,
  .footer-grid,
  .copyright,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

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

  .movie-body {
    padding: 12px;
  }

  .movie-body h3 {
    font-size: 16px;
  }

  .movie-body p {
    display: none;
  }

  .page-hero {
    padding-top: 46px;
  }
}
