:root {
  color-scheme: dark;
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-850: #211d1a;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-500: #78716c;
  --stone-400: #a8a29e;
  --stone-300: #d6d3d1;
  --white: #ffffff;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --copper: #b45309;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --soft-shadow: 0 18px 42px rgba(180, 83, 9, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--stone-950), var(--stone-900) 42%, var(--stone-950));
  color: var(--stone-300);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 25, 23, 0.94);
  border-bottom: 1px solid rgba(68, 64, 60, 0.7);
  backdrop-filter: blur(16px);
}

.site-nav {
  max-width: 1600px;
  margin: 0 auto;
  min-height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: transparent;
  background: linear-gradient(90deg, var(--amber-light), #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), var(--copper));
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
  transition: transform 0.25s ease;
}

.site-logo:hover .logo-mark {
  transform: scale(1.08) rotate(-2deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--stone-300);
  font-weight: 650;
  font-size: 15px;
}

.nav-links a,
.mobile-menu a,
.footer-links a,
.section-link {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover,
.section-link:hover {
  color: var(--amber-light);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(41, 37, 36, 0.95);
  color: var(--stone-300);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
  animation: fadeIn 0.25s ease both;
}

.mobile-menu a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(41, 37, 36, 0.7);
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--stone-950);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(245, 158, 11, 0.2), transparent 34%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.98), rgba(12, 10, 9, 0.72) 42%, rgba(12, 10, 9, 0.28)),
    linear-gradient(0deg, var(--stone-950), rgba(12, 10, 9, 0.2) 48%, rgba(12, 10, 9, 0.78));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px 86px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  animation: fadeUp 0.7s ease both;
}

.hero-badges,
.detail-meta,
.filter-row,
.hero-actions,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-badges span,
.detail-meta span,
.movie-tag,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 13px;
  font-weight: 700;
}

.hero-badges span:first-child,
.movie-tag {
  background: rgba(245, 158, 11, 0.92);
  color: #1c1917;
}

.hero h1 {
  max-width: 860px;
  margin: 20px 0 16px;
  color: var(--white);
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 30px;
  color: var(--stone-300);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

.btn-primary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), var(--copper));
  box-shadow: var(--soft-shadow);
}

.btn-primary:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
}

.btn-ghost,
.section-link {
  color: var(--stone-300);
  background: rgba(41, 37, 36, 0.78);
  border: 1px solid rgba(120, 113, 108, 0.25);
}

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

.hero-dots button {
  width: 26px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 48px;
  background: var(--amber);
}

.site-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-panel {
  max-width: none;
  padding-left: max(24px, calc((100vw - 1600px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1600px) / 2 + 24px));
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.9), rgba(28, 25, 23, 0.72));
  border-top: 1px solid rgba(68, 64, 60, 0.34);
  border-bottom: 1px solid rgba(68, 64, 60, 0.34);
}

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

.section-heading h2,
.page-hero h1,
.detail-head h1,
.detail-card h2,
.side-card h2 {
  margin: 0;
  color: var(--white);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.section-heading p,
.page-hero p,
.detail-head p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--stone-400);
  line-height: 1.75;
}

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

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(41, 37, 36, 0.78);
  border: 1px solid rgba(120, 113, 108, 0.16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: var(--soft-shadow);
  background: rgba(41, 37, 36, 0.96);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(68, 64, 60, 0.62), rgba(28, 25, 23, 0.9));
}

.movie-card-compact .movie-cover {
  aspect-ratio: 3 / 4;
}

.movie-cover img,
.category-image img,
.mini-cover img,
.ranking-poster img,
.player-cover img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .movie-cover img,
.category-card:hover .category-image img,
.mini-link:hover img,
.ranking-card:hover img {
  transform: scale(1.08);
}

.movie-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.88), transparent 58%);
}

.movie-year,
.movie-score {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-year {
  left: 12px;
  color: #1c1917;
  background: rgba(245, 158, 11, 0.92);
}

.movie-score {
  right: 12px;
  color: var(--amber-light);
  background: rgba(12, 10, 9, 0.72);
}

.movie-info {
  display: flex;
  min-height: 166px;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
}

.movie-card-compact .movie-info {
  min-height: 150px;
  padding: 14px;
}

.movie-info strong {
  color: var(--white);
  font-size: 19px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card-compact .movie-info strong {
  font-size: 16px;
}

.movie-card:hover .movie-info strong,
.mini-link:hover strong,
.ranking-card:hover strong {
  color: var(--amber-light);
}

.movie-line,
.movie-meta {
  color: var(--stone-400);
  font-size: 14px;
  line-height: 1.6;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin-top: auto;
  color: var(--stone-500);
}

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

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

.category-card {
  position: relative;
  display: block;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(41, 37, 36, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.12);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-image,
.category-image::after {
  position: absolute;
  inset: 0;
}

.category-image::after {
  content: "";
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.95), rgba(12, 10, 9, 0.42));
}

.category-content {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
}

.category-content strong {
  display: block;
  color: var(--white);
  font-size: 25px;
  margin-bottom: 8px;
}

.category-content span {
  color: var(--stone-300);
  line-height: 1.65;
}

.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(41, 37, 36, 0.72);
  border: 1px solid rgba(120, 113, 108, 0.14);
}

.rank-item span,
.ranking-number {
  color: var(--amber-light);
  font-weight: 900;
}

