:root {
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-500: #a8a29e;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow-soft: 0 18px 50px rgba(41, 37, 36, 0.12);
  --shadow-card: 0 14px 30px rgba(41, 37, 36, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--stone-50);
  color: var(--stone-800);
}

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

img {
  display: block;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(135deg, var(--stone-900), var(--amber-800));
}

img.image-error {
  opacity: 0;
}

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(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(231, 229, 228, 0.85);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--stone-900);
}

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.32);
}

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

.footer-logo {
  margin-bottom: 16px;
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--stone-700);
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.22);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--stone-100);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--stone-800);
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-950), var(--amber-900));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.02);
}

.hero-slide.is-active .hero-bg {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 30%, rgba(245, 158, 11, 0.36), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.24) 55%, rgba(0, 0, 0, 0.58));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
  height: 100%;
  padding-top: 42px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--amber-400);
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 22px;
  color: var(--white);
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 30px;
  color: var(--stone-200);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary,
.btn-ghost,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  box-shadow: 0 18px 30px rgba(217, 119, 6, 0.32);
}

.btn-primary:hover,
.btn-light:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 40px rgba(217, 119, 6, 0.36);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-light {
  color: var(--amber-900);
  background: var(--white);
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  height: 330px;
  object-fit: cover;
  border-radius: 22px;
}

.hero-panel h3 {
  margin: 18px 0 8px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.hero-panel p {
  margin: 0;
  color: var(--stone-200);
  line-height: 1.65;
}

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

.hero-dot {
  width: 44px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.30);
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 68px;
  background: var(--amber-400);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--white);
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber-700);
  font-weight: 900;
}

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--stone-600);
  line-height: 1.8;
}

.grid-featured {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, 1fr);
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.92);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(41, 37, 36, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  height: 244px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-900), var(--amber-900));
}

.grid-featured .movie-card:first-child .poster-link {
  height: 420px;
}

.movie-card.compact .poster-link {
  height: 190px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.play-chip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: var(--amber-900);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(10px);
  opacity: 0;
  transition: 0.2s ease;
}

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

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

.movie-title {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  color: var(--stone-900);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--amber-700);
}

.movie-meta {
  margin: 8px 0;
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  margin: 0 0 14px;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.meta-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--amber-800);
  background: #fffbeb;
  font-size: 12px;
  font-weight: 800;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 68px 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(231, 229, 228, 0.92);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
}

.rank-num {
  color: var(--amber-700);
  font-size: 34px;
  font-weight: 1000;
  letter-spacing: -0.06em;
}

.rank-cover {
  height: 112px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--stone-900), var(--amber-900));
}

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

.rank-info h3 {
  margin: 0 0 8px;
  color: var(--stone-900);
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  min-height: 190px;
  padding: 24px;
  border-radius: 26px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 22%, rgba(251, 191, 36, 0.42), transparent 32%),
    linear-gradient(135deg, var(--stone-900), var(--amber-900));
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.page-hero {
  padding: 70px 0 44px;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.22), transparent 30%),
    linear-gradient(180deg, var(--white), var(--stone-50));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--stone-500);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--amber-700);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--stone-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.search-box {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.search-box span {
  color: var(--stone-700);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  outline: 0;
  color: var(--stone-800);
  background: var(--stone-50);
  transition: 0.2s ease;
}

.search-box input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--stone-100);
  font-weight: 900;
  transition: 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
}

.no-result {
  display: none;
  padding: 26px;
  border-radius: 22px;
  color: var(--stone-600);
  background: var(--stone-100);
  text-align: center;
  font-weight: 800;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  padding: 46px 0 72px;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid rgba(231, 229, 228, 0.92);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--stone-950);
}

.player-box video {
  width: 100%;
  height: 100%;
  background: var(--stone-950);
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.76)),
    var(--stone-950);
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.player-cover span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  color: var(--amber-900);
  background: rgba(255, 255, 255, 0.94);
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.player-box.is-playing .player-cover {
  display: none;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.player-box.is-playing .player-status {
  display: none;
}

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-title {
  padding: 48px 0 22px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--stone-900);
  font-size: 25px;
  font-weight: 900;
}

.detail-card p {
  margin: 0 0 18px;
  color: var(--stone-700);
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 18px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}

.side-link img {
  height: 104px;
  border-radius: 14px;
  object-fit: cover;
}

.side-link strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--stone-900);
  font-size: 15px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-link span {
  display: block;
  margin-top: 6px;
  color: var(--stone-500);
  font-size: 13px;
}

.library-groups {
  display: grid;
  gap: 28px;
}

.library-group {
  padding: 24px;
  border: 1px solid var(--stone-200);
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.library-group h2 {
  margin: 0 0 16px;
  color: var(--stone-900);
  font-size: 26px;
  font-weight: 900;
}

.library-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
}

.library-links a {
  overflow: hidden;
  color: var(--stone-700);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-links a:hover {
  color: var(--amber-700);
}

.site-footer {
  padding: 56px 0 28px;
  color: var(--stone-300);
  background: var(--stone-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--stone-500);
  line-height: 1.8;
}

.footer-logo {
  color: var(--white);
}

.footer-links strong {
  display: block;
  margin-bottom: 16px;
  color: var(--white);
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--stone-300);
  background: rgba(255, 255, 255, 0.07);
}

.footer-links a:hover {
  color: var(--white);
  background: var(--amber-700);
}

.copyright {
  padding-top: 22px;
  color: var(--stone-500);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1060px) {
  .hero-content,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

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

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

  .side-card {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--stone-200);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    text-align: center;
  }

  .site-logo {
    font-size: 18px;
  }

  .hero-slider {
    height: 640px;
  }

  .hero-content {
    padding: 86px 0 70px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 44px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost,
  .btn-light {
    width: 100%;
  }

  .section {
    padding: 46px 0;
  }

  .grid-featured,
  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .library-links {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 52px 82px 1fr;
    gap: 12px;
  }

  .rank-num {
    font-size: 26px;
  }

  .rank-cover {
    height: 100px;
  }

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

  .poster-link,
  .grid-featured .movie-card:first-child .poster-link {
    height: 260px;
  }

  .player-cover span {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
