:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --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-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-sm: 0 10px 24px rgba(41, 37, 36, 0.08);
  --shadow-md: 0 18px 42px rgba(41, 37, 36, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(120, 53, 15, 0.98);
  color: var(--amber-50);
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.18);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(120, 53, 15, 0.92);
  backdrop-filter: blur(14px);
}

.nav-wrap,
.footer-inner,
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(253, 230, 138, 0.16);
  color: var(--amber-200);
  box-shadow: 0 0 24px rgba(253, 230, 138, 0.24);
  font-size: 14px;
}

.brand-name {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  border-radius: 10px;
  color: var(--amber-100);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 8px 13px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(146, 64, 14, 0.86);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(146, 64, 14, 0.6);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: var(--amber-100);
}

.mobile-nav {
  display: none;
  padding: 10px 16px 16px;
  background: rgba(146, 64, 14, 0.98);
  border-top: 1px solid rgba(253, 230, 138, 0.16);
}

.mobile-nav.is-open {
  display: grid;
  gap: 5px;
}

.mobile-link {
  display: block;
  padding: 10px 12px;
}

.main-content {
  padding-top: 64px;
  min-height: 70vh;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(850px, calc(100% - 48px));
  color: #fff;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.9);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  margin: 0 auto 26px;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2.3vw, 21px);
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.45);
}

.hero-actions,
.hero-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--amber-600);
  color: #fff;
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.btn-ghost {
  background: var(--amber-50);
  color: var(--amber-800);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: #fff;
}

.hero-quick {
  position: absolute;
  left: 50%;
  bottom: 66px;
  z-index: 3;
  width: min(860px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-search {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: var(--stone-800);
}

.hero-search button {
  height: 48px;
  padding: 0 20px;
  border: 0;
  background: var(--amber-600);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.hero-links a {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.content-section {
  padding: 54px 0;
}

.section-rail {
  background: linear-gradient(to bottom, var(--stone-50), #fff);
}

.section-featured {
  background: linear-gradient(to bottom, var(--amber-50), #fff);
}

.section-categories {
  background: var(--stone-100);
}

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

.section-head h1,
.section-head h2 {
  margin: 0 0 6px;
  color: var(--stone-800);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 900;
}

.section-head p {
  margin: 0;
  color: var(--stone-600);
}

.section-more {
  color: var(--amber-700);
  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));
  gap: 18px;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.movie-link {
  display: block;
  height: 100%;
}

.movie-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--stone-200);
}

.movie-thumb-wide {
  width: 190px;
  height: 118px;
  aspect-ratio: auto;
  flex: 0 0 auto;
}

.movie-thumb-large {
  aspect-ratio: 16 / 9;
}

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

.movie-card:hover .movie-thumb img {
  transform: scale(1.08);
}

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

.movie-chip {
  left: 10px;
  top: 10px;
  padding: 4px 9px;
  background: var(--amber-600);
}

.duration {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.movie-info {
  padding: 15px;
}

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

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--stone-400);
  font-size: 12px;
  font-weight: 700;
}

.movie-card-horizontal .movie-link {
  display: flex;
  gap: 14px;
}

.movie-info-horizontal {
  flex: 1;
  min-width: 0;
  padding: 12px 14px 12px 0;
}

.movie-info-horizontal h3 {
  min-height: auto;
}

.movie-info-horizontal p {
  min-height: auto;
  font-size: 13px;
}

.thumb-title {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  color: #fff;
}

.thumb-title h3 {
  margin: 0 0 6px;
  font-size: 25px;
  line-height: 1.2;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.thumb-title div {
  display: flex;
  gap: 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.movie-thumb-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent 70%);
}

.rail-wrap {
  position: relative;
}

.movie-rail {
  display: flex;
  gap: 18px;
  padding: 4px 2px 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  width: 274px;
  flex: 0 0 auto;
}

.rail-btn {
  position: absolute;
  top: 42%;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--stone-700);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.rail-prev {
  left: -14px;
}

.rail-next {
  right: -14px;
}

.feature-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.feature-side {
  display: grid;
  gap: 16px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: var(--radius-lg);
  background: var(--stone-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.9;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28), transparent);
}

.category-text {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
}

.category-text h2,
.category-text h3 {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 900;
}

.category-text p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.88);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-text span {
  color: var(--amber-200);
  font-weight: 800;
}

.page-hero {
  padding: 74px 0 64px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-900), var(--amber-800));
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.filter-bar input {
  min-height: 46px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  padding: 0 18px;
  outline: 0;
}

.filter-bar input:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.filter-bar a,
.filter-bar button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--amber-600);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

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

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

.detail-hero {
  padding: 34px 0 56px;
  background: linear-gradient(to bottom, var(--amber-50), var(--stone-50));
}

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

.player-card,
.detail-card,
.related-card {
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.player-card {
  overflow: hidden;
}

.video-player {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: brightness(0.72);
}

.player-start {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  background: var(--amber-600);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(217, 119, 6, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-start:hover {
  transform: scale(1.06);
  background: var(--amber-700);
}

.player-start span {
  margin-left: 5px;
  font-size: 34px;
}

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

.player-title {
  padding: 24px;
}

.player-title h1 {
  margin: 0 0 12px;
  color: var(--stone-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.detail-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--amber-50);
  color: var(--amber-800);
  font-size: 13px;
  font-weight: 800;
}

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

.detail-card h2,
.related-card h2 {
  margin: 0 0 14px;
  color: var(--stone-800);
  font-size: 23px;
  font-weight: 900;
}

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

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.info-item {
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--stone-50);
}

.info-item b {
  display: block;
  color: var(--stone-500);
  font-size: 12px;
}

.info-item span {
  color: var(--stone-800);
  font-weight: 800;
}

.related-card {
  position: sticky;
  top: 86px;
  padding: 20px;
}

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

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

.site-footer {
  background: var(--stone-900);
  color: var(--stone-300, #d6d3d1);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-brand p {
  margin: 16px 0 0;
  max-width: 450px;
  color: var(--stone-400);
  font-size: 14px;
}

.footer-col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-col h2 {
  margin: 0 0 6px;
  color: var(--amber-100);
  font-size: 17px;
}

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

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

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

.no-result {
  display: none;
  padding: 44px;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--stone-500);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.no-result.is-visible {
  display: block;
}

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

  .menu-toggle {
    display: flex;
  }

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

  .feature-layout,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .related-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero {
    height: 620px;
  }

  .hero-content {
    width: min(100% - 32px, 560px);
    padding-bottom: 120px;
  }

  .hero-control {
    display: none;
  }

  .hero-quick {
    grid-template-columns: 1fr;
    bottom: 76px;
  }

  .hero-links {
    justify-content: center;
  }

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

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

  .movie-card-horizontal .movie-link {
    display: block;
  }

  .movie-thumb-wide {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .movie-info-horizontal {
    padding: 15px;
  }

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

  .rail-btn {
    display: none;
  }

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