:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #06b6d4;
  --cyan-strong: #0891b2;
  --blue: #2563eb;
  --orange: #fb923c;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  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 20% 0%, rgba(6, 182, 212, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 8%, rgba(37, 99, 235, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.38);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.45);
}

.logo-text {
  font-size: 25px;
  background: linear-gradient(90deg, #67e8f9, #38bdf8, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.2s ease;
}

.nav-link {
  min-height: 40px;
  padding: 0 16px;
}

.nav-link:hover,
.mobile-link:hover {
  color: white;
  background: rgba(51, 65, 85, 0.72);
}

.nav-link.is-active,
.mobile-link.is-active {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 36px rgba(6, 182, 212, 0.24);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.75);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: white;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-link {
  min-height: 44px;
}

.hero-section {
  position: relative;
  height: min(760px, 76vh);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.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 {
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
  background: #0f172a;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
  position: absolute;
  inset: auto 0 82px;
  z-index: 2;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.88);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.32);
  font-weight: 700;
  font-size: 14px;
}

.hero-title {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

.hero-actions,
.section-head,
.card-meta,
.detail-meta,
.breadcrumb,
.result-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.rank-action,
.play-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-button,
.play-action {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 42px rgba(6, 182, 212, 0.28);
}

.primary-button:hover,
.play-action:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 56px rgba(6, 182, 212, 0.4);
}

.secondary-button {
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(226, 232, 240, 0.18);
  backdrop-filter: blur(14px);
}

.secondary-button:hover {
  background: rgba(51, 65, 85, 0.84);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 38px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.65);
}

.section {
  padding: 72px 0;
}

.section.compact-section {
  padding-top: 42px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 9px;
  color: #67e8f9;
  font-weight: 800;
}

.section-title,
.page-title,
.detail-title {
  margin: 0;
  color: white;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: clamp(28px, 3.3vw, 42px);
}

.page-title {
  font-size: clamp(36px, 5vw, 60px);
}

.section-lead,
.page-lead,
.detail-lead {
  color: var(--muted);
  line-height: 1.8;
}

.page-hero {
  padding: 78px 0 46px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 30% 10%, rgba(6, 182, 212, 0.18), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.28));
}

.category-grid,
.movie-grid,
.result-grid {
  display: grid;
  gap: 22px;
}

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

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

.category-card,
.info-panel,
.content-card,
.side-card,
.search-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(18px);
}

.category-card {
  position: relative;
  min-height: 188px;
  padding: 24px;
  overflow: hidden;
  transition: 0.25s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -55px;
  bottom: -70px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.28), transparent 68%);
}

.category-card:hover,
.movie-card:hover,
.side-card:hover {
  transform: translateY(-5px);
  border-color: rgba(103, 232, 249, 0.52);
  box-shadow: var(--shadow);
}

.category-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(37, 99, 235, 0.18));
  font-size: 25px;
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: white;
  font-size: 22px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.22);
  transition: 0.25s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.movie-card:hover img,
.side-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.86);
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.34);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.region-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.region-badge {
  left: 12px;
  background: rgba(6, 182, 212, 0.92);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  color: white;
  font-size: 18px;
  line-height: 1.32;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: #67e8f9;
}

.card-line {
  min-height: 46px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
}

.card-tags {
  color: #7dd3fc;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card.compact .card-tags {
  display: none;
}

.rank-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.75);
  transition: 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(103, 232, 249, 0.46);
  background: rgba(15, 23, 42, 0.96);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  font-weight: 950;
}

.rank-item img {
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

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

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

.rank-info span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-action {
  min-height: 36px;
  padding: 0 14px;
  background: rgba(6, 182, 212, 0.22);
  color: #67e8f9;
}

.info-panel,
.content-card,
.search-panel {
  padding: 26px;
}

.info-panel h2,
.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: white;
}

.info-panel p,
.content-card p,
.side-card p {
  color: var(--soft);
  line-height: 1.86;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
}

.search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  color: white;
  border: 1px solid var(--border);
  border-radius: 15px;
  outline: none;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.search-input:focus {
  border-color: rgba(103, 232, 249, 0.66);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.detail-hero {
  padding: 54px 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
}

.detail-title {
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.1;
}

.detail-lead {
  margin: 0 0 24px;
  font-size: 18px;
}

.detail-meta {
  margin-bottom: 18px;
}

.meta-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.meta-pill {
  color: #e0f2fe;
  border: 1px solid rgba(103, 232, 249, 0.25);
  background: rgba(8, 145, 178, 0.16);
}

.tag {
  margin: 0 8px 8px 0;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.7);
}

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

.player-section {
  margin-bottom: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.38);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.52);
}

.play-action {
  position: relative;
  z-index: 2;
  min-height: 58px;
  padding: 0 30px;
  font-size: 18px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  transition: 0.2s ease;
}

.side-card img {
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.side-card strong {
  display: block;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.56;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-grid {
  margin-top: 26px;
}

.search-result {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  transition: 0.22s ease;
}

.search-result:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.5);
}

.search-result img {
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.search-result strong {
  display: block;
  margin-bottom: 8px;
  color: white;
}

.search-result p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 14px;
  color: white;
  font-size: 20px;
}

.site-footer p {
  max-width: 480px;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

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

.footer-bottom {
  padding: 18px 16px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

  .rank-wrap,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

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

  .hero-section {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    inset: auto 0 74px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 260px;
  }

  .section {
    padding: 48px 0;
  }

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

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

  .rank-action {
    display: none;
  }

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

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-title {
    font-size: 40px;
  }

  .page-hero {
    padding: 54px 0 32px;
  }

  .card-line {
    min-height: auto;
  }

  .search-result {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
