:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-400: #f59e0b;
  --amber-500: #d97706;
  --amber-600: #b45309;
  --amber-700: #92400e;
  --amber-800: #78350f;
  --amber-900: #451a03;
  --orange-900: #7c2d12;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(69, 26, 3, 0.16);
  --shadow-card: 0 12px 30px rgba(69, 26, 3, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-900);
  background: linear-gradient(180deg, var(--stone-50), rgba(254, 243, 199, 0.42), var(--stone-100));
  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,
video {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--orange-900));
  box-shadow: 0 12px 36px rgba(69, 26, 3, 0.26);
}

.nav-shell,
.hero-content,
.main-shell,
.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--amber-900);
  background: linear-gradient(135deg, var(--amber-100), var(--amber-400));
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(252, 211, 77, 0.26);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  color: var(--amber-50);
  font-size: 24px;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: rgba(253, 230, 138, 0.82);
  font-size: 12px;
  margin-top: 4px;
}

.header-search {
  display: flex;
  flex: 1 1 auto;
  max-width: 460px;
  margin-left: auto;
  border: 1px solid rgba(253, 230, 138, 0.28);
  border-radius: 999px;
  background: rgba(69, 26, 3, 0.42);
  overflow: hidden;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--amber-50);
  background: transparent;
  padding: 11px 16px 11px 20px;
}

.header-search input::placeholder {
  color: rgba(253, 230, 138, 0.62);
}

.header-search button,
.primary-button,
.secondary-button,
.hero-arrow,
.player-overlay,
.filter-box button {
  border: 0;
  cursor: pointer;
}

.header-search button {
  padding: 0 20px;
  color: var(--amber-900);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-400));
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  color: var(--amber-50);
  border-radius: 999px;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-dropdown:hover > .nav-link {
  color: var(--amber-900);
  background: var(--amber-100);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  display: grid;
  min-width: 190px;
  padding: 10px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--stone-700);
}

.dropdown-panel a:hover {
  color: var(--amber-800);
  background: var(--amber-50);
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--amber-50);
  border: 1px solid rgba(253, 230, 138, 0.3);
  border-radius: 12px;
  background: rgba(69, 26, 3, 0.32);
}

.hero-carousel {
  position: relative;
  min-height: clamp(520px, 62vw, 680px);
  overflow: hidden;
  background: var(--stone-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18)), linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.82)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 0 80px;
  color: var(--white);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--amber-300);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.36);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.card-meta,
.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.result-meta span {
  display: inline-flex;
  align-items: center;
}

.hero-meta {
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
}

.hero-actions,
.section-title-row,
.category-head,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.34);
}

.secondary-button {
  color: var(--amber-50);
  border: 1px solid rgba(253, 230, 138, 0.36);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.main-shell {
  padding: 54px 0;
}

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

.section-title-row {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title-row h2,
.page-title h1,
.category-head h1,
.detail-copy h1 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-title-row p,
.page-title p,
.category-head p {
  margin: 8px 0 0;
  color: var(--stone-500);
}

.view-more {
  color: var(--amber-700);
  font-weight: 800;
}

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

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

.movie-grid.search-grid {
  margin-top: 28px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(146, 64, 14, 0.08);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(217, 119, 6, 0.22);
  box-shadow: 0 18px 44px rgba(69, 26, 3, 0.18);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-900), var(--orange-900));
}

.movie-card.is-compact .poster-link {
  aspect-ratio: 16 / 11;
}

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

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

.year-badge,
.rank-badge,
.play-badge,
.type-pill {
  position: absolute;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.year-badge {
  top: 12px;
  right: 12px;
  min-width: 58px;
  height: 28px;
  color: var(--amber-900);
  background: rgba(254, 243, 199, 0.94);
  font-size: 13px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  color: var(--white);
  background: linear-gradient(135deg, #ef4444, var(--amber-500));
  font-size: 14px;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.56);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, background 0.22s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  color: var(--stone-900);
  font-size: 18px;
  line-height: 1.3;
}

.movie-card.is-compact .card-body h3 {
  font-size: 16px;
}

.card-body h3 a:hover {
  color: var(--amber-700);
}

.card-body p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--stone-500);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--stone-500);
  font-size: 13px;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: var(--amber-800);
  border-radius: 999px;
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 700;
}

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

