:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-50: #fff7ed;
  --orange-600: #ea580c;
  --red-900: #7f1d1d;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-soft: 0 20px 50px rgba(41, 37, 36, 0.12);
  --shadow-hover: 0 28px 70px rgba(41, 37, 36, 0.22);
}

* {
  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;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #78350f, #9a3412, #7f1d1d);
  box-shadow: 0 18px 40px rgba(28, 25, 23, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 78px;
}

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

.brand-icon,
.footer-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #78350f;
  background: var(--amber-500);
  border-radius: 14px;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: #fde68a;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  font-weight: 700;
  color: #fff7ed;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fcd34d;
}

.header-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.header-search input,
.mobile-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #fde68a;
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #78350f;
  background: #fcd34d;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 800;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

.mobile-menu-inner {
  display: grid;
  gap: 12px;
  padding: 16px 0 20px;
}

.mobile-link {
  color: #fff7ed;
  font-weight: 700;
  padding: 8px 0;
}

.mobile-link.is-active {
  color: #fcd34d;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #78350f, #9a3412);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 760px;
}

.hero-kicker,
.page-hero span,
.category-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #ffffff;
  background: var(--amber-600);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #e7e5e4;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta span {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}

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

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

.primary-button {
  color: #ffffff;
  background: var(--amber-600);
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.35);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.quick-cats {
  background: var(--stone-100);
  padding: 28px 0;
}

.quick-cats-inner,
.category-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.quick-cats a,
.category-switcher a {
  color: var(--stone-700);
  background: #ffffff;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(41, 37, 36, 0.08);
  transition: all 0.2s ease;
}

.quick-cats a:hover,
.category-switcher a:hover,
.category-switcher a.is-current {
  color: #ffffff;
  background: var(--amber-600);
  transform: translateY(-2px);
}

.section {
  padding: 72px 0;
  background: var(--stone-50);
}

.section-warm {
  background: linear-gradient(135deg, var(--orange-50), var(--amber-50));
}

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

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.section-heading span {
  font-size: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  color: var(--stone-800);
}

.section-heading a {
  margin-left: auto;
  color: var(--amber-700);
  font-weight: 900;
}

.compact-heading {
  margin-bottom: 20px;
}

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

