:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.2);
  --line-bright: rgba(245, 158, 11, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-bright: #fbbf24;
  --orange: #f97316;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.12), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 20px;
}

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

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

.brand-text {
  font-size: 1.08rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
  background: rgba(255, 255, 255, 0.07);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.header-search input {
  padding: 11px 14px;
  border-radius: 999px;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.header-search button,
.filter-panel button,
.btn {
  border: 0;
  cursor: pointer;
}

.header-search button {
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--amber);
  color: #ffffff;
  font-weight: 750;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
}

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

.mobile-panel {
  display: none;
  padding: 0 20px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-links,
.mobile-categories {
  display: grid;
  gap: 8px;
  max-width: var(--max);
  margin: 0 auto;
}

.mobile-links {
  grid-template-columns: repeat(4, 1fr);
  padding-top: 16px;
}

.mobile-categories {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 12px;
}

.mobile-links a,
.mobile-categories a {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  text-align: center;
}

.page-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 20px 76px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 72vh;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-slide {
  display: none;
  min-height: 72vh;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.8fr);
  gap: clamp(28px, 6vw, 76px);
  max-width: var(--max);
  margin: 0 auto;
  padding: 76px 20px 90px;
  animation: fadeUp 0.75s ease both;
}

.hero-slide.active {
  display: grid;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.98)),
    radial-gradient(circle at 72% 28%, rgba(245, 158, 11, 0.24), transparent 34rem);
}

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

.hero-kicker,
.section-kicker,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-kicker span,
.badge,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.hero-kicker span {
  padding: 7px 12px;
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero h1 a:hover,
.movie-card h3 a:hover,
.text-link:hover,
.footer-links a:hover,
.category-body h2 a:hover,
.breadcrumbs a:hover,
.detail-title a:hover {
  color: #fbbf24;
}

.hero-desc {
  max-width: 690px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-quick a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-quick a:hover {
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

.hero-media {
  align-self: stretch;
  display: grid;
  align-items: center;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.hero-poster img {
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

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

.hero-poster-info {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
}

.hero-poster-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.hero-poster-info em {
  color: #cbd5e1;
  font-style: normal;
}

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

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

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

.section {
  margin-top: 70px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-title {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.section-desc,
.lead {
  max-width: 780px;
  color: #cbd5e1;
  line-height: 1.9;
}

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

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

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

.movie-card,
.category-card,
.info-card,
.detail-panel,
.filter-panel,
.rank-list,
.player-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

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

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

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

.poster-mask {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #ffffff;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.card-body {
  padding: 16px 16px 18px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.86rem;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 1.04rem;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.6em;
  margin: 0 0 12px;
  overflow: hidden;
  color: #94a3b8;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  font-size: 0.78rem;
}

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

.category-card {
  overflow: hidden;
  border-radius: 26px;
}

.category-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.category-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-cover img {
  transform: scale(1.06);
}

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

.category-cover span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  font-size: 1.3rem;
  font-weight: 900;
}

.category-body {
  padding: 20px;
}

.category-body h2 {
  margin: 0 0 10px;
}

.category-body p {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.8;
}

.category-samples {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.category-samples a {
  color: #94a3b8;
}

.category-samples a:hover {
  color: #fbbf24;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 150px auto;
  gap: 14px;
  align-items: end;
  margin: 26px 0 28px;
  padding: 18px;
  border-radius: 24px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel span {
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  height: 46px;
  padding: 0 14px;
}

.filter-panel button {
  height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 800;
}

.empty-state {
  display: none;
  margin: 24px 0;
  padding: 28px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  text-align: center;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.12);
  transform: translateX(4px);
}

.rank-row img {
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-row strong,
.rank-row em {
  display: block;
}

.rank-row strong {
  margin-bottom: 8px;
  line-height: 1.45;
}

.rank-row em {
  color: #94a3b8;
  font-style: normal;
}

.breadcrumbs {
  margin-bottom: 20px;
  color: #94a3b8;
}

.breadcrumbs a {
  color: #cbd5e1;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(250px, 370px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.detail-title {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.badge {
  padding: 8px 12px;
}

.detail-summary {
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.95;
}

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

.player-card {
  overflow: hidden;
  border-radius: 30px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.78));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 46px rgba(245, 158, 11, 0.34);
  font-size: 2rem;
}

.play-title {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #f8fafc;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.detail-panel {
  margin-top: 28px;
  padding: 26px;
  border-radius: 26px;
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}

.detail-panel p {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.95;
}

.detail-panel p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 30px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 42px 20px 28px;
}

.footer-inner p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 28px;
  color: #64748b;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-slide,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding-top: 48px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 420px;
  }

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

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

  .filter-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 13px 16px;
  }

  .brand-text {
    font-size: 0.98rem;
  }

  .mobile-links,
  .mobile-categories,
  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .page-main {
    padding: 28px 16px 58px;
  }

  .hero {
    min-height: auto;
  }

  .hero-slide {
    min-height: auto;
    padding: 38px 16px 76px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 13vw, 3.8rem);
  }

  .hero-poster,
  .hero-poster img {
    min-height: 340px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .play-icon {
    width: 66px;
    height: 66px;
  }
}
