/**
 * SSR fallback stylesheet — hand-written, NOT part of the Vite build.
 * Styles the #ssr-content block that non-JS crawlers (Baidu, AI agents,
 * social scrapers) and JS-disabled visitors see. Dark theme matching the
 * site palette from src/index.css :root.
 */

#ssr-content {
    display: block;
    background: #0a0e14;
    color: #e8eef5;
    font: 400 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

#ssr-content a { color: #3b82f6; text-decoration: none; }
#ssr-content a:hover { color: #93c5fd; }
#ssr-content img { max-width: 100%; height: auto; display: block; }

.ssr-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Hero — mirrors the React hero (src/components/Hero.jsx): dark key art,
   blue glow behind the headline, copy-zone scrim, bottom fade into page bg. */
.ssr-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    /* Mirrors the React hero: 72svh band (capped 660px), copy centered
       below the fixed navbar (pt 128px = sm:pt-32), no bottom cushion. */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: min(72vh, 660px);
    min-height: min(72svh, 660px);
    padding: 128px 24px 0;
}
#ssr-content .ssr-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    filter: brightness(0.95) contrast(1.45) saturate(1.12);
}
.ssr-hero-glow {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 520px;
    height: 320px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.30);
    filter: blur(100px);
}
.ssr-hero-scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(90% 50% at 50% 58%, rgba(10, 14, 20, 0.62) 0%, rgba(10, 14, 20, 0.34) 68%, transparent 100%),
        linear-gradient(to bottom, transparent 45%, rgba(10, 14, 20, 0.65) 78%, #0a0e14 100%);
}
.ssr-hero-body { position: relative; }
.ssr-hero h1 {
    font-size: clamp(28px, 4.5vw, 48px);
    line-height: 1;
    letter-spacing: -0.03em;
    color: #f4f7ff;
    margin: 0 0 20px;
    font-weight: 800;
}
/* Gradient title — same vertical cool-white → ice-blue treatment as
   .hero-title-gradient in src/index.css (CSS-only, fine for SSR). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .ssr-hero h1 {
        background-image: linear-gradient(180deg, #f4f7ff 0%, #cad9ee 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    .ssr-hero h1::selection {
        background: rgba(37, 99, 235, 0.35);
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
    }
}
.ssr-hero p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 36rem;
    margin: 0 auto 24px;
    font-size: 16px;
}
.ssr-cta-row { display: flex; gap: 32px; justify-content: center; align-items: center; flex-wrap: wrap; }
.ssr-btn {
    display: inline-block;
    background: #2563eb;
    color: #ffffff !important;
    padding: 12px 22px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 15px;
}
.ssr-btn:hover { background: #3b82f6; }
.ssr-link-muted { color: #d5dbe4 !important; font-weight: 500; }

/* Sections */
.ssr-section { padding: 64px 0; }
.ssr-section-head { margin-bottom: 40px; }
.ssr-section-head h2 {
    font-size: clamp(24px, 4vw, 30px);
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: #e8eef5;
    margin: 0 0 12px;
    font-weight: 700;
}
.ssr-section-head p { color: #7a8a9a; margin: 0; font-size: 16px; max-width: 60ch; }

/* Card grids (games on home, products on game pages) */
.ssr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ssr-card {
    display: flex;
    flex-direction: column;
    background: #131922;
    border: 1px solid rgba(120, 170, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}
.ssr-card img { width: 100%; object-fit: cover; aspect-ratio: 3 / 4; }
.ssr-card img.ssr-icon {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 24px;
    background: #131922;
}
/* Home game cards (#cheats) — banner art mirrors the React LargeGameCard
   photo treatment (brightness 0.9 + punch) so crawlers/no-JS see the
   same artwork. Scoped to home: game-page product grids keep their own
   (unfiltered here) render. */
#cheats .ssr-card img:not(.ssr-icon) { filter: brightness(0.9) saturate(1.1) contrast(1.05); }
.ssr-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ssr-card-body h3 { font-size: 17px; color: #e8eef5; margin: 0; font-weight: 600; }
.ssr-card-body p { font-size: 14px; color: #7a8a9a; margin: 0; }
.ssr-card .ssr-price { color: #3b82f6; font-weight: 700; font-size: 18px; margin: 8px 0 0; }
.ssr-status-line { font-size: 14px; margin: 8px 0 0; font-weight: 500; }

/* Pillars */
.ssr-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.ssr-pillar {
    background: #131922;
    border: 1px solid rgba(120, 170, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}
.ssr-pillar h3 { margin: 0 0 8px; font-size: 18px; color: #e8eef5; font-weight: 500; }
.ssr-pillar p { margin: 0; color: #7a8a9a; font-size: 15px; }

/* FAQ */
.ssr-faq { display: flex; flex-direction: column; }
.ssr-faq-item { border-bottom: 1px solid rgba(120, 170, 255, 0.08); padding: 20px 0; }
.ssr-faq-item h3 { margin: 0 0 8px; font-size: 17px; color: #e8eef5; font-weight: 600; }
.ssr-faq-item p { margin: 0; color: #7a8a9a; font-size: 15px; }

/* Testimonials */
.ssr-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ssr-quote {
    background: #131922;
    border: 1px solid rgba(120, 170, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    margin: 0;
}
.ssr-quote p { color: #e8eef5; font-size: 15px; margin: 0 0 16px; }
.ssr-quote footer { color: #7a8a9a; font-size: 14px; }
.ssr-quote cite { font-style: normal; color: #e8eef5; font-weight: 600; }

/* CTA band — same blue band as the old flat blue-600, but with dimension
   (mirrors .ku-cta-band in src/index.css): diagonal top-left light
   sweep, vertical deepening ramp. The ramp holds a flat #2153c9 for
   its last ~22% so the junction into .ssr-footer below is a single
   color; the sweep fades out inside this element. */
.ssr-cta {
  text-align: center;
  padding: clamp(32px, 5vw, 56px) 24px;
  background:
    linear-gradient(165deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.05) 28%,
      rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg,
      #2e6ae8 0%,
      #2961dc 22%,
      #2458ce 48%,
      #2153c9 78%,
      #2153c9 100%);
}

/* Content→band junction — the last section's bottom padding alone:
   48px mobile / 64px ≥640px, mirroring pb-12 sm:pb-16 in the React app.
   The ≥640px override lives after the ≤800px block below (source order
   beats its .ssr-section shorthand in the 640–800px overlap). */
.ssr-section--last { padding-bottom: 48px; }
.ssr-cta h2 { color: #ffffff; font-size: clamp(24px, 4vw, 32px); margin: 0 0 24px; font-weight: 700; letter-spacing: -0.03em; }
.ssr-btn-dark {
    display: inline-block;
    background: #111827;
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
}

/* Footer continues the band from the .ssr-cta junction color (#2153c9)
   down to the deepest blue (mirrors the lower half of .ku-cta-band in
   src/index.css). */
.ssr-footer {
  background:
    linear-gradient(180deg,
      #2153c9 0%,
      #1d4bb4 30%,
      #18409e 60%,
      #12317e 100%);
}
.ssr-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
/* CTA/links divider — light hairline; blue-500 vanishes against the
   band ramp (mirrors .ku-cta-band .border-t in src/index.css). */
.ssr-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding: 32px 0; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.ssr-footer-cols h6 { color: #ffffff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px; font-weight: 700; }
.ssr-footer-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ssr-footer-cols a { color: rgba(255, 255, 255, 0.92) !important; font-size: 15px; }
.ssr-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 24px; border-top: 1px solid rgba(59, 130, 246, 0.5); }
.ssr-footer-bottom p { margin: 0; color: rgba(255, 255, 255, 0.92); font-size: 15px; }
.ssr-klever { color: rgba(255, 255, 255, 0.92) !important; font-weight: 700; font-size: 14px; }
.ssr-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.ssr-social a { color: rgba(255, 255, 255, 0.8) !important; font-size: 14px; }

/* Product page */
.ssr-breadcrumb { padding: 24px 0 0; font-size: 13px; color: #7a8a9a; }
.ssr-breadcrumb a { color: #7a8a9a !important; }
.ssr-product { padding: 24px 0 48px; }
/* Product page joins the unified content→band junction (64px ≥640px). */
@media (min-width: 640px) {
    .ssr-product { padding-bottom: 64px; }
}
.ssr-product-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 24px; }
.ssr-product-media img { border-radius: 12px; border: 1px solid rgba(120, 170, 255, 0.08); width: 100%; }
.ssr-game-label { color: #3b82f6; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin: 16px 0 4px; }
.ssr-product h1 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -0.035em; color: #e8eef5; margin: 0 0 8px; font-weight: 800; line-height: 1.05; }
.ssr-meta { color: #7a8a9a; font-size: 14px; margin: 0 0 16px; }
.ssr-desc { color: #7a8a9a; font-size: 15px; margin: 0 0 16px; }
.ssr-status { font-size: 14px; color: #7a8a9a; margin: 0 0 4px; }
.ssr-buy { background: #131922; border: 1px solid rgba(120, 170, 255, 0.08); border-radius: 12px; padding: 20px; align-self: start; }
.ssr-buy h3 { margin: 0 0 16px; font-size: 20px; color: #e8eef5; font-weight: 700; }
.ssr-plans { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ssr-plan { display: flex; justify-content: space-between; align-items: center; background: #1a2230; border: 1px solid rgba(120, 170, 255, 0.08); border-radius: 8px; padding: 12px 14px; }
.ssr-plan-label { color: #e8eef5; font-size: 15px; }
.ssr-plan-price { color: #3b82f6; font-weight: 700; font-size: 17px; }
.ssr-badge { background: #2563eb; color: #ffffff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; margin-left: 6px; }
.ssr-buy-note { color: #e8eef5; font-weight: 700; font-size: 15px; margin: 0 0 4px; }
.ssr-buy-help { color: #7a8a9a; font-size: 14px; margin: 0 0 12px; }
.ssr-secure { color: #22c55e; font-weight: 700; font-size: 14px; margin: 0; }

/* Product sections */
.ssr-h2 { font-size: clamp(22px, 3.5vw, 28px); letter-spacing: -0.035em; color: #e8eef5; font-weight: 800; margin: 48px 0 8px; }
.ssr-h2-sub { color: #7a8a9a; margin: 0 0 24px; font-size: 16px; }
.ssr-feature-list { margin: 0 0 16px; padding-left: 20px; color: #e8eef5; font-size: 15px; }
.ssr-feature-cat { background: #131922; border: 1px solid rgba(120, 170, 255, 0.08); border-radius: 12px; padding: 24px; margin-bottom: 16px; }
.ssr-feature-cat h3 { margin: 0 0 4px; color: #e8eef5; font-size: 18px; font-weight: 500; }
.ssr-cat-sub { color: #7a8a9a; font-size: 14px; margin: 0 0 12px; }
.ssr-feature-cat ul { margin: 0; padding-left: 20px; color: #e8eef5; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.ssr-side-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.ssr-panel { background: #131922; border: 1px solid rgba(120, 170, 255, 0.08); border-radius: 12px; padding: 24px; }
.ssr-panel h3 { margin: 0 0 16px; color: #e8eef5; font-size: 20px; font-weight: 700; }
.ssr-dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.ssr-dl dt { color: #7a8a9a; font-size: 14px; }
.ssr-dl dd { margin: 0; color: #e8eef5; font-size: 15px; text-align: right; }
.ssr-panel ul { margin: 0 0 16px; padding-left: 20px; color: #e8eef5; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.ssr-note { color: #7a8a9a; font-size: 14px; font-style: italic; margin: 16px 0 0; border-top: 1px solid rgba(120, 170, 255, 0.08); padding-top: 16px; }
.ssr-back { display: inline-block; margin-top: 32px; }

/* Game page — Netflix-style key-art hero, mirrors the React ProductList
   hero: banner reads as the right-side subject (≥1024px) or the full-bleed
   backdrop below that, text stack sits bottom-left on solid page bg, and a
   bottom fade blends the hero into the product rows. */
.ssr-game-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 300px;
    padding: 64px 0 32px;
}
@media (min-width: 1024px) {
    .ssr-game-hero { min-height: 0; padding: 96px 0 40px; }
}
.ssr-game-hero-art { position: absolute; inset: 0; }
@media (min-width: 1024px) {
    .ssr-game-hero-art { left: auto; width: 55%; }
}
#ssr-content .ssr-game-hero-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center 30%;
    opacity: 0.92; filter: saturate(1.12) contrast(1.06) brightness(0.95);
}
/* Left-edge dissolve — the art melts into the page bg (≥1024px). Extended
   1px left of the art zone so the zone's fractional boundary pixel is
   painted solid bg (no faint 1px seam). */
.ssr-game-hero-dissolve { display: none; }
@media (min-width: 1024px) {
    .ssr-game-hero-dissolve {
        display: block; position: absolute; top: 0; bottom: 0; left: -1px; right: 0;
        background: linear-gradient(90deg, #0a0e14 0%, #0a0e14 8%, rgba(10,14,20,0.62) 28%, rgba(10,14,20,0.18) 50%, rgba(10,14,20,0) 64%);
    }
}
.ssr-game-hero-vscrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,14,20,0.62) 0%, rgba(10,14,20,0.32) 26%, rgba(10,14,20,0.58) 52%, rgba(10,14,20,0.9) 74%, rgba(10,14,20,0.97) 100%);
}
@media (min-width: 1024px) {
    .ssr-game-hero-vscrim { display: none; }
}
/* Glows — contained radial gradients that fade to transparent inside the
   hero band, so no blurred-circle overflow and no visible clip edge. */
.ssr-game-hero-glow {
    position: absolute; left: 0; top: 50%; width: min(45%, 380px); height: 50%;
    background: radial-gradient(closest-side, rgba(37,99,235,0.10), transparent);
}
.ssr-game-hero-glow--right {
    position: absolute; right: 0; top: 25%; width: min(60%, 380px); height: 50%;
    background: radial-gradient(closest-side, rgba(37,99,235,0.11), transparent);
}
/* Bottom fade — hero dissolves into the product rows below. */
.ssr-game-hero-fade {
    position: absolute; left: 0; right: 0; bottom: 0; height: 96px;
    background: linear-gradient(to top, #0a0e14, transparent);
}
/* Top fade — the header floats over the art's top edge. */
.ssr-game-hero-topfade {
    position: absolute; left: 0; right: 0; top: 0; height: 64px;
    background: linear-gradient(to bottom, #0a0e14, transparent);
}
.ssr-game-hero-inner, .ssr-game-hero-stack { position: relative; }
/* The hero is a column flexbox (bottom-aligned stack); without an explicit
   width the margin:auto container shrink-wraps to its content and drifts
   over the art. Force full width so it behaves like every other
   .ssr-container: max-width 1200 centered, text column at the padding. */
.ssr-game-hero-inner { width: 100%; }
.ssr-game-breadcrumb { padding: 0; margin: 0 0 24px; font-size: 13px; color: #7a8a9a; }
.ssr-game-breadcrumb a { color: #7a8a9a !important; }
/* Text column: full container width below lg; at lg+ it ends where the art
   zone begins (left edge at 45vw ≈ 45% of the container), mirroring the
   React wrapper's lg:max-w-[45%] in src/components/ProductList.jsx. */
.ssr-game-hero-stack { max-width: none; }
@media (min-width: 1024px) {
    .ssr-game-hero-stack { max-width: 45%; }
}
/* Title — one line only, mirroring the React .game-hero-title
   (src/index.css). System-font metrics run wider than Cabinet Grotesk
   (≈12.3px of advance per 1px font-size for the longest name, "Escape
   from Tarkov 作弊器"), so the slopes are flatter than the React ones:
   below lg the column is the full container (vw − 48); at lg+ it ends at
   the art zone's left edge. */
.ssr-game-hero h1 {
    font-size: clamp(18px, 6.7vw, 68px); line-height: 1.02; letter-spacing: -0.035em;
    color: #e8eef5; margin: 0 0 20px; font-weight: 800; white-space: nowrap;
}
@media (min-width: 1024px) {
    .ssr-game-hero h1 { font-size: clamp(33.6px, 3.3vw, 38px); }
}
.ssr-game-hero h1 .ssr-accent { color: #3b82f6; }
.ssr-game-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
.ssr-game-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
    border-radius: 8px; background: rgba(26,34,48,0.85); color: #e8eef5;
    font-size: 13px; font-weight: 700;
}
.ssr-game-badge svg { color: #f59e0b; }
.ssr-game-sold { color: #e8eef5; font-size: 15px; font-weight: 600; }

/* Game hero title — two-tone gradient mirroring the React ProductList h1
   (src/index.css .hero-title-gradient / .hero-title-accent): cool-white →
   ice-blue on the game name, light-blue → brand-blue on the 作弊器 suffix.
   Fallbacks keep the old solid look where background-clip:text is absent. */
#ssr-content .ssr-title-gradient { color: #e8eef5; }
#ssr-content .ssr-title-accent { color: #3b82f6; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    #ssr-content .ssr-title-gradient {
        background-image: linear-gradient(180deg, #f4f7ff 0%, #cad9ee 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    #ssr-content .ssr-title-gradient::selection {
        background: rgba(37, 99, 235, 0.35);
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
    }
    #ssr-content .ssr-title-accent {
        background-image: linear-gradient(180deg, #6ea8ff 0%, #3b82f6 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    #ssr-content .ssr-title-accent::selection {
        background: rgba(37, 99, 235, 0.35);
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
    }
}

.ssr-empty { text-align: center; padding: 48px 0; }
.ssr-empty p { margin: 0 0 8px; }
.ssr-empty .ssr-empty-title { color: #e8eef5; font-size: 17px; }
.ssr-empty .ssr-empty-sub { color: #7a8a9a; font-size: 15px; margin-bottom: 24px; }

/* Generic fallback page */
.ssr-generic { text-align: center; padding: 96px 24px; }
.ssr-generic h1 { color: #ffffff; font-size: clamp(28px, 5vw, 40px); margin: 0 0 16px; font-weight: 800; }
.ssr-generic p { color: rgba(255, 255, 255, 0.7); max-width: 36rem; margin: 0 auto; }

/* Generic WordPress page (e.g. /terms/, /contact/) — layout cloned from
   altcheats.com/terms + /support (mirrors the React GenericPage:
   .ku-page / .ku-page-content in src/index.css — keep in sync): centered
   head (56px H1, sub, meta) over a full-width body; terms uses a 240px
   TOC sidebar + body grid via the data-page attr on <main>. The
   content's own hooks (.ku-terms-*, .ku-contact-*) are shared with the
   SPA render. */
.ssr-page .ssr-container { max-width: 1440px; padding: 0 60px; }
@media (max-width: 767.98px) {
    .ssr-page .ssr-container { padding: 0 20px; }
}
.ssr-page { padding: 120px 0 80px; }
@media (max-width: 767.98px) {
    .ssr-page { padding: 88px 0 40px; }
}
.ssr-page-title { max-width: 760px; margin: 0 auto 12px; text-align: center; font-size: clamp(26px, 4.4vw + 8px, 56px); line-height: 1.05; letter-spacing: -0.035em; color: #ededed; font-weight: 700; }
.ssr-page-content .ku-terms-sub,
.ssr-page-content .ku-contact-lead { max-width: 576px; margin: 0 auto 40px; text-align: center; color: #b8b8b8; font-size: 17px; line-height: 1.6; }
.ssr-page-content .ku-terms-meta { margin: 14px auto 40px; text-align: center; color: #a1a1a1; font-size: 13px; letter-spacing: 0.02em; }
.ssr-page-content .ku-terms-sub { margin-bottom: 0; }
@media (max-width: 767.98px) {
    .ssr-page-content .ku-terms-sub,
    .ssr-page-content .ku-contact-lead { font-size: 14px; margin-bottom: 32px; }
    .ssr-page-content .ku-terms-meta { margin-bottom: 32px; }
}
.ssr-page[data-page="terms"] .ssr-page-content { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 64px; align-items: start; }
.ssr-page[data-page="terms"] .ssr-page-content > .ku-terms-sub,
.ssr-page[data-page="terms"] .ssr-page-content > .ku-terms-meta { grid-column: 1 / -1; }
.ssr-page[data-page="terms"] .ssr-page-content .ku-terms-toc { grid-column: 1; grid-row: 3 / span 999; } /* span all body rows — else the first h2 shares the tall TOC's row and its paragraph drops below the sidebar */
.ssr-page[data-page="terms"] .ssr-page-content > h2,
.ssr-page[data-page="terms"] .ssr-page-content > p,
.ssr-page[data-page="terms"] .ssr-page-content > ul { grid-column: 2; }
.ssr-page[data-page="terms"] .ssr-page-content > h2:first-of-type { margin-top: 0; }
@media (max-width: 767.98px) {
    .ssr-page[data-page="terms"] .ssr-page-content { grid-template-columns: minmax(0, 1fr); }
    .ssr-page[data-page="terms"] .ssr-page-content > h2,
    .ssr-page[data-page="terms"] .ssr-page-content > p,
    .ssr-page[data-page="terms"] .ssr-page-content > ul { grid-column: auto; }
    .ssr-page[data-page="terms"] .ssr-page-content .ku-terms-toc { grid-column: auto; grid-row: auto; margin-bottom: 32px; }
}
.ssr-page-content .ku-terms-toc h4 { margin: 0 0 16px; color: #a1a1a1; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.ssr-page-content .ku-terms-toc ul { list-style: none; margin: 0; padding: 0; display: block; }
/* li scoping keeps the generic body-list dot markers off the TOC and
   the link specificity above the terms-scoped content link rule. */
.ssr-page-content .ku-terms-toc ul li { padding-left: 0; }
.ssr-page-content .ku-terms-toc ul li::before { content: none; }
.ssr-page .ssr-page-content .ku-terms-toc ul li a { display: block; padding: 7px 12px; border-radius: 8px; color: #b8b8b8 !important; font-size: 14px; }
.ssr-page .ssr-page-content .ku-terms-toc ul li a:hover { color: #ededed !important; background: rgba(255, 255, 255, 0.04); }
.ssr-page-content h2 { font-size: clamp(18px, 1.4vw + 12px, 22px); letter-spacing: -0.02em; line-height: 1.2; color: #ededed; font-weight: 700; margin: 36px 0 12px; scroll-margin-top: 96px; }
.ssr-page-content p { color: #b8b8b8; font-size: 16px; line-height: 1.75; margin: 0 0 16px; }
.ssr-page-content ul { list-style: none; margin: 0 0 16px; padding: 0; color: #b8b8b8; font-size: 16px; }
.ssr-page-content ul li { position: relative; padding-left: 28px; line-height: 1.7; margin-bottom: 10px; }
.ssr-page-content ul li::before { content: ''; position: absolute; left: 4px; top: 0.55em; width: 8px; height: 8px; border-radius: 999px; background: #2563eb; }
.ssr-page-content ul li:last-child { margin-bottom: 0; }
.ssr-page-content strong { color: #ededed; font-weight: 600; }
.ssr-page[data-page="terms"] .ssr-page-content a { color: #93c5fd !important; }
.ssr-page-content h2 + p, .ssr-page-content h2 + ul { margin-top: 0; }
/* grid rows don't collapse margins — 16 + 20 emulates the reference's 36px section gap */
.ssr-page-content p + h2, .ssr-page-content ul + h2 { margin-top: 20px; }
@media (max-width: 767.98px) {
    .ssr-page-content h2 { margin: 28px 0 12px; }
    .ssr-page-content p, .ssr-page-content ul { font-size: 15px; }
}

/* 404 page (404.php) — low-contrast watermark behind a centered column.
   Same breakpoints as src/index.css (.not-found-watermark): <640px the
   numeral scales down until fully visible in the narrow column; ≥640px it
   is a huge backdrop sized by both axes (min(45vw, 65vh)) so it never
   outgrows the viewport. This template carries no navbar/footer, so the
   block centers in the full viewport at every width (the React view uses
   70vh on phones so its CtaFooter peeks — not applicable here). */
.ssr-404 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    text-align: center;
}
.ssr-404-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(6rem, 40vw, 10rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    color: #1a2230;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}
.ssr-404-body { position: relative; z-index: 1; padding: 64px 24px; }
.ssr-404 h1 { color: #e8eef5; font-size: clamp(1.75rem, 4.5vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.15; font-weight: 800; margin: 0 0 20px; }
.ssr-404-muted { color: #7a8a9a; font-weight: 500; }
.ssr-404-line { color: #7a8a9a; font-size: 15px; margin: 0 0 8px; }
#ssr-content .ssr-404-link {
    display: inline-block;
    margin-top: 24px;
    color: #3b82f6;
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(59, 130, 246, 0.5);
    transition: color 0.2s ease;
}
#ssr-content .ssr-404-link:hover { color: #93c5fd; text-decoration-color: #93c5fd; }

/* 404 ≥640px: huge watermark capped by both viewport axes + roomier
   body padding (mirrors py-16 sm:py-24 in src/components/NotFound.jsx). */
@media (min-width: 640px) {
    .ssr-404-watermark { font-size: min(45vw, 65vh); }
    .ssr-404-body { padding: 96px 24px; }
}

@media (max-width: 800px) {
    .ssr-product-grid { grid-template-columns: 1fr; }
    .ssr-hero { padding: 112px 16px 0; }
    .ssr-section { padding: 48px 0; }
    .ssr-footer-cols { grid-template-columns: repeat(2, 1fr); }
}

/* ≥640px half of the content→band junction (see .ssr-section--last above) —
   declared after the ≤800px block so 640–800px viewports resolve to 64px. */
@media (min-width: 640px) {
    .ssr-section--last { padding-bottom: 64px; }
}

/* Match the React footer: link columns stack below 400px so Chinese labels
   never sit in ~100px-wide columns. */
@media (max-width: 399.98px) {
    .ssr-footer-cols { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Pre-React boot loader (.ku-boot) — NO styles here anymore. The loader
   must be styled in <head> before any body HTML streams (a slow HTML
   response paints the streaming SSR markup otherwise), so its single
   source of truth is the inline <style> echoed by
   kleverup_react_boot_head_style() in functions.php. The templates'
   end-of-body script still hides #ssr-content / shows #ku-boot as a
   redundant belt behind the head style + <noscript> pair.
   ========================================================================== */

/* Contact page (/contact — seeded WP page; layout cloned from
   altcheats.com/support). Shared class names with the SPA render
   (.ku-page-content scope in src/index.css) — keep in sync. */
.ssr-page-content .ku-contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 0 0 44px; }
.ssr-page-content .ku-contact-card { display: flex; align-items: center; gap: 16px; min-height: 80px; padding: 18px 20px; background: #131922; border-radius: 14px; text-decoration: none; }
.ssr-page-content .ku-contact-card:hover { background: #1a2230; }
.ssr-page-content .ku-contact-card-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: rgba(37, 99, 235, 0.15); color: #2563eb; }
.ssr-page-content .ku-contact-card-icon svg { width: 22px; height: 22px; }
.ssr-page-content .ku-contact-card-body { display: flex; flex-direction: column; min-width: 0; }
.ssr-page-content .ku-contact-card-name { margin-bottom: 2px; color: #ededed; font-size: 15px; font-weight: 700; }
.ssr-page-content .ku-contact-card-handle { color: #a1a1a1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ssr-page-content .ku-contact-card-arrow { margin-left: auto; color: #a1a1a1; font-size: 14px; }
.ssr-page-content .ku-contact-card:hover .ku-contact-card-arrow { color: #3b82f6; }
.ssr-page-content .ku-contact-split { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); column-gap: 44px; align-items: start; border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 36px 0; }
.ssr-page-content .ku-contact-split-h { grid-column: 1; }
.ssr-page-content .ku-contact-kicker { display: block; margin-bottom: 12px; color: #2563eb; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.ssr-page-content .ku-contact-split-h h2 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; color: #ededed; font-weight: 700; }
.ssr-page-content .ku-contact-points { grid-column: 2; margin: 0 0 24px; }
.ssr-page-content .ku-contact-points li { margin-bottom: 12px; }
.ssr-page-content .ku-contact-note { grid-column: 2; margin: 24px 0 0; color: #b8b8b8; font-size: 17px; line-height: 1.7; }
.ssr-page-content .ku-contact-note strong { color: #ededed; font-weight: 600; }
@media (max-width: 767.98px) {
    .ssr-page-content .ku-contact-cards { gap: 10px; margin-bottom: 44px; }
    .ssr-page-content .ku-contact-card { min-height: 74px; gap: 12px; padding: 16px 18px; }
    .ssr-page-content .ku-contact-split { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
    .ssr-page-content .ku-contact-points,
    .ssr-page-content .ku-contact-note { grid-column: auto; }
    .ssr-page-content .ku-contact-split-h h2 { font-size: 22px; }
    .ssr-page-content .ku-contact-note { font-size: 15px; }
}