.rank-item strong,
.ranking-info strong,
.mini-body strong {
  color: var(--white);
}

.rank-item em,
.ranking-score {
  color: var(--amber-light);
  font-style: normal;
  font-weight: 800;
}

.mini-link {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(41, 37, 36, 0.66);
  border: 1px solid rgba(120, 113, 108, 0.12);
  transition: background 0.2s ease;
}

.mini-link:hover,
.rank-item:hover,
.ranking-card:hover {
  background: rgba(41, 37, 36, 0.96);
}

.mini-cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: var(--stone-800);
}

.mini-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.mini-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-body span {
  color: var(--stone-500);
  font-size: 13px;
}

.page-hero {
  background:
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(28, 25, 23, 0.98), rgba(41, 37, 36, 0.84));
  border-bottom: 1px solid rgba(68, 64, 60, 0.4);
}

.page-hero > div {
  max-width: 1600px;
  margin: 0 auto;
  padding: 80px 24px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.breadcrumb {
  font-size: 14px;
  color: var(--stone-400);
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 60px 160px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(41, 37, 36, 0.72);
  border: 1px solid rgba(120, 113, 108, 0.15);
}

.ranking-poster {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: var(--stone-800);
}

.ranking-info {
  display: grid;
  gap: 6px;
}

.ranking-info span,
.ranking-info em {
  color: var(--stone-400);
  font-style: normal;
  line-height: 1.6;
}

.search-panel {
  position: sticky;
  top: 82px;
  z-index: 3;
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(28, 25, 23, 0.92);
  border: 1px solid rgba(120, 113, 108, 0.18);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.search-panel label {
  display: block;
  color: var(--white);
  font-weight: 800;
  margin-bottom: 10px;
}

.search-panel input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(120, 113, 108, 0.24);
  border-radius: 14px;
  color: var(--white);
  background: rgba(12, 10, 9, 0.66);
  outline: none;
}

.search-panel input:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.filter-row {
  margin-top: 14px;
}

.filter-row button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(120, 113, 108, 0.18);
  border-radius: 999px;
  color: var(--stone-300);
  background: rgba(41, 37, 36, 0.9);
  cursor: pointer;
}

.filter-row button.is-active,
.filter-row button:hover {
  color: #1c1917;
  background: var(--amber);
}

.search-status {
  min-height: 24px;
  color: var(--stone-400);
  margin-bottom: 18px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  background: var(--stone-950);
}

.detail-backdrop,
.detail-backdrop span {
  position: absolute;
  inset: 0;
}

.detail-backdrop span {
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.98), rgba(12, 10, 9, 0.66)),
    linear-gradient(0deg, var(--stone-950), rgba(12, 10, 9, 0.22));
}

.detail-head {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 86px 24px 72px;
}

.detail-head h1 {
  max-width: 900px;
  font-size: clamp(38px, 5.5vw, 76px);
}

.detail-head > p:not(.breadcrumb) {
  max-width: 820px;
  font-size: 20px;
}

.detail-meta {
  margin-top: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 32px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000000;
  border: 1px solid rgba(245, 158, 11, 0.18);
  box-shadow: var(--shadow);
}

.player-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #000000;
  cursor: pointer;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.82), rgba(12, 10, 9, 0.24));
}

.player-cover[hidden] {
  display: none;
}

.player-play {
  position: relative;
  z-index: 3;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), var(--copper));
  font-size: 42px;
  padding-left: 6px;
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.24);
}

.detail-card,
.side-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
  background: rgba(41, 37, 36, 0.72);
  border: 1px solid rgba(120, 113, 108, 0.14);
}

.detail-card h2,
.side-card h2 {
  font-size: 24px;
  margin-bottom: 14px;
}

.detail-card p {
  margin: 0;
  color: var(--stone-300);
  line-height: 2;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.side-mini {
  gap: 12px;
}

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

.site-footer {
  margin-top: 40px;
  background: rgba(28, 25, 23, 0.96);
  border-top: 1px solid rgba(68, 64, 60, 0.62);
}

.footer-grid {
  max-width: 1600px;
  margin: 0 auto;
  padding: 52px 24px 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--amber-light);
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: var(--stone-400);
}

.copyright {
  max-width: 1600px;
  margin: 0 auto;
  padding: 22px 24px 34px;
  color: var(--stone-500);
  border-top: 1px solid rgba(68, 64, 60, 0.55);
  text-align: center;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 78px;
  }

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

  .ranking-card {
    grid-template-columns: 48px 100px 1fr;
  }

  .ranking-score {
    grid-column: 3;
  }

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

@media (max-width: 620px) {
  .site-nav,
  .mobile-menu,
  .site-section,
  .page-hero > div,
  .detail-head,
  .footer-grid,
  .copyright {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-section {
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .section-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    min-height: 560px;
  }

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

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

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

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

  .movie-grid,
  .compact-grid,
  .category-movies,
  .category-grid,
  .category-grid-large {
    grid-template-columns: 1fr;
  }

  .movie-card-compact .movie-cover,
  .movie-cover {
    aspect-ratio: 16 / 10;
  }

  .mini-link {
    grid-template-columns: 96px 1fr;
  }

  .ranking-card {
    grid-template-columns: 42px 88px 1fr;
    gap: 12px;
    padding: 10px;
  }

  .detail-card,
  .side-card {
    padding: 20px;
  }

  .player-play {
    width: 72px;
    height: 72px;
    font-size: 34px;
  }
}
