:root {
  --bluestone-50: #f8fafc;
  --bluestone-100: #f1f5f9;
  --bluestone-600: #475569;
  --bluestone-700: #334155;
  --bluestone-800: #1e293b;
  --bluestone-900: #0f172a;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --accent-50: #fef3c7;
  --accent-400: #f59e0b;
  --accent-500: #d97706;
  --accent-600: #b45309;
  --earth-50: #fdf8f6;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, .10), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, .15), 0 10px 10px -5px rgba(15, 23, 42, .10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bluestone-900);
  font-size: 21px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--bluestone-600), var(--accent-500));
  box-shadow: var(--shadow-card);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  gap: 26px;
  color: var(--bluestone-700);
  font-weight: 650;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.section-more:hover,
.card-body h3 a:hover {
  color: var(--accent-600);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--stone-200);
  outline: none;
  border-radius: 999px;
  background: var(--stone-100);
  color: var(--bluestone-900);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 15px;
}

.header-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.header-search button,
.primary-btn {
  color: white;
  background: var(--accent-500);
  box-shadow: 0 10px 20px rgba(217, 119, 6, .20);
}

.header-search button {
  padding: 10px 18px;
}

.header-search button:hover,
.primary-btn:hover {
  background: var(--accent-600);
}

.header-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  background: white;
  border-color: var(--accent-500);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, .12);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--bluestone-800);
  font-size: 30px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--stone-200);
  padding: 14px 16px 18px;
  background: white;
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--bluestone-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .84), rgba(0, 0, 0, .52), rgba(0, 0, 0, .08));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: white;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-400);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-copy h1,
.detail-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.04em;
}

.hero-desc,
.detail-copy p,
.page-hero p {
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
}

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

.hero-meta span {
  color: rgba(255, 255, 255, .84);
  font-size: 14px;
}

.hero-tags {
  margin: 22px 0 30px;
}

.hero-tags span,
.hero-tags a,
.tag-row a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
}

.hero-tags span,
.hero-tags a {
  padding: 6px 13px;
  color: white;
  background: rgba(255, 255, 255, .13);
  backdrop-filter: blur(8px);
}

.primary-btn,
.ghost-btn {
  padding: 13px 25px;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px) scale(1.02);
}

.ghost-btn {
  color: white;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, .22);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--accent-400);
}

.quick-entry {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: -36px;
  position: relative;
  z-index: 8;
}

.quick-entry a {
  min-height: 94px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}

.quick-entry a:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.quick-entry span {
  color: var(--stone-600);
  font-size: 13px;
}

.page-stack {
  padding: 70px 0;
  display: grid;
  gap: 76px;
}

.content-section {
  display: grid;
  gap: 26px;
}

.soft-panel,
.rank-preview {
  padding: 34px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent-50), var(--earth-50));
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
}

.section-more {
  color: var(--accent-600);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}

.card-cover {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: var(--stone-200);
}

.movie-card.large .card-cover {
  height: 320px;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .10));
  transition: opacity .25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-rating,
.card-duration,
.card-play {
  position: absolute;
  z-index: 2;
  border-radius: 9px;
  color: white;
  background: rgba(0, 0, 0, .70);
  backdrop-filter: blur(8px);
}

.card-rating {
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  color: var(--accent-400);
  font-size: 12px;
  font-weight: 800;
}

.card-duration {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  font-size: 12px;
}

.card-play {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(217, 119, 6, .92);
  font-size: 24px;
  transform: translate(-50%, -50%) scale(.82);
  transition: opacity .2s ease, transform .2s ease;
}

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

.card-body {
  padding: 17px;
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--stone-600);
  font-size: 14px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--stone-500);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row a {
  padding: 5px 9px;
  color: #92400e;
  background: #fffbeb;
}

.page-main {
  padding: 42px 0 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
  border-radius: 26px;
  padding: clamp(32px, 6vw, 62px);
  color: white;
  background: linear-gradient(135deg, var(--bluestone-900), var(--bluestone-700) 55%, var(--accent-600));
  box-shadow: var(--shadow-card);
}

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

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, .82);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
  min-width: 220px;
  padding: 12px 16px;
}

.large-filter input {
  flex: 1 1 360px;
}

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

.category-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.category-thumbs img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

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

.rank-item,
.rank-row-link {
  display: grid;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  transition: background .2s ease, transform .2s ease;
}

.rank-item {
  grid-template-columns: 52px 66px 1fr auto;
  padding: 10px 14px;
}

.rank-item:hover,
.rank-row-link:hover {
  background: white;
  transform: translateX(2px);
}

.rank-item img,
.rank-row-link img {
  width: 66px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-num {
  color: var(--accent-600);
  font-size: 24px;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--stone-600);
  font-size: 14px;
}

.full-rank {
  gap: 14px;
}

.rank-row {
  border-radius: 18px;
}

.rank-row-link {
  grid-template-columns: 68px 82px 1fr 90px 190px;
  padding: 14px 18px;
}

.rank-info {
  display: grid;
  gap: 5px;
}

.rank-info strong {
  font-size: 18px;
}

.rank-info em {
  color: var(--stone-600);
  font-style: normal;
  font-size: 14px;
}

.rank-score {
  color: var(--accent-600);
  font-weight: 900;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: white;
  background: var(--bluestone-900);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, .94), rgba(15, 23, 42, .70), rgba(15, 23, 42, .25));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 36px;
  align-items: center;
  min-height: 520px;
  padding: 46px 0;
}

.detail-poster {
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, .16);
  border-radius: 22px;
  box-shadow: var(--shadow-xl);
}

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

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 66px);
}

.detail-copy p {
  max-width: 820px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
  padding: 56px 0 38px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.player-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(15, 23, 42, .32), rgba(15, 23, 42, .72));
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-500);
  font-size: 34px;
  box-shadow: 0 12px 30px rgba(217, 119, 6, .34);
}

.player-start strong {
  font-size: 18px;
}

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

.article-block,
.side-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-card);
}

.article-block h2,
.side-card h2 {
  margin: 0 0 14px;
}

.article-block p {
  margin: 0;
  color: var(--stone-700);
  font-size: 17px;
}

.side-card:first-child {
  margin-top: 0;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--stone-500);
}

.side-card dd {
  margin: 0;
  font-weight: 750;
}

.side-tags a {
  background: var(--bluestone-50);
  color: var(--bluestone-700);
}

.related-section {
  padding-bottom: 70px;
}

.site-footer {
  color: var(--stone-200);
  background: var(--bluestone-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-brand {
  color: white;
}

.site-footer p {
  max-width: 480px;
  color: var(--stone-500);
}

.site-footer h3 {
  margin: 0 0 12px;
  color: white;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--stone-500);
}

.site-footer a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 18px 16px;
  color: var(--stone-500);
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

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

  .quick-entry {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-overview {
    grid-template-columns: 1fr;
  }

  .rank-row-link {
    grid-template-columns: 56px 74px 1fr 80px;
  }

  .rank-row-link .rank-meta {
    display: none;
  }

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

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

  .menu-button {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-entry {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .card-cover {
    height: 220px;
  }

  .soft-panel,
  .rank-preview {
    padding: 22px;
  }

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

  .category-card {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(270px, 70vw);
  }

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

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

  .brand {
    font-size: 18px;
  }

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

  .quick-entry {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.compact,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .card-cover {
    height: 280px;
  }

  .rank-item {
    grid-template-columns: 44px 58px 1fr;
  }

  .rank-item .rank-meta {
    grid-column: 3;
  }

  .rank-row-link {
    grid-template-columns: 44px 62px 1fr;
  }

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