html,
body {
  margin: 0;
  position: relative;
  z-index: 99;
  scroll-behavior: smooth;
  color: var(--text-primary);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

footer {
  margin-top: auto !important;
  position: static;
}

.trending-list {
  counter-reset: trend;
}

.trending-list>a {
  counter-increment: trend;
}

.trending-list .rank::before {
  content: counter(trend, decimal-leading-zero);
}

.back-to-top {
  transition: all 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

body::-webkit-scrollbar {
  display: none;
}

#copy-message {
  position: fixed;
  z-index: 999;
  bottom: 30%;
  width: 60px;
  height: 28px;
  left: 50%;
  transform: translate(-50%, 0);
  background: var(--bg-white);
  border: 1px solid var(--bg-color-3);
  color: var(--text-primary);
  font-size: 12px;
  text-align: center;
  line-height: 28px;
  border-radius: 20px;
}


/* Custom scrollbar styling matches modern platforms */
::-webkit-scrollbar {
  background: var(--bg-scroll);
  border-radius: 9999px;
  height: 6px;
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--color-tertiary);
  border-radius: 9999px;
}

@media (max-width:768px) {}

.star i.full {
  color: var(--color-star);
}

.star i {
  color: var(--color-star-empty);
}

.star i.partial {
  background: linear-gradient(to right, var(--color-star) var(--percent, 0%), var(--color-star-empty) var(--percent, 0%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.num {
  counter-reset: mvp-trend;
}

.num a {
  counter-increment: mvp-trend;
}

.num a .number::after {
  content: '0' counter(mvp-trend);
}

/* ===== Base ===== */
html,
body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans, "Archivo", system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Halftone paper grain + ambient color glows */
body {
  background-image:
    radial-gradient(ellipse 70% 40% at 85% 8%, var(--cobalt-06), transparent 60%),
    radial-gradient(ellipse 60% 35% at 10% 25%, var(--primary-05), transparent 60%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(var(--ink-055) 1px, transparent 1.3px);
  background-size: 16px 16px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, black 20%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, black 20%, transparent 90%);
}

::selection {
  background: var(--color-accent);
  color: var(--text-primary);
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: var(--bg-page);
}

body::-webkit-scrollbar-thumb {
  background: var(--text-primary);
  border: 2px solid var(--bg-page);
  border-radius: 0;
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

img {
  background-color: var(--bg-color-3);
  object-fit: cover;
}

/* ===== Sticky header backdrop (solid; no backdrop-filter so the fixed mobile
       menu can escape to the viewport — backdrop-filter would trap it) ===== */
.header-bg {
  background: var(--bg-header);
}

/* ===== Eyebrow red dash ===== */
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--color-primary);
}

/* ===== Section title red bar ===== */
.section-title-bar::before {
  content: "";
  width: 10px;
  height: 0.85em;
  background: var(--color-primary);
  border: 2px solid var(--text-primary);
  box-shadow: 3px 3px 0 var(--text-primary);
  flex-shrink: 0;
}

/* ===== Hero title highlighter underline on <b> ===== */
.hero-title b::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 6px;
  height: 0.28em;
  background: var(--color-accent);
  z-index: -1;
  transform: skew(-8deg) rotate(-1deg);
}

/* ===== Hero ambient glow pseudo-elements ===== */
.hero-ambient::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -12%;
  width: 48%;
  height: 70%;
  background: radial-gradient(circle, var(--cobalt-10), transparent 62%);
  pointer-events: none;
}

.hero-ambient::after {
  content: "";
  position: absolute;
  bottom: -25%;
  left: -12%;
  width: 44%;
  height: 60%;
  background: radial-gradient(circle, var(--primary-09), transparent 62%);
  pointer-events: none;
}

/* ===== Image cover gradient overlays (per component) ===== */

/* --- Spotlight (featured card) multi-layer editorial mask --- */
.spotlight-overlay {
  position: relative;
}

