:root {
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-850: #24201d;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --amber-100: #fef3c7;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(68, 64, 60, 0.16);
  --shadow-deep: 0 30px 80px rgba(12, 10, 9, 0.34);
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-900);
  background: linear-gradient(180deg, #fffbeb 0%, #fafaf9 38%, #fff7ed 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--amber-100);
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--stone-900);
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 22px;
}

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: rgba(255, 251, 235, 0.78);
  font-weight: 700;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--stone-900);
  background: var(--amber-300);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--amber-100);
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 690px;
  padding: 76px 22px 54px;
  background:
    radial-gradient(circle at 18% 22%, rgba(254, 243, 199, 0.38), transparent 31%),
    radial-gradient(circle at 78% 18%, rgba(180, 83, 9, 0.48), transparent 30%),
    linear-gradient(135deg, var(--amber-700), var(--amber-500) 48%, var(--amber-800));
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.65) 1px, transparent 1px);
  background-size: 36px 36px;
}

.hero-inner,
.page-hero-inner,
.content-section,
.footer-inner,
.detail-shell {
  max-width: 1240px;
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-badge,
.hero-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-badge {
  margin-bottom: 24px;
  padding: 10px 18px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-carousel {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.55fr);
  align-items: center;
  gap: 44px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeIn 0.45s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy h1 {
  margin: 16px 0 18px;
  max-width: 860px;
  color: var(--white);
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.7;
}

.hero-pill {
  padding: 8px 14px;
  color: var(--amber-100);
  background: rgba(28, 25, 23, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions,
.hero-bottom,
.footer-links,
.card-meta,
.tag-row,
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button,
.section-action,
.text-link,
.search-page-form button,
.hero-search button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.hero-search button,
.search-page-form button {
  color: var(--amber-800);
  background: var(--white);
  border: 0;
  box-shadow: 0 18px 40px rgba(120, 53, 15, 0.24);
}

.primary-button:hover,
.hero-search button:hover,
.search-page-form button:hover,
.section-action:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow-deep);
  transform: rotate(1.5deg);
  aspect-ratio: 3 / 4;
  background: var(--stone-900);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 40%, rgba(12, 10, 9, 0.5));
}

.hero-poster img,
.movie-card img,
.category-tile img,
.rank-cover img,
.detail-poster,
.category-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bottom {
  justify-content: space-between;
  gap: 18px;
  margin-top: 32px;
  padding: 18px;
  color: var(--white);
  background: rgba(28, 25, 23, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
}

.hero-dots {
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 36px;
  background: var(--white);
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-page-form input,
.filter-input {
  width: min(460px, 70vw);
  min-height: 48px;
  padding: 0 16px;
  color: var(--stone-900);
  border: 1px solid rgba(120, 113, 108, 0.22);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 24px;
}

.hero-stats div {
  display: grid;
  gap: 2px;
}

.hero-stats strong {
  font-size: 28px;
  line-height: 1;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.content-section {
  padding: 68px 22px;
}

.content-section.dark-strip {
  max-width: none;
  padding-left: max(22px, calc((100% - 1240px) / 2 + 22px));
  padding-right: max(22px, calc((100% - 1240px) / 2 + 22px));
  color: var(--amber-100);
  background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
}

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

.eyebrow {
  margin-bottom: 8px;
  color: var(--amber-700);
  text-transform: uppercase;
}

.dark-strip .eyebrow {
  color: var(--amber-300);
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--stone-600);
  font-size: 17px;
  line-height: 1.75;
}

.dark-strip .section-heading p {
  color: rgba(254, 243, 199, 0.72);
}

.section-action,
.text-link {
  color: var(--white);
  background: var(--amber-600);
}

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

.category-tile {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--stone-900);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 10, 9, 0.05), rgba(12, 10, 9, 0.82));
}

.category-tile img {
  position: absolute;
  inset: 0;
  transition: transform 0.35s ease;
}

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

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  margin: 4px 0;
  color: var(--amber-300);
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.6;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.toolbar-count,
.search-summary {
  color: var(--stone-600);
  font-weight: 700;
}

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

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

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

