:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: #cbd5e1;
  --muted-dark: #94a3b8;
  --gold: #facc15;
  --gold-2: #eab308;
  --purple: #581c87;
  --rose: #9f1239;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(250, 204, 21, 0.12), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(147, 51, 234, 0.18), transparent 32%),
    linear-gradient(180deg, #0f172a 0%, #17113a 48%, #0f172a 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

img {
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

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

.header-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 10px 28px rgba(250, 204, 21, 0.24);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: rotate(8deg) scale(1.04);
}

.brand-title {
  display: block;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.05;
  background: linear-gradient(90deg, #fde047, #fff7ad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.main-nav a {
  color: #f8fafc;
  font-weight: 700;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--gold);
}

.header-search {
  position: relative;
  width: 228px;
}

.header-search input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus {
  border-color: rgba(250, 204, 21, 0.70);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.14);
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  color: var(--gold);
  background: transparent;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 9px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 14px 0 18px;
}

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

.mobile-panel a {
  display: block;
  padding: 11px 0;
  color: #f8fafc;
  font-weight: 800;
}

.mobile-panel .header-search {
  width: 100%;
  margin-top: 10px;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-bg::before {
  background: linear-gradient(0deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.60) 48%, rgba(15, 23, 42, 0.12));
}

.hero-bg::after {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0.78));
}

.hero-content {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 84px 0 92px;
}

.hero-copy {
  width: min(680px, 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 950;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.40);
}

.hero-desc {
  margin: 20px 0 0;
  max-width: 650px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.badge.gold {
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border: 0;
  font-weight: 900;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  box-shadow: 0 14px 32px rgba(250, 204, 21, 0.25);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

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

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

.hero-dot.active {
  width: 36px;
  background: var(--gold);
}

.main-content {
  padding: 56px 0 80px;
}

.section {
  margin-bottom: 64px;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 900;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 950;
}

.section-desc {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.movie-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x proximity;
}

.movie-row .movie-card {
  min-width: 290px;
  max-width: 290px;
  scroll-snap-align: start;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, 0.46);
  background: rgba(255, 255, 255, 0.10);
}

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

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

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

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

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.22s ease;
}

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

.play-circle {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #111827;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(250, 204, 21, 0.35);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  color: #dbeafe;
  font-size: 13px;
}

.meta-pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 25% 18%, rgba(250, 204, 21, 0.24), transparent 35%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.38), rgba(15, 23, 42, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.46);
}

.category-card strong {
  display: block;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.category-card h2,
.category-card h3 {
  margin: 12px 0 10px;
  font-size: 24px;
  font-weight: 950;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(250, 204, 21, 0.70);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.11);
}

.page-hero {
  padding: 70px 0 34px;
}

.page-card {
  padding: 32px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(250, 204, 21, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.detail-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
}

.detail-desc {
  max-width: 820px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.player-section {
  margin: 34px 0 48px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.74));
}

.play-layer.is-hidden {
  display: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-radius: 50%;
  font-size: 28px;
  box-shadow: 0 18px 46px rgba(250, 204, 21, 0.30);
}

.content-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.article-panel,
.side-panel {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.article-panel p {
  color: #dbeafe;
  line-height: 1.9;
  margin: 0 0 18px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.side-link img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  line-height: 1.35;
}

.side-link span {
  display: block;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.5;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 66px 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(250, 204, 21, 0.44);
}

.rank-no {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-radius: 16px;
  font-weight: 950;
}

.rank-item img {
  width: 160px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
}

.rank-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

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

.empty-result {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.site-footer {
  padding: 46px 0;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-grid p,
.footer-grid li {
  line-height: 1.8;
}

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

.footer-grid a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 70;
  width: 48px;
  height: 48px;
  display: none;
  place-items: center;
  border: 0;
  color: #111827;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.30);
}

.back-top.show {
  display: grid;
}

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

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

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

@media (max-width: 860px) {
  .main-nav,
  .desktop-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-row {
    min-height: 64px;
  }

  .hero-slider,
  .hero-content {
    min-height: 640px;
  }

  .section-head,
  .footer-bottom {
    display: block;
  }

  .section-actions {
    margin-top: 16px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(270px, 70vw);
  }

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

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-no {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .rank-item img {
    width: 104px;
  }

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

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

  .brand-subtitle {
    display: none;
  }

  .hero-content {
    padding-top: 68px;
  }

  .hero-actions,
  .section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .movie-row .movie-card {
    min-width: 235px;
    max-width: 235px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-desc {
    font-size: 13px;
  }

  .page-card,
  .article-panel,
  .side-panel {
    padding: 20px;
  }

  .side-link {
    grid-template-columns: 82px 1fr;
  }

  .side-link img {
    width: 82px;
  }
}