.spotlight-overlay::before {
  /* Layer 1: bottom gradient darkening */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      transparent 30%,
      rgba(27, 23, 17, 0.25) 58%,
      rgba(27, 23, 17, 0.88) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Hover: accent color wash intensifies */
.spotlight-overlay:hover::after {
  opacity: 1;
  background:
    radial-gradient(circle at 2px 2px,
      rgba(255, 255, 255, 0.18) 1px,
      transparent 1.5px),
    linear-gradient(118deg,
      transparent 44%,
      rgba(255, 210, 63, 0.22) 52%,
      rgba(229, 58, 36, 0.15) 58%,
      transparent 66%);
  background-size: 6px 6px, 100% 100%;
}

/* Inner frame — corner brackets */
.spotlight-frame {
  position: absolute;
  inset: 10px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

.spotlight-frame::before,
.spotlight-frame::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--text-inverse);
  border-style: solid;
  border-width: 0;
}

.spotlight-frame::before {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
}

.spotlight-frame::after {
  bottom: 0;
  right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.group:hover .spotlight-frame {
  opacity: 1;
}

/* --- Mini overlay (small cards) multi-layer mask --- */
.mini-overlay {
  position: relative;
}

.mini-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      transparent 40%,
      rgba(27, 23, 17, 0.78) 100%);
  pointer-events: none;
  z-index: 2;
}

.group:hover .mini-overlay::before {
  opacity: 1;
  background:
    radial-gradient(circle at 1.5px 1.5px,
      rgba(255, 210, 63, 0.22) 0.8px,
      transparent 1.2px),
    linear-gradient(135deg,
      transparent 52%,
      rgba(255, 210, 63, 0.2) 62%,
      rgba(229, 58, 36, 0.12) 70%,
      transparent 78%);
  background-size: 4px 4px, 100% 100%;
}

/* Mini card corner accent */
.mini-corner {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 14px;
  height: 14px;
  border-left: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.group:hover .mini-corner {
  opacity: 1;
}

.card-cover-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--ink-82) 100%);
  pointer-events: none;
}

.bento-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      transparent 40%,
      rgba(27, 23, 17, 0.78) 100%);
  pointer-events: none;
}

.genre-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, var(--accent-22) 0%, transparent 38%, var(--ink-92) 100%);
  pointer-events: none;
}

.quick-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(27, 23, 17, 0.78) 100%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}


.quick-overlay.group:hover::after {
  opacity: 1;
}

/* ===== Footer decorative stripe ===== */
.footer-stripe::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--color-primary) 0 24px, transparent 24px 40px);
  opacity: 0.55;
}

/* ===== Mobile slide-in nav-links (category.html pattern) ===== */
.nav-links {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links.is-open {
  transform: translateX(0) !important;
}

/* ===== Active nav link (kept for main.js hook compatibility) ===== */
.nav-active,
.is-active {
  color: var(--text-primary) !important;
  background: var(--color-accent);
  border-color: var(--text-primary);
  box-shadow: 3px 3px 0 var(--text-primary);
}

/* ===== Animations ===== */
@keyframes px-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes px-press {

  0%,
  100% {
    box-shadow: 4px 4px 0 var(--text-primary);
  }

  50% {
    box-shadow: 7px 7px 0 var(--text-primary);
    transform: translate(-1.5px, -1.5px);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


.pt {
  padding: 20px;
}

.pt h1 {
  line-height: 1.5 !important;
  font-size: 22px !important;
  padding: 0 0 10px 0;
  font-weight: 800;
  margin: 0 0 10px 0;
}

.pt h2 {
  position: relative;
  padding-left: 16px;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.pt h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 10px;
  width: 4px;
  background: var(--text-nav);
  border-radius: 2px;
}

.pt h3,
.pt h4 {
  line-height: 1.5 !important;
  font-size: 16px !important;
  padding: 0 0 10px 0;
  margin: 0 0 10px 0;
}

.pt p,
.pt li {
  line-height: 1.5 !important;
  font-size: 14px !important;
  padding: 0 0 10px 0;
}

.pt p {
  margin: 0 0 15px;
  word-break: break-word;
}

.pt img {
  width: 100%;
}

.pt a {
  word-break: break-all;
  color: #007bff;
}

.pt ul {
  padding-left: 20px
}

table {
  margin-bottom: 10px
}

table,
th,
td {
  border: 1px solid;
  border-collapse: collapse;
}

th,
td {
  padding: 8px;
  text-align: center;
}