:root {
  --ash-950: #07080a;
  --ash-900: #0d0f12;
  --ash-800: #212529;
  --ash-700: #343a40;
  --ash-600: #495057;
  --ash-500: #6c757d;
  --ash-400: #adb5bd;
  --ash-300: #ced4da;
  --ash-200: #dee2e6;
  --ash-100: #f1f3f5;
  --ash-50: #f8f9fa;
  --volcanic-900: #7a1e0d;
  --volcanic-800: #9a2a13;
  --volcanic-700: #ee692c;
  --volcanic-600: #f07f4a;
  --lava-500: #ff9f0a;
  --lava-400: #ffb81a;
  --lava-100: #ffe6b3;
  --white: #ffffff;
  --shadow-volcanic: 0 18px 60px rgba(232, 65, 24, 0.28);
  --shadow-soft: 0 12px 34px rgba(13, 15, 18, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--volcanic-900), var(--volcanic-700));
  box-shadow: var(--shadow-volcanic);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.brand-mark,
.footer-logo span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lava-400);
  color: var(--volcanic-900);
  box-shadow: 0 0 34px rgba(255, 184, 26, 0.36);
  font-size: 16px;
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--lava-100);
  font-style: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--white);
  font-weight: 600;
}

.site-nav a {
  position: relative;
  padding: 28px 0;
  white-space: nowrap;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--lava-400);
  opacity: 1;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--lava-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  width: 42px;
  height: 42px;
}

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  min-height: 600px;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(13, 15, 18, 0.92) 0%, rgba(13, 15, 18, 0.58) 48%, rgba(13, 15, 18, 0.18) 100%),
    linear-gradient(0deg, rgba(13, 15, 18, 0.95) 0%, rgba(13, 15, 18, 0.18) 54%, rgba(13, 15, 18, 0.42) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 184, 26, 0.14);
  color: var(--lava-400);
  border: 1px solid rgba(255, 184, 26, 0.28);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.compact-hero h1,
.detail-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-copy p,
.compact-hero p,
.detail-copy p {
  margin: 0;
  color: var(--ash-200);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.hero-meta span,
.movie-meta-pill {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--ash-100);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

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

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

.primary-btn,
.home-search button {
  color: var(--white);
  background: linear-gradient(90deg, var(--volcanic-700), var(--volcanic-900));
  box-shadow: var(--shadow-volcanic);
}

.primary-btn:hover,
.home-search button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 65px rgba(232, 65, 24, 0.36);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

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

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

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

.quick-search-card {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 24px;
  align-items: center;
  margin-top: -48px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.quick-search-card h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 34px);
}

.quick-search-card p {
  margin: 0;
  color: var(--ash-600);
  line-height: 1.7;
}

.home-search {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--ash-200);
  background: var(--white);
  color: var(--ash-900);
  padding: 0 17px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.content-section {
  padding: 64px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  font-weight: 900;
}

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

.section-heading span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--volcanic-700), rgba(238, 105, 44, 0));
}

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

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.movie-card {
  border-radius: var(--radius-md);
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(13, 15, 18, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(13, 15, 18, 0.16);
}

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

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

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

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

.play-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(8px);
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--lava-400);
  color: var(--volcanic-900);
  font-size: 13px;
  font-weight: 900;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-pill {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(238, 105, 44, 0.92);
  font-size: 12px;
}

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

.movie-card h2,
.horizontal-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
}

.movie-card h2 a:hover,
.horizontal-card h2 a:hover,
.rank-title:hover {
  color: var(--volcanic-700);
}

.movie-meta {
  margin: 0 0 8px;
  color: var(--ash-500);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--ash-700);
  font-size: 14px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--lava-100);
  color: var(--volcanic-900);
  font-size: 12px;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.category-tile {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--white), #fff8ee);
  border: 1px solid rgba(238, 105, 44, 0.12);
  box-shadow: 0 8px 25px rgba(13, 15, 18, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

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

.category-thumbs img {
  width: 47px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
  background: var(--ash-800);
}

.category-tile h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.category-tile p {
  margin: 0;
  color: var(--ash-600);
  line-height: 1.6;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 6px 18px rgba(13, 15, 18, 0.06);
}

.rank-number {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--volcanic-700), var(--lava-400));
  color: var(--white);
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--ash-500);
  font-size: 13px;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 6px 18px rgba(13, 15, 18, 0.06);
}

.horizontal-card img {
  width: 92px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.horizontal-card p {
  margin: 0;
  color: var(--ash-600);
  line-height: 1.55;
}

.page-hero {
  position: relative;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 184, 26, 0.26), transparent 30%),
    linear-gradient(135deg, var(--ash-950), var(--volcanic-900) 52%, var(--volcanic-700));
  color: var(--white);
}

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

.compact-hero h1 {
  max-width: 900px;
}

.compact-hero p {
  max-width: 850px;
}

.large-category-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.wide-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(90deg, var(--volcanic-800), var(--volcanic-700));
  box-shadow: var(--shadow-volcanic);
}

.wide-link-card strong {
  font-size: 24px;
}

.wide-link-card span {
  color: var(--lava-100);
}

.filter-panel {
  position: sticky;
  top: 92px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(150px, 0.7fr));
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 28px rgba(13, 15, 18, 0.1);
  backdrop-filter: blur(12px);
}

.search-box {
  display: grid;
  gap: 6px;
}

.search-box span {
  color: var(--ash-600);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  margin-top: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--ash-600);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rankings-page {
  display: grid;
  gap: 44px;
}

.ranking-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

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

.detail-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg img {
  object-fit: cover;
  filter: blur(3px);
  transform: scale(1.03);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 42px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 34px;
  color: var(--ash-200);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: center;
}

.detail-poster img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
}

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

.detail-tags {
  margin: 24px 0;
}

.player-section {
  margin-top: -52px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-trigger {
  width: clamp(70px, 9vw, 104px);
  height: clamp(70px, 9vw, 104px);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: var(--volcanic-900);
  background: var(--lava-400);
  font-size: clamp(30px, 5vw, 44px);
  box-shadow: 0 0 56px rgba(255, 184, 26, 0.54);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 24px;
  padding-top: 44px;
}

.story-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: var(--ash-700);
  line-height: 1.9;
}

.accent-card {
  background: linear-gradient(135deg, #fffaf0, #ffffff);
  border-left: 5px solid var(--lava-400);
}

.site-footer {
  margin-top: 76px;
  padding: 46px 0;
  color: var(--ash-300);
  background: var(--ash-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 42px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 22px;
}

.footer-brand p {
  max-width: 520px;
  color: var(--ash-400);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

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

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

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

@media (max-width: 980px) {
  .header-inner {
    min-height: 68px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(13, 15, 18, 0.96);
    box-shadow: var(--shadow-soft);
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .site-nav a::after {
    display: none;
  }

  .quick-search-card,
  .split-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

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

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

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

  .brand-text em {
    display: none;
  }

  .hero-carousel,
  .hero-slide > img {
    min-height: 540px;
  }

  .hero-content {
    bottom: 58px;
  }

  .quick-search-card {
    margin-top: -34px;
    padding: 20px;
  }

  .home-search {
    flex-direction: column;
  }

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

  .section-heading span {
    width: 100%;
    flex: none;
  }

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

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

  .movie-card h2 {
    font-size: 15px;
  }

  .category-tile {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .category-thumbs img {
    width: 40px;
  }

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

  .rank-meta {
    grid-column: 2;
  }

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

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

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

  .detail-hero {
    min-height: auto;
  }

  .player-section {
    margin-top: -28px;
  }

  .story-card {
    padding: 22px;
  }
}
