:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-strong: #111827;
  --card: #111827;
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #06b6d4;
  --cyan-strong: #0891b2;
  --pink: #ec4899;
  --amber: #f59e0b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(6, 182, 212, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 10%, rgba(236, 72, 153, 0.13), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  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-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #001018;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--cyan), #67e8f9 48%, var(--pink));
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.24);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.12);
  transform: translateY(-1px);
}

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

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

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

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

main {
  overflow: hidden;
}

.hero-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 42px;
  padding: clamp(28px, 5vw, 72px);
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
}

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

.hero-copy {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.10);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  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: #001018;
  background: linear-gradient(135deg, #67e8f9, var(--cyan));
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.25);
}

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

.btn.small {
  min-height: 38px;
  padding: 0 15px;
  font-size: 14px;
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  transition: transform 0.35s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

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

.hero-controls {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-prev,
.hero-next,
.hero-dot {
  pointer-events: auto;
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.60);
  border: 1px solid var(--line);
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--cyan);
}

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

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

.section-head.centered {
  display: grid;
  place-items: center;
  text-align: center;
}

.section-head h2,
.feature-panel h2,
.rank-aside h2,
.content-panel h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-head p,
.feature-panel p,
.content-panel p,
.overview-card p,
.category-card p {
  color: var(--muted);
  line-height: 1.8;
}

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

.quick-search {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.48));
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-field span {
  color: #67e8f9;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.search-field input::placeholder {
  color: #64748b;
}

.toolbar-note {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

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

.category-card,
.overview-card,
.content-panel,
.feature-panel,
.rank-aside,
.player-card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.20);
}

.category-card {
  position: relative;
  min-height: 228px;
  padding: 18px;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.overview-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.48);
}

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

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

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: block;
  margin-top: 112px;
  font-size: 21px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  font-size: 13px;
}

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.30);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.07);
  filter: saturate(1.12);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, var(--cyan));
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 48px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.tag-row {
  margin-top: 14px;
}

.movie-card.is-hidden {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 24px;
  align-items: start;
}

.feature-panel,
.rank-aside,
.content-panel {
  padding: 28px;
  border-radius: var(--radius-lg);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(6, 182, 212, 0.42);
}

.rank-num {
  color: #67e8f9;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

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

.rank-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  color: var(--muted);
}

.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}

.compact-hero,
.ranking-hero {
  min-height: 360px;
  padding: clamp(30px, 6vw, 70px);
  background:
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.18), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.48));
}

.overview-grid {
  display: grid;
  gap: 18px;
}

.overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
  border-radius: var(--radius-lg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.overview-cover {
  border-radius: 20px;
  overflow: hidden;
}

.overview-cover img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.overview-card h2 {
  margin: 0;
  font-size: 30px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.mini-links a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 13px;
}

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

.rank-aside {
  position: sticky;
  top: 92px;
}

.rank-list.slim {
  max-height: 980px;
  overflow: auto;
  padding-right: 5px;
}

.detail-hero {
  min-height: 560px;
  padding: clamp(24px, 5vw, 60px);
  background-size: cover;
  background-position: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 34px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.46);
}

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

.player-section {
  margin-top: 42px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-card video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.82));
  cursor: pointer;
}

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

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, var(--cyan));
  box-shadow: 0 20px 44px rgba(6, 182, 212, 0.28);
  font-size: 34px;
}

.player-overlay strong {
  max-width: min(720px, calc(100% - 40px));
  text-align: center;
  font-size: clamp(22px, 4vw, 44px);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

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

.detail-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.detail-nav a {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.70);
}

.detail-nav a:hover {
  color: #ffffff;
  border-color: rgba(6, 182, 212, 0.42);
}

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

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

.movie-card.compact p,
.movie-card.compact .tag-row {
  display: none;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 90px auto 30px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.62);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: #ffffff;
}

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

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

.copyright {
  margin: 22px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

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

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

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

  .hero-poster,
  .detail-poster {
    max-width: 280px;
  }

  .rank-aside {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero-slider,
  .hero-track {
    min-height: 720px;
  }

  .hero-slide {
    align-content: end;
    padding: 28px 22px 82px;
  }

  .hero-controls {
    left: 18px;
    right: 18px;
  }

  .section {
    margin-top: 54px;
  }

  .section-head,
  .toolbar,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-note {
    white-space: normal;
  }

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

  .overview-card {
    grid-template-columns: 1fr;
  }

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

  .detail-copy h1,
  .page-hero h1,
  .hero-copy h1,
  .hero-copy h2 {
    font-size: clamp(34px, 11vw, 54px);
  }
}

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

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

  .hero-poster,
  .detail-poster {
    max-width: 220px;
  }
}
