:root {
  --ash-950: #090b0e;
  --ash-900: #0d0f12;
  --ash-800: #212529;
  --ash-700: #343a40;
  --ash-600: #495057;
  --ash-300: #ced4da;
  --ash-200: #dee2e6;
  --ash-100: #f1f3f5;
  --ash-50: #f8f9fa;
  --volcanic-900: #c03711;
  --volcanic-800: #e84118;
  --volcanic-700: #ee692c;
  --volcanic-600: #f07f4a;
  --lava-400: #ffb81a;
  --lava-100: #ffe6b3;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(13, 15, 18, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ash-900);
  background: linear-gradient(180deg, var(--ash-50), var(--white));
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--volcanic-800), var(--volcanic-900));
  color: var(--white);
  box-shadow: 0 14px 30px rgba(192, 55, 17, 0.22);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--lava-400), var(--volcanic-600));
  color: var(--ash-900);
  box-shadow: 0 10px 24px rgba(255, 184, 26, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 700;
}

.nav-links a,
.mobile-panel a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 20px;
  flex-direction: column;
  gap: 14px;
  font-weight: 700;
}

.mobile-panel.open {
  display: flex;
}

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

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

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

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

.hero-slide img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 15, 18, 0.95), rgba(13, 15, 18, 0.44), rgba(13, 15, 18, 0.1));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 184, 26, 0.16);
  color: #7a4200;
  border: 1px solid rgba(255, 184, 26, 0.24);
  font-size: 12px;
  font-weight: 700;
}

.hero .hero-tags span,
.detail-hero .hero-tags span {
  background: rgba(255, 184, 26, 0.2);
  color: var(--lava-100);
}

.hero h1,
.detail-info h1,
.page-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.hero p,
.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.7;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--volcanic-600), var(--volcanic-800));
  color: var(--white);
  box-shadow: 0 16px 30px rgba(232, 65, 24, 0.32);
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

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

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

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

.hero-search,
.inline-search {
  display: flex;
  gap: 10px;
  width: min(720px, calc(100% - 32px));
  margin: -32px auto 0;
  position: relative;
  z-index: 5;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-search input,
.inline-search input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ash-50);
  outline: none;
}

.hero-search button,
.inline-search button {
  min-width: 96px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--volcanic-600), var(--volcanic-800));
  font-weight: 800;
  cursor: pointer;
}

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

.tinted {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, #fff5e6, #ffffff);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
  font-weight: 900;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(222, 226, 230, 0.85);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(13, 15, 18, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(240, 127, 74, 0.45);
  box-shadow: var(--shadow);
}

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

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

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

.poster-play,
.card-rank {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  min-height: 34px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(13, 15, 18, 0.72);
  backdrop-filter: blur(10px);
}

.card-rank {
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  color: var(--ash-900);
  background: var(--lava-400);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ash-600);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-card p,
.lead-text {
  margin: 0 0 12px;
  color: var(--ash-600);
  font-size: 14px;
  line-height: 1.65;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(13, 15, 18, 0.08);
}

.category-cover {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 20px;
  background: var(--ash-200);
}

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

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 900;
}

.category-tile p {
  margin: 0 0 10px;
  color: var(--ash-600);
  font-size: 14px;
  line-height: 1.55;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--volcanic-800);
  background: #fff5e6;
  font-size: 12px;
  font-weight: 800;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(222, 226, 230, 0.9);
  border-radius: 18px;
  background: var(--white);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: var(--volcanic-600);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--volcanic-600), var(--volcanic-900));
  font-weight: 900;
}

.rank-row img {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
}

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

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 900;
}

.rank-info em {
  margin-top: 6px;
  color: var(--ash-600);
  font-size: 13px;
  font-style: normal;
}

.rank-watch {
  color: var(--volcanic-800);
  font-size: 14px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  padding: 92px max(16px, calc((100% - 1180px) / 2));
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 16% 18%, rgba(255, 184, 26, 0.32), transparent 28%), linear-gradient(135deg, var(--ash-950), var(--volcanic-900));
}

.slim-hero {
  padding-top: 82px;
  padding-bottom: 70px;
}

.category-hero .inline-search,
.slim-hero .inline-search {
  margin: 28px 0 0;
  width: min(680px, 100%);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
}

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

.category-sections {
  display: grid;
  gap: 46px;
}

.category-block {
  padding-bottom: 38px;
  border-bottom: 1px solid var(--ash-200);
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(3px) saturate(1.1);
  transform: scale(1.04);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 64px;
  color: var(--white);
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
  background: var(--ash-800);
}

.detail-poster img {
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
}

.detail-info h1 {
  max-width: 900px;
}

.detail-meta span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--lava-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.player-section {
  padding-top: 56px;
  padding-bottom: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(232, 65, 24, 0.28), rgba(0, 0, 0, 0.38));
  cursor: pointer;
}

.player-shell.playing .player-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ash-900);
  background: var(--lava-400);
  box-shadow: 0 18px 46px rgba(255, 184, 26, 0.34);
  font-size: 28px;
}

.article-body {
  max-width: 920px;
  padding-top: 34px;
}

.article-body h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 900;
}

.article-body p {
  margin: 0 0 26px;
  color: var(--ash-700);
  font-size: 17px;
  line-height: 2;
}

.pager-links {
  padding-top: 16px;
  padding-bottom: 16px;
  justify-content: space-between;
}

.pager-links a {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--ash-100);
  color: var(--ash-800);
  font-weight: 800;
}

.site-footer {
  margin-top: 44px;
  padding: 52px max(16px, calc((100% - 1180px) / 2)) 28px;
  color: var(--ash-300);
  background: var(--ash-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

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

.site-footer p {
  margin: 10px 0 0;
  color: var(--ash-300);
  line-height: 1.7;
}

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

.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ash-300);
  text-align: center;
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

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

  .nav-toggle {
    display: block;
  }

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

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

@media (max-width: 760px) {
  .hero-carousel {
    height: 540px;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero p,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

  .hero-search,
  .inline-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search button,
  .inline-search button {
    width: 100%;
  }

  .section-wrap {
    padding: 52px 0;
  }

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

  .category-tile {
    grid-template-columns: 88px 1fr;
    padding: 14px;
  }

  .rank-row {
    grid-template-columns: 42px 54px 1fr;
  }

  .rank-watch {
    display: none;
  }

  .rank-row img {
    width: 54px;
    height: 72px;
  }

  .detail-grid {
    grid-template-columns: 130px 1fr;
    gap: 18px;
  }

  .detail-info h1 {
    font-size: 34px;
  }

  .player-shell {
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .site-nav {
    min-height: 64px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

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

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

  .detail-poster {
    width: 54%;
  }

  .pager-links {
    align-items: stretch;
  }

  .pager-links a {
    width: 100%;
  }
}
