:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --violet: #8b5cf6;
  --rose: #f43f5e;
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.15), transparent 28rem),
    radial-gradient(circle at 85% 18%, rgba(139, 92, 246, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #08111f 42%, #020617 100%);
}

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 rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(20px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #06111d;
  background: linear-gradient(135deg, var(--cyan), #67e8f9 45%, var(--violet));
  box-shadow: 0 10px 36px rgba(34, 211, 238, 0.36);
}

.logo-text {
  font-size: 20px;
  color: var(--text);
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
  padding: 24px 0;
}

.dropdown-panel {
  position: absolute;
  top: 64px;
  left: 50%;
  width: 230px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.dropdown-panel a:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-link,
.mobile-category-strip a {
  display: inline-flex;
  margin: 4px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
}

.mobile-link.active,
.mobile-link:hover,
.mobile-category-strip a:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}

.mobile-category-strip {
  margin-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding-top: 10px;
}

.mobile-nav.open {
  display: block;
}

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

.hero-shell {
  padding: 46px 0 18px;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: 28px;
  align-items: stretch;
  padding: 62px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.86) 38%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 52%);
}

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 13px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 22px 0 14px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 690px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.card-tags span,
.detail-tags span,
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(15, 23, 42, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary,
.btn-secondary,
.hero-control,
.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary,
.player-button {
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), #a5f3fc);
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover,
.player-button:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.68);
}

.hero-poster-panel {
  align-self: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(16px);
}

.hero-poster-panel img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.44);
}

.hero-controls {
  position: absolute;
  left: 62px;
  bottom: 38px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--cyan);
}

.section {
  padding: 58px 0 16px;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h1,
.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.04em;
}

.section-head h1,
.page-title h1,
.detail-title h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted-soft);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.76));
}

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

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.82));
}

.poster-play {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #06111d;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.34);
}

.card-body {
  padding: 18px;
}

.card-tags {
  min-height: 29px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-body h2 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--cyan);
}

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

.card-summary {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.68;
}

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

.category-card {
  position: relative;
  min-height: 164px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 44%),
    rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.38);
  transform: translateY(-4px);
}

.category-card strong {
  position: relative;
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
}

.category-card span:last-child {
  position: relative;
  color: #cbd5e1;
  line-height: 1.7;
}

.category-glow {
  position: absolute;
  width: 110px;
  height: 110px;
  right: -34px;
  top: -34px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.18);
  filter: blur(4px);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 24px;
}

.rank-list,
.side-panel,
.detail-panel,
.player-card,
.search-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.24);
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 56px 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.48);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(34, 211, 238, 0.1);
  transform: translateX(4px);
}

.rank-num {
  color: var(--cyan);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.rank-copy strong {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.side-panel {
  padding: 22px;
}

.side-panel h2 {
  margin: 0 0 16px;
}

.filter-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
}

.search-input {
  flex: 1 1 260px;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.search-input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.filter-pill {
  cursor: pointer;
}

.filter-pill.active,
.filter-pill:hover {
  color: #06111d;
  background: var(--cyan);
}

.page-title {
  padding: 56px 0 28px;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 16px;
}

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

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

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

.detail-title {
  margin-bottom: 24px;
}

.detail-title p {
  max-width: 780px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.player-card {
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.52) saturate(1.12);
}

.player-button {
  position: absolute;
  min-width: 132px;
  height: 54px;
  border: 0;
  font-size: 16px;
}

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

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

.detail-panel h2 {
  margin: 0 0 14px;
  color: var(--text);
}

.detail-panel p {
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: var(--card);
}

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

.detail-poster-info {
  padding: 18px;
}

.detail-poster-info dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px 12px;
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-poster-info dd {
  margin: 0;
}

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.66);
}

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

.footer-grid p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide {
    padding: 42px;
  }

  .hero-poster-panel {
    display: none;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
    width: min(100% - 24px, 1180px);
  }

  .main-shell,
  .hero-shell,
  .detail-hero,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .hero-shell {
    padding-top: 24px;
  }

  .hero-slider {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 30px 22px 82px;
  }

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

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

  .hero-controls {
    left: 22px;
    bottom: 28px;
  }

  .section {
    padding-top: 42px;
  }

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

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

  .card-body {
    padding: 14px;
  }

  .card-summary {
    display: none;
  }

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

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

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

  .rank-item img {
    width: 54px;
    height: 74px;
  }
}