.movie-grid-featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(41, 37, 36, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card[hidden] {
  display: none;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

.movie-card:hover .poster-frame img,
.category-card:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, #ef4444, #d97706);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
  opacity: 0;
  font-size: 42px;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.movie-info {
  padding: 18px;
}

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

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

.movie-meta {
  gap: 8px;
  color: var(--stone-500);
  font-size: 12px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.tag-cloud span,
.tag-cloud a {
  color: var(--stone-600);
  background: var(--stone-100);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.tag-cloud a {
  color: #ffffff;
  background: var(--amber-600);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 36px;
  align-items: start;
}

.ranking-panel,
.related-panel,
.prose-card,
.detail-article,
.content-card,
.search-panel {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.ranking-panel {
  padding: 26px;
  position: sticky;
  top: 100px;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-row {
  border-radius: 14px;
  transition: background 0.2s ease;
}

.ranking-row:hover {
  background: var(--stone-100);
}

.ranking-row a {
  display: grid;
  grid-template-columns: 42px 74px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: var(--amber-600);
  border-radius: 999px;
  font-weight: 900;
}

.ranking-row img {
  width: 74px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.ranking-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ranking-main strong {
  overflow: hidden;
  color: var(--stone-800);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-main small,
.ranking-views {
  color: var(--stone-500);
  font-size: 12px;
}

.ranking-score {
  color: var(--amber-600);
  font-weight: 900;
}

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

.category-card,
.category-overview-card a {
  overflow: hidden;
  display: block;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.category-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card-body,
.category-overview-body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.category-card-body strong,
.category-overview-body h2 {
  color: var(--stone-800);
  font-size: 22px;
  font-weight: 900;
}

.category-card-body small,
.category-overview-body span {
  color: var(--amber-700);
  font-weight: 900;
}

.category-card-body em,
.category-overview-body p,
.category-overview-body small {
  color: var(--stone-600);
  font-style: normal;
  line-height: 1.6;
}

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--stone-200);
}

.category-mosaic img {
  width: 100%;
  height: 96px;
  object-fit: cover;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #78350f, #ea580c, #7f1d1d);
  padding: 82px 0;
}

.page-hero h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #ffedd5;
  font-size: 19px;
  line-height: 1.8;
}

.toolbar,
.search-panel,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.toolbar {
  justify-content: space-between;
  margin: 24px 0 18px;
}

.inline-search,
.big-search {
  flex: 1 1 360px;
  display: flex;
  overflow: hidden;
  border: 2px solid #fcd34d;
  border-radius: 999px;
  background: #ffffff;
}

.inline-search input,
.big-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px 18px;
}

.big-search button {
  border: 0;
  color: #ffffff;
  background: var(--amber-600);
  padding: 0 26px;
  font-weight: 900;
  cursor: pointer;
}

.sort-select,
.filter-row select {
  border: 0;
  outline: 0;
  color: var(--stone-700);
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(41, 37, 36, 0.08);
}

.search-panel {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
  margin-bottom: 22px;
}

.result-count {
  margin: 0 0 20px;
  color: var(--stone-600);
  font-weight: 900;
}

.player-section {
  color: #ffffff;
  background: #000000;
  padding: 28px 0 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #fde68a;
  font-weight: 700;
}

.breadcrumbs strong {
  color: #ffffff;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.55));
  cursor: pointer;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  background: var(--amber-600);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(217, 119, 6, 0.45);
}

.player-shell.is-playing .player-start {
  display: none;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-shell:hover .player-controls,
.player-shell:focus-within .player-controls {
  opacity: 1;
}

.player-controls button {
  border: 0;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.9);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

.detail-content-section {
  background: var(--stone-50);
}

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

.detail-article {
  padding: 28px;
}

.detail-title-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.detail-title-row img {
  width: 190px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
}

.detail-title-row h1 {
  margin: 14px 0 12px;
  color: var(--stone-800);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.18;
  font-weight: 900;
}

.detail-title-row p {
  margin: 0;
  color: var(--stone-600);
  line-height: 1.75;
}

.detail-meta {
  border-top: 1px solid var(--stone-200);
  border-bottom: 1px solid var(--stone-200);
  padding: 18px 0;
  margin-bottom: 24px;
  color: var(--stone-600);
  font-weight: 700;
}

.detail-meta span {
  background: var(--stone-100);
  border-radius: 999px;
  padding: 7px 12px;
}

.content-card {
  padding: 24px;
  margin-top: 20px;
  box-shadow: none;
  border: 1px solid var(--stone-200);
}

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

.content-card p,
.prose-card p {
  margin: 0 0 14px;
  color: var(--stone-700);
  line-height: 1.85;
  font-size: 17px;
}

.review-card {
  background: linear-gradient(135deg, var(--amber-50), var(--orange-50));
  border-left: 5px solid var(--amber-600);
}

.related-panel {
  position: sticky;
  top: 100px;
  padding: 22px;
}

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

.related-list .movie-card {
  box-shadow: 0 8px 20px rgba(41, 37, 36, 0.08);
}

.prose-card {
  padding: 32px;
}

.wide-ranking .ranking-row a {
  grid-template-columns: 52px 96px minmax(0, 1fr) 86px 86px;
}

.site-footer {
  color: #d6d3d1;
  background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
  padding: 52px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  margin: 0;
  color: #a8a29e;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

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

.site-footer a {
  color: #d6d3d1;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #f59e0b;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #44403c;
  color: #a8a29e;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

  .ranking-panel,
  .related-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero {
    height: 560px;
  }

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

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

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

  .detail-title-row img {
    width: 100%;
  }

  .ranking-row a,
  .wide-ranking .ranking-row a {
    grid-template-columns: 40px 70px minmax(0, 1fr);
  }

  .ranking-score,
  .ranking-views {
    display: none;
  }
}

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

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

  .hero {
    height: 620px;
  }

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

  .movie-grid,
  .movie-grid-featured,
  .movie-grid-compact,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading a {
    margin-left: 0;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }

  .player-controls {
    opacity: 1;
    flex-wrap: wrap;
  }
}
