:root {
  --ash-50: #f8f9fa;
  --ash-100: #f1f3f5;
  --ash-200: #dee2e6;
  --ash-300: #ced4da;
  --ash-500: #868e96;
  --ash-600: #6c757d;
  --ash-700: #495057;
  --ash-800: #212529;
  --ash-900: #0d0f12;
  --volcanic-50: #fef5f1;
  --volcanic-100: #fdeae1;
  --volcanic-600: #f07f4a;
  --volcanic-700: #ee692c;
  --volcanic-800: #e84118;
  --lava-50: #fff5e6;
  --lava-100: #ffe6b3;
  --lava-400: #ffb81a;
  --lava-600: #e68a00;
  --white: #ffffff;
  --shadow-card: 0 18px 48px -28px rgba(13, 15, 18, 0.45);
  --shadow-hot: 0 20px 60px -20px rgba(232, 65, 24, 0.5);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--ash-50) 0%, var(--white) 100%);
  color: var(--ash-900);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(222, 226, 230, 0.75);
  backdrop-filter: blur(16px);
}

.nav-bar {
  display: grid;
  grid-template-columns: auto 1fr minmax(260px, 390px) auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ash-900);
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--volcanic-600), var(--volcanic-800));
  box-shadow: var(--shadow-hot);
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.nav-link,
.mobile-nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--ash-700);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--volcanic-700);
  background: var(--volcanic-50);
}

.site-search-form,
.mobile-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--ash-200);
  border-radius: 999px;
  color: var(--ash-900);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input:focus {
  border-color: var(--volcanic-600);
  box-shadow: 0 0 0 4px rgba(240, 127, 74, 0.16);
}

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

.search-button,
.primary-button {
  color: var(--white);
  background: linear-gradient(90deg, var(--volcanic-600), var(--volcanic-700));
  box-shadow: 0 12px 30px -18px rgba(232, 65, 24, 0.75);
}

.search-button:hover,
.primary-button:hover {
  transform: translateY(-1px) scale(1.02);
  background: linear-gradient(90deg, var(--volcanic-700), var(--volcanic-800));
  box-shadow: var(--shadow-hot);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.26);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  border-radius: 14px;
  background: var(--ash-100);
}

.mobile-menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--ash-900);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--ash-200);
}

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

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--ash-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 6s ease;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 40%, rgba(240, 127, 74, 0.45), transparent 28%),
    linear-gradient(0deg, rgba(13, 15, 18, 0.95) 0%, rgba(13, 15, 18, 0.58) 48%, rgba(13, 15, 18, 0.16) 100%);
}

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

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--lava-400);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--ash-200);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.7;
}

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.home-search-band {
  background: linear-gradient(135deg, var(--volcanic-50), var(--lava-50));
  border-bottom: 1px solid rgba(222, 226, 230, 0.75);
}

.home-search-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
}

.home-search-inner h2,
.section-head h2,
.ranking-head h2,
.detail-article h2 {
  margin: 0;
  color: var(--ash-900);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.home-search-inner p,
.section-intro,
.page-hero p,
.category-body p,
.detail-one-line,
.detail-article p,
.site-footer p {
  color: var(--ash-600);
  line-height: 1.75;
}

.content-section,
.theme-section {
  padding: 72px 0;
}

.soft-section {
  background: linear-gradient(135deg, var(--volcanic-50), var(--lava-50));
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  margin-bottom: 28px;
}

.section-head span {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--volcanic-600), transparent);
}

.section-more {
  color: var(--volcanic-700);
  font-weight: 800;
}

.section-intro {
  max-width: 760px;
  margin: -12px 0 28px;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  background: var(--ash-200);
  box-shadow: var(--shadow-card);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.82) 100%);
}

