:root {
  --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;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --white: #ffffff;
  --black: #000000;
  --shadow-soft: 0 18px 45px rgba(41, 37, 36, 0.12);
  --shadow-strong: 0 24px 60px rgba(28, 25, 23, 0.22);
  --radius: 18px;
  --radius-small: 12px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--stone-800), var(--stone-700), var(--stone-800));
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.2);
}

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

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--stone-900);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: 0 10px 20px rgba(217, 119, 6, 0.25);
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.logo-subtitle {
  margin-top: 2px;
  color: var(--stone-300);
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: var(--radius-small);
  color: var(--stone-200);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
  background: rgba(245, 158, 11, 0.18);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-small);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.menu-icon {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 -7px 0 currentColor;
}

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

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

.mobile-nav .nav-link {
  justify-content: flex-start;
  width: 100%;
}

.hero {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  color: var(--white);
  background: var(--stone-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 25, 23, 0.18), rgba(28, 25, 23, 0.95)),
    linear-gradient(90deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.28), rgba(28, 25, 23, 0.78));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding: 0 0 62px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: var(--white);
  background: var(--amber-600);
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.25);
}

.hero h1 {
  margin: 0 0 16px;
  max-width: 860px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-description {
  margin: 0;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
  color: var(--stone-100);
}

.hero-meta span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-small);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

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

.button-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-tabs {
  position: absolute;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 40px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 10px;
  width: min(430px, 42vw);
}

.hero-tab {
  overflow: hidden;
  min-height: 82px;
  padding: 10px;
  border-radius: var(--radius-small);
  color: var(--white);
  text-align: left;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-tab.is-active {
  background: rgba(217, 119, 6, 0.78);
  box-shadow: 0 16px 32px rgba(28, 25, 23, 0.3);
}

.hero-tab strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-tab span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.section {
  padding: 56px 0;
}

.section-compact {
  padding: 34px 0;
}

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

.section-title {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-text {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--stone-600);
}

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

.grid {
  display: grid;
  gap: 22px;
}

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

.card-grid-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-600));
}

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

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

.poster-mask {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 28px 12px 12px;
  color: var(--white);
  background: linear-gradient(180deg, transparent, rgba(28, 25, 23, 0.88));
  font-size: 13px;
}

.movie-card-body {
  padding: 14px;
}

.movie-card h3 {
  margin: 0;
  color: var(--stone-900);
  font-size: 17px;
  line-height: 1.35;
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 700;
}

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  padding: 20px;
  border-radius: var(--radius);
  color: var(--white);
  background: linear-gradient(135deg, var(--stone-800), var(--stone-700));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.category-card strong {
  display: block;
  font-size: 22px;
}

.category-card span {
  margin-top: 10px;
  color: var(--stone-200);
  font-size: 14px;
}

.category-card em {
  margin-top: auto;
  color: var(--amber-400);
  font-style: normal;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-small);
  color: var(--white);
  background: var(--amber-600);
  font-weight: 900;
}

.rank-item img {
  width: 82px;
  height: 106px;
  border-radius: var(--radius-small);
  object-fit: cover;
  background: var(--stone-700);
}

.rank-item h3 {
  overflow: hidden;
  margin: 0 0 4px;
  color: var(--stone-900);
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0 0;
  color: var(--stone-600);
  font-size: 14px;
}

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

.page-hero {
  padding: 54px 0 28px;
}

.page-hero h1 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 14px 0 0;
  max-width: 820px;
  color: var(--stone-600);
  font-size: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  margin: 0 0 26px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-input,
.filter-select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-small);
  color: var(--stone-800);
  background: var(--stone-50);
  outline: none;
}

.search-input {
  padding: 0 14px;
}

.filter-select {
  padding: 0 36px 0 12px;
}

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

.empty-state {
  display: none;
  padding: 32px;
  border-radius: var(--radius);
  color: var(--stone-600);
  text-align: center;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

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

.player-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--black);
  box-shadow: var(--shadow-strong);
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.22), rgba(28, 25, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-card.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 18px 46px rgba(217, 119, 6, 0.35);
  font-size: 32px;
  transform: translateZ(0);
}

.detail-title {
  margin: 22px 0 10px;
  color: var(--stone-900);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.detail-content {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-content h2 {
  margin: 0 0 12px;
  color: var(--stone-900);
  font-size: 24px;
}

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

.side-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.side-card h2,
.side-card h3 {
  margin: 0 0 12px;
  color: var(--stone-900);
  font-size: 20px;
}

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

.tag-list span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 13px;
  font-weight: 750;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-small);
  background: var(--stone-50);
}

.related-list img {
  width: 54px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--stone-700);
}

.related-list strong {
  display: block;
  overflow: hidden;
  color: var(--stone-900);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-list span {
  display: block;
  color: var(--stone-500);
  font-size: 13px;
}

.footer {
  margin-top: 40px;
  padding: 34px 0;
  color: var(--stone-300);
  background: var(--stone-900);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.footer a {
  color: var(--amber-400);
  font-weight: 750;
}

@media (max-width: 1100px) {
  .card-grid-wide,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-tabs {
    display: none;
  }

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

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

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

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

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

  .side-panel {
    position: static;
  }

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

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

  .logo-name {
    font-size: 17px;
  }

  .logo-subtitle {
    display: none;
  }

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

  .hero-content {
    align-items: flex-end;
    min-height: 560px;
    padding-bottom: 44px;
  }

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

  .button {
    width: 100%;
  }

  .section {
    padding: 40px 0;
  }

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

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

  .movie-card-body {
    padding: 12px;
  }

  .rank-item {
    grid-template-columns: auto 68px minmax(0, 1fr);
  }

  .rank-item img {
    width: 68px;
    height: 88px;
  }

  .detail-content {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
