:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --red: #ef4444;
  --blue: #38bdf8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(56, 189, 248, 0.12), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(148, 163, 184, 0.12);
}

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

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

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

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
}

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

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

.hero {
  position: relative;
  min-height: 640px;
  margin: 28px auto 56px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 38px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.75) 48%, rgba(2, 6, 23, 0.45) 100%),
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.24), transparent 38rem);
  z-index: 1;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #fbbf24;
  font-weight: 800;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.8);
}

.hero h1 {
  max-width: 850px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

.hero-meta,
.movie-meta,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--soft);
}

.hero-actions,
.section-title-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.23);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(245, 158, 11, 0.34);
}

.btn.secondary {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-art {
  align-self: stretch;
  min-height: 430px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-slide.active .hero-art img {
  transform: scale(1.04);
}

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

.hero-dot {
  width: 44px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.active {
  background: #fbbf24;
}

.section {
  margin: 48px 0;
}

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

.section-subtitle {
  margin: 8px 0 0;
  color: var(--soft);
}

.section-title-row {
  justify-content: space-between;
  margin-bottom: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 55px rgba(245, 158, 11, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
}

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

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

.type-badge,
.score-badge,
.rank-no {
  position: absolute;
  top: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  left: 10px;
  background: rgba(2, 6, 23, 0.72);
}

.score-badge {
  right: 10px;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.movie-card-body {
  padding: 14px;
}

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.32;
}

.movie-card h2 a:hover,
.text-link:hover {
  color: #fbbf24;
}

.movie-meta {
  margin: 0 0 8px;
  font-size: 13px;
}

.movie-line {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.meta-pill,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.tag-row span {
  padding: 3px 8px;
}

.meta-pill,
.filter-chip {
  padding: 8px 12px;
}

.filter-chip {
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
  color: white;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.16);
}

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

.category-card {
  min-height: 176px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(56, 189, 248, 0.06)),
    rgba(15, 23, 42, 0.86);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
}

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

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

.search-panel,
.info-panel,
.player-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.search-panel {
  padding: 22px;
  margin: 30px 0;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

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

.search-form input:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-index {
  color: #fbbf24;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

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

.rank-title {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 800;
}

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

.page-hero {
  margin: 30px 0;
  padding: 42px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 10%, rgba(245, 158, 11, 0.18), transparent 32rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 28px;
  margin: 30px 0 44px;
}

.player-panel {
  overflow: hidden;
}

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

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

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

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

.play-button-core {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 22px 54px rgba(239, 68, 68, 0.34);
  font-weight: 900;
}

.detail-main-copy {
  padding: 24px;
}

.detail-main-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.detail-main-copy p {
  color: var(--muted);
}

.info-panel {
  padding: 22px;
  align-self: start;
}

.detail-cover {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  margin-bottom: 18px;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-table {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

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

.info-table strong {
  color: white;
  white-space: nowrap;
}

.article-block {
  margin: 28px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.article-block p {
  margin: 0;
  color: var(--muted);
}

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

.mini-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
}

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

.mini-card span {
  display: block;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  display: none;
  margin: 22px 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
  background: var(--panel);
}

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

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

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

.site-footer p,
.site-footer a,
.footer-bottom {
  color: var(--soft);
}

.site-footer a:hover {
  color: #fbbf24;
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 44px;
  }

  .hero-art {
    min-height: 260px;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .nav-wrap {
    height: 68px;
  }

  .brand {
    font-size: 20px;
  }

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

  .hero-slide {
    padding: 26px;
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 42px 62px 1fr;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 28px;
  }

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

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