.movie-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.74rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--white);
  background: var(--volcanic-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 2.9em;
  margin: 0;
  overflow: hidden;
  color: var(--ash-900);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta-line,
.movie-one-line {
  margin: 6px 0 0;
  color: var(--ash-600);
  font-size: 0.85rem;
}

.movie-one-line {
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-tags span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--volcanic-700);
  background: var(--volcanic-50);
  font-size: 0.78rem;
  font-weight: 750;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--ash-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

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

.ranking-head a {
  color: var(--volcanic-700);
  font-weight: 800;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 34px 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--ash-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
  background: var(--volcanic-50);
  transform: translateX(3px);
}

.ranking-item img {
  width: 58px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-index {
  color: var(--volcanic-700);
  font-weight: 900;
  text-align: center;
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong,
.ranking-info small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-info small {
  margin-top: 4px;
  color: var(--ash-600);
}

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

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 184, 26, 0.2), transparent 22%),
    linear-gradient(135deg, var(--ash-900), var(--volcanic-800));
}

.compact-hero {
  padding: 88px 0;
}

.ranking-hero {
  padding: 108px 0;
}

.page-hero p {
  max-width: 760px;
  color: var(--ash-200);
  font-size: 1.08rem;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid var(--ash-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.filter-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: start;
}

.filter-row > span {
  padding-top: 8px;
  color: var(--ash-700);
  font-weight: 800;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--ash-200);
  border-radius: 999px;
  color: var(--ash-700);
  background: var(--white);
  font-weight: 700;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--white);
  border-color: var(--volcanic-600);
  background: var(--volcanic-600);
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--ash-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.category-cover {
  position: relative;
  display: block;
  height: 210px;
  overflow: hidden;
  background: var(--ash-900);
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.5s ease;
}

.category-card:hover .category-cover img {
  transform: scale(1.05);
}

.category-cover span {
  position: absolute;
  left: 20px;
  bottom: 18px;
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 900;
}

.category-body {
  padding: 20px;
}

.category-body h2 {
  margin: 0 0 8px;
}

.category-body ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.category-body li a {
  color: var(--ash-700);
  font-weight: 700;
}

.category-body li a:hover {
  color: var(--volcanic-700);
}

.ranking-grid .movie-card-compact .movie-one-line,
.ranking-grid .movie-card-compact .movie-tags {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px 0 18px;
  color: var(--ash-600);
  font-size: 0.92rem;
}

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

.detail-layout {
  display: grid;
  gap: 30px;
  padding-bottom: 72px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: 0 26px 70px -30px rgba(0, 0, 0, 0.8);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: none;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.64));
}

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

.player-button-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--volcanic-600), var(--volcanic-800));
  box-shadow: var(--shadow-hot);
  font-size: 1.6rem;
}

.detail-info-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--ash-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  background: var(--ash-200);
}

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

.detail-copy h1 {
  color: var(--ash-900);
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ash-700);
  background: var(--ash-100);
  font-weight: 700;
}

.detail-article {
  padding: 28px;
  border: 1px solid var(--ash-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-article p {
  margin: 16px 0 0;
  white-space: pre-line;
}

.review-block {
  border-left: 6px solid var(--lava-400);
}

.empty-state {
  display: none;
  margin: 26px 0 0;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--ash-700);
  background: var(--ash-100);
  font-weight: 800;
  text-align: center;
}

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

.site-footer {
  padding: 48px 0;
  color: var(--ash-200);
  background: var(--ash-900);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: var(--white);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--lava-400);
}

[hidden] {
  display: none !important;
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-bar {
    grid-template-columns: auto 1fr auto;
  }

  .desktop-nav,
  .site-search-form {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero {
    height: 520px;
  }

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

  .home-search-inner,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-head span {
    width: 120px;
  }

  .movie-grid.six-cols,
  .movie-grid.five-cols,
  .movie-grid.four-cols,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-cover {
    width: min(260px, 100%);
  }

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

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

  .hero {
    height: 500px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  .content-section,
  .theme-section {
    padding: 48px 0;
  }

  .movie-grid.six-cols,
  .movie-grid.five-cols,
  .movie-grid.four-cols,
  .category-grid {
    gap: 16px;
  }

  .movie-card-body h3 {
    font-size: 0.92rem;
  }

  .movie-one-line,
  .movie-tags {
    display: none;
  }

  .ranking-item {
    grid-template-columns: 28px 52px 1fr;
  }

  .ranking-score {
    display: none;
  }

  .detail-info-card,
  .detail-article {
    padding: 20px;
  }

  .player-button-icon {
    width: 62px;
    height: 62px;
  }
}
