:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --rose: #fb7185;
  --amber: #f59e0b;
  --green: #34d399;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.20), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #08111f 46%, #111827 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner,
.mobile-nav,
.footer-inner,
.main-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

.brand-name {
  font-size: 20px;
}

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

.nav-link {
  color: #cbd5e1;
  padding: 9px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}

.nav-link.compact {
  font-size: 14px;
}

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

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 0 16px;
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.main-wrap {
  padding: 34px 0 64px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.78fr);
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 62px;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 58%, rgba(2, 6, 23, 0.16) 100%),
    radial-gradient(circle at 12% 26%, rgba(34, 211, 238, 0.22), transparent 24rem);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-bottom: 18px;
  color: #a5f3fc;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.42);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-actions,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(37, 99, 235, 0.36);
}

.button.ghost {
  color: #dbeafe;
  border-color: rgba(147, 197, 253, 0.25);
  background: rgba(15, 23, 42, 0.70);
  box-shadow: none;
}

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

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

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.70));
}

.hero-dots {
  position: absolute;
  left: 62px;
  bottom: 38px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

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

.quick-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin: 22px 0 54px;
}

.search-panel,
.rank-entry {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  padding: 24px;
  box-shadow: var(--shadow);
}

.search-panel h2,
.rank-entry h2 {
  margin: 0 0 10px;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.58);
  outline: none;
  padding: 0 16px;
}

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

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

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(34, 211, 238, 0.14);
  color: #a5f3fc;
  font-size: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
}

.section-heading p,
.search-panel p,
.rank-entry p,
.page-lead {
  margin: 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.70);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

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

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

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 12px 24px rgba(251, 113, 133, 0.28);
}

.card-content {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #a5b4fc;
  font-size: 13px;
}

.heat {
  color: #fde68a;
}

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

.movie-card p {
  min-height: 50px;
  margin: 0 0 12px;
  color: #b6c2d2;
  font-size: 14px;
}

.card-tags,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.42);
  font-size: 12px;
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.13), rgba(37, 99, 235, 0.06)),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #b6c2d2;
}

.page-title {
  max-width: 860px;
  margin-bottom: 34px;
}

.page-title h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.breadcrumb a {
  color: #a5f3fc;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-info,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.58));
}

.play-cover.hidden {
  display: none;
}

.play-cover span {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 52px rgba(37, 99, 235, 0.42);
  font-size: 34px;
  padding-left: 5px;
}

.detail-info {
  padding: 28px;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.detail-info .summary {
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.content-stack {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.content-panel {
  padding: 26px;
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-panel p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 68px 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
}

.rank-row .number {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--amber));
}

.rank-row img {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.rank-row h3 {
  margin: 0 0 4px;
}

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

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

.footer-inner {
  display: grid;
  gap: 18px;
  padding: 34px 0;
  color: #94a3b8;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  margin: 8px 0 0;
}

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

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

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

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

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

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

  .menu-button {
    display: block;
  }

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

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

  .hero-copy {
    padding: 42px;
  }

  .hero-visual {
    min-height: 340px;
  }

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

@media (max-width: 720px) {
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .main-wrap {
    width: min(100% - 22px, 1180px);
  }

  .brand-name {
    font-size: 17px;
  }

  .hero,
  .hero-visual {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-copy {
    padding: 28px;
  }

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

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

  .hero-dots {
    left: 28px;
    bottom: 24px;
  }

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

  .movie-card p {
    min-height: auto;
  }

  .rank-row {
    grid-template-columns: 50px 70px minmax(0, 1fr);
  }

  .rank-row .button {
    grid-column: 1 / -1;
  }
}

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

  .search-box {
    flex-direction: column;
  }

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