.dark-strip .movie-card {
  background: #fff7ed;
  color: var(--stone-900);
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(68, 64, 60, 0.24);
}

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

.poster-link img {
  transition: transform 0.35s ease;
}

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

.rank-badge,
.card-score {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  color: var(--stone-900);
  font-weight: 900;
  background: var(--amber-300);
}

.rank-badge {
  top: 12px;
  left: 12px;
  border-radius: 999px;
}

.card-score {
  right: 12px;
  bottom: 12px;
  border-radius: 12px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 800;
}

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

.card-body h3 a:hover,
.rank-info h2 a:hover,
.category-overview-body h2 a:hover {
  color: var(--amber-700);
}

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

.tag-row span {
  padding: 5px 9px;
  color: var(--amber-900);
  background: var(--amber-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 15% 15%, rgba(252, 211, 77, 0.32), transparent 28%),
    linear-gradient(135deg, var(--stone-900), var(--stone-800));
}

.compact-hero {
  padding: 74px 22px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--amber-300);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.category-overview-body h2 {
  margin: 8px 0;
  font-size: 28px;
}

.category-overview-body p {
  color: var(--stone-600);
  line-height: 1.7;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 60px 88px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  font-size: 30px;
  font-weight: 900;
  color: var(--amber-600);
  text-align: center;
}

.rank-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: var(--stone-800);
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--stone-600);
  line-height: 1.6;
}

.rank-score {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.rank-score strong {
  color: var(--amber-600);
  font-size: 30px;
}

.rank-score span {
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 800;
}

.search-page-form {
  margin-top: 26px;
}

.search-summary {
  margin-bottom: 24px;
}

.detail-shell {
  padding: 34px 22px 0;
}

.detail-breadcrumb {
  color: var(--stone-600);
}

.detail-breadcrumb a:hover {
  color: var(--amber-700);
}

.player-card {
  overflow: hidden;
  margin-top: 22px;
  color: var(--amber-100);
  background: linear-gradient(180deg, var(--stone-900), var(--stone-800));
  border-radius: 28px;
  box-shadow: var(--shadow-deep);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 14px;
  width: 100%;
  color: var(--white);
  border: 0;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-circle {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: var(--stone-900);
  font-size: 34px;
  background: var(--amber-300);
  border-radius: 50%;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.play-text {
  padding: 10px 16px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(12, 10, 9, 0.62);
}

.detail-info {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
  padding: 28px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  box-shadow: var(--shadow-deep);
}

.detail-copy h1 {
  margin: 14px 0 14px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.12;
}

.detail-one-line {
  max-width: 860px;
  color: rgba(254, 243, 199, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta-grid div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}

.detail-meta-grid strong {
  display: block;
  color: var(--amber-300);
  font-size: 21px;
  line-height: 1.2;
}

.detail-meta-grid span {
  color: rgba(254, 243, 199, 0.64);
  font-size: 13px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.text-panel {
  padding: 26px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: var(--stone-700);
  line-height: 1.9;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

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

.site-footer {
  margin-top: 54px;
  padding: 34px 22px;
  color: rgba(254, 243, 199, 0.72);
  background: var(--stone-950);
}

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

.footer-inner p {
  max-width: 620px;
  margin: 10px 0 0;
  line-height: 1.7;
}

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

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

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

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

  .menu-button {
    display: block;
  }

  .hero-section {
    min-height: auto;
    padding-top: 48px;
  }

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

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-bottom,
  .toolbar,
  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .movie-grid,
  .ranking-grid,
  .category-grid,
  .category-overview-grid,
  .detail-content-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-overview-card,
  .detail-info,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-score {
    justify-items: start;
  }

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

  .detail-poster {
    max-width: 220px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-search,
  .search-page-form {
    width: 100%;
    flex-direction: column;
  }

  .hero-search input,
  .search-page-form input,
  .filter-input {
    width: 100%;
  }

  .movie-grid,
  .ranking-grid,
  .category-grid,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .content-section,
  .compact-hero,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
}
