:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--amber-50), var(--stone-100));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--amber-50);
  background: linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--amber-900));
  box-shadow: 0 12px 24px rgba(28, 25, 23, 0.22);
}

.nav-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--amber-900);
  background: linear-gradient(135deg, var(--amber-300), var(--amber-500));
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.24);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  font-size: 12px;
  color: var(--amber-300);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 650;
}

.nav-links a,
.mobile-menu a {
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-links a:hover {
  color: var(--amber-300);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--amber-50);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px auto;
  border-radius: 99px;
}

.mobile-menu {
  display: none;
  padding: 0 0 16px;
}

.mobile-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--amber-300);
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--stone-900);
}

.hero-track,
.hero-slide,
.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
}

.hero-shade {
  background:
    radial-gradient(circle at 18% 32%, rgba(245, 158, 11, .26), transparent 34%),
    linear-gradient(180deg, rgba(28, 25, 23, .2), rgba(28, 25, 23, .56) 45%, rgba(0, 0, 0, .92));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 110px 0 74px;
  color: var(--white);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--amber-300);
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 14px;
}

.hero-title {
  max-width: 920px;
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.06;
  font-weight: 900;
  text-shadow: 0 6px 26px rgba(0, 0, 0, .45);
}

.hero-text {
  max-width: 820px;
  margin: 0 0 28px;
  color: #e7e5e4;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--amber-50);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 650;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 14px 30px rgba(217, 119, 6, .28);
}

.btn-primary:hover {
  background: var(--amber-700);
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, .22);
  background: rgba(0, 0, 0, .24);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(0, 0, 0, .48);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .2s ease, transform .2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, .72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--amber-500);
}

.main-section {
  padding: 48px 0;
}

.section-block {
  margin-bottom: 58px;
}

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

.title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-line::before {
  content: "";
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: var(--amber-600);
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
  color: var(--stone-800);
}

.section-desc {
  margin: 8px 0 0;
  color: var(--stone-600);
}

.more-link {
  color: var(--amber-700);
  font-weight: 800;
  white-space: nowrap;
}

.more-link:hover {
  color: var(--amber-800);
}

.featured-panel {
  padding: 30px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--amber-100), #ffedd5);
  box-shadow: 0 18px 38px rgba(120, 53, 15, .12);
}

.dark-panel {
  padding: 30px;
  border-radius: 26px;
  background: var(--stone-800);
  color: var(--white);
  box-shadow: 0 18px 38px rgba(28, 25, 23, .2);
}

.dark-panel .section-title,
.dark-panel .section-desc {
  color: var(--white);
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(68, 64, 60, .12);
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(68, 64, 60, .18);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-200), var(--stone-300));
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .32s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .74));
}

.card-badge,
.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: var(--white);
  background: rgba(217, 119, 6, .92);
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  color: var(--amber-50);
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 10px;
  right: 10px;
  min-width: 38px;
  padding: 4px 8px;
  color: var(--amber-900);
  background: var(--amber-300);
  text-align: center;
}

.movie-card-body {
  padding: 15px 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.movie-card h3 {
  margin: 0;
  color: var(--stone-800);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-500);
  font-size: 12px;
  margin-top: auto;
}

.horizontal-card .movie-card-link {
  flex-direction: row;
}

.horizontal-card .poster-wrap {
  width: 190px;
  flex: 0 0 190px;
  aspect-ratio: 3 / 4;
}

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

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

.category-card {
  padding: 26px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(68, 64, 60, .11);
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(68, 64, 60, .15);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  color: var(--stone-800);
}

.category-card p {
  margin: 0 0 18px;
  color: var(--stone-600);
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.mini-posters img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  background: var(--stone-200);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 12px 28px rgba(68, 64, 60, .08);
  margin: 0 0 26px;
  backdrop-filter: blur(14px);
}

.toolbar input,
.toolbar select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  color: var(--stone-800);
  background: var(--white);
  font: inherit;
  outline: none;
}

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

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--stone-600);
  border: 1px dashed var(--stone-300);
  border-radius: 18px;
  background: rgba(255, 255, 255, .66);
}

.page-hero {
  padding: 62px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 28%, rgba(245, 158, 11, .34), transparent 30%),
    linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--stone-900));
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 900;
}

.page-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--amber-100);
  font-size: 18px;
}

.breadcrumb {
  margin: 22px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--stone-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 750;
}

.detail-head {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 30px;
  margin: 28px 0 36px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 20px 44px rgba(28, 25, 23, .2);
  background: var(--stone-200);
}

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

.detail-info {
  padding: 30px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(68, 64, 60, .1);
}

.detail-info h1 {
  margin: 0 0 16px;
  color: var(--stone-800);
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.1;
  font-weight: 900;
}

.detail-intro {
  margin: 0 0 20px;
  color: var(--stone-600);
  font-size: 18px;
}

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

.detail-meta span,
.tag-chip {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--amber-100);
  font-size: 13px;
  font-weight: 750;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.player-section {
  margin: 30px 0;
  padding: 26px;
  border-radius: 26px;
  color: var(--white);
  background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
  box-shadow: 0 20px 44px rgba(28, 25, 23, .2);
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: var(--white);
  background: rgba(0, 0, 0, .18);
  cursor: pointer;
  z-index: 3;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
}

.play-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(217, 119, 6, .92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  transform: translate(-50%, -50%);
}

.play-ring::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid currentColor;
}

.content-panel {
  margin: 30px 0;
  padding: 30px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(68, 64, 60, .1);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
  color: var(--stone-800);
}

.content-panel p {
  margin: 0 0 20px;
  color: var(--stone-700);
  font-size: 17px;
}

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

.footer {
  margin-top: 40px;
  color: var(--stone-300);
  background: linear-gradient(90deg, var(--stone-900), var(--stone-800), var(--stone-900));
}

.footer-inner {
  padding: 42px 0 34px;
}

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

.footer h2,
.footer h3 {
  margin: 0 0 14px;
  color: var(--amber-50);
}

.footer p,
.footer li {
  color: var(--stone-400);
  font-size: 14px;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer a:hover {
  color: var(--amber-300);
}

.footer-bottom {
  border-top: 1px solid rgba(214, 211, 209, .16);
  padding-top: 22px;
  color: var(--stone-500);
  text-align: center;
  font-size: 13px;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .movie-grid.two-col {
    grid-template-columns: 1fr;
  }

  .horizontal-card .movie-card-link {
    flex-direction: column;
  }

  .horizontal-card .poster-wrap {
    width: 100%;
    flex-basis: auto;
  }

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

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

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

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

  .logo-subtitle {
    font-size: 11px;
  }

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

  .hero-title {
    font-size: 34px;
  }

  .movie-grid,
  .movie-grid.compact,
  .rank-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .featured-panel,
  .dark-panel,
  .content-panel,
  .detail-info,
  .player-section {
    padding: 20px;
  }
}