.channel-card {
  min-height: 184px;
  padding: 22px;
  border-radius: var(--radius-md);
  color: var(--amber-50);
  background: linear-gradient(135deg, var(--amber-800), var(--orange-900));
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.channel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(69, 26, 3, 0.22);
}

.channel-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 19px;
}

.channel-card span {
  color: rgba(253, 230, 138, 0.84);
  font-size: 14px;
}

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

.list-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(69, 26, 3, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.list-item:hover {
  background: var(--amber-50);
  transform: translateX(4px);
}

.list-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--amber-800);
}

.list-copy strong,
.list-copy em {
  display: block;
}

.list-copy strong {
  margin-bottom: 4px;
  color: var(--stone-900);
  font-size: 18px;
}

.list-copy em {
  color: var(--stone-500);
  font-style: normal;
}

.list-year {
  color: var(--amber-700);
  font-weight: 900;
}

.page-title,
.category-head,
.search-panel {
  margin-bottom: 34px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.category-head {
  align-items: flex-end;
  justify-content: space-between;
}

.category-info {
  max-width: 720px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-samples a {
  padding: 6px 10px;
  color: var(--amber-800);
  border-radius: 999px;
  background: var(--amber-50);
  font-size: 13px;
  font-weight: 700;
}

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

.category-overview-card {
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

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

.category-overview-card p {
  margin: 0 0 16px;
  color: var(--stone-500);
}

.filter-box,
.search-box-large {
  display: flex;
  gap: 10px;
  width: min(100%, 520px);
}

.filter-box input,
.search-box-large input {
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  outline: 0;
  padding: 12px 18px;
  background: var(--stone-50);
}

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

.filter-box button,
.search-box-large button {
  flex: 0 0 auto;
  padding: 0 20px;
  color: var(--white);
  border-radius: 999px;
  background: var(--amber-700);
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--stone-500);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

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

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 42px;
}

.player-card,
.detail-copy,
.content-card {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.player-card {
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--stone-900);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button-core {
  display: grid;
  gap: 10px;
  place-items: center;
}

.player-button-core span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-700));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  font-size: 28px;
}

.player-button-core strong {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.detail-copy {
  padding: 30px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--amber-800), var(--orange-900));
  margin-bottom: 22px;
}

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

.detail-copy h1 {
  margin-bottom: 14px;
}

.detail-meta {
  margin-bottom: 18px;
  color: var(--stone-500);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-summary {
  color: var(--stone-700);
  font-size: 17px;
}

.content-card {
  padding: 30px;
  margin-bottom: 34px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 14px;
  color: var(--stone-700);
}

.content-card p:last-child {
  margin-bottom: 0;
}

.site-footer {
  color: var(--amber-100);
  background: linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--orange-900));
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 34px;
  padding: 46px 0 34px;
}

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

.footer-about p {
  margin: 0;
  color: rgba(253, 230, 138, 0.76);
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links a {
  color: rgba(253, 230, 138, 0.76);
}

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

.footer-bottom {
  padding: 18px 16px;
  text-align: center;
  color: rgba(253, 230, 138, 0.68);
  border-top: 1px solid rgba(253, 230, 138, 0.12);
}

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

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

@media (max-width: 860px) {
  .nav-shell {
    flex-wrap: wrap;
    min-height: 68px;
    padding: 12px 0;
  }

  .brand-text small {
    display: none;
  }

  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    justify-content: center;
  }

  .nav-dropdown,
  .dropdown-panel {
    display: none;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

@media (max-width: 580px) {
  .nav-shell,
  .hero-content,
  .main-shell,
  .footer-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }

  .brand-text strong {
    font-size: 20px;
  }

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

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

  .hero-actions,
  .category-head,
  .detail-actions,
  .filter-box,
  .search-box-large {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .filter-box button,
  .search-box-large button {
    width: 100%;
  }

  .movie-grid,
  .movie-grid.large-grid,
  .channel-grid,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .list-item {
    grid-template-columns: 92px 1fr;
  }

  .list-year {
    display: none;
  }

  .page-title,
  .category-head,
  .search-panel,
  .detail-copy,
  .content-card {
    padding: 22px;
    border-radius: 22px;
  }
}
