/* HOM3 v4n -- GAMER theme. Blood-red on carbon black. Fourth theme
   beside nautical/cyber/corporate; applied via html.theme-gamer and
   the shared --lrw-* variable contract so every themed surface in the
   app re-lights without edits. Higher-graphics treatments: carbon
   weave, angular clips, HUD brackets, scanline sweep, glow focus.
   prefers-reduced-motion honored. ASCII-only. */

html.theme-gamer{
  /* shared contract vars -- everything already built keys off these */
  --lrw-metal:#ff2b4a;
  --lrw-metal-lo:#7a1020;
  --lrw-ink:#f2e9ec;
  --lrw-paper:#0a0510;
  /* gamer-native vars */
  --gm-void:#07030a;
  --gm-carbon:#120609;
  --gm-carbon-2:#1a0a10;
  --gm-blood:#e5133c;
  --gm-neon:#ff2b4a;
  --gm-ember:#ff6b35;
  --gm-edge:#ff2244;
  --gm-text:#f2e9ec;
  --gm-dim:#b3919c;
  --gm-ok:#57e69a;
  --gm-warn:#ffb020;
}

html.theme-gamer, html.theme-gamer body{
  background:
    radial-gradient(1200px 600px at 78% -10%,
      rgba(229,19,60,.14), transparent 60%),
    radial-gradient(900px 500px at 8% 110%,
      rgba(255,107,53,.08), transparent 55%),
    repeating-linear-gradient(135deg,
      var(--gm-carbon) 0 3px, var(--gm-carbon-2) 3px 6px),
    var(--gm-void);
  color:var(--gm-text);
}

/* ---- typography + headers ---- */
html.theme-gamer h1, html.theme-gamer h2, html.theme-gamer h3{
  color:var(--gm-text);
  letter-spacing:.14em;
  text-transform:uppercase;
  text-shadow:0 0 12px rgba(255,43,74,.55), 0 0 2px
    rgba(255,43,74,.9);
  position:relative;
}
html.theme-gamer h1::after, html.theme-gamer h2::after{
  content:""; display:block; height:2px; margin-top:6px;
  background:linear-gradient(90deg, var(--gm-neon), transparent 70%);
  box-shadow:0 0 10px var(--gm-neon);
}
html.theme-gamer ::selection{
  background:var(--gm-blood); color:#fff;
}
html.theme-gamer a{ color:var(--gm-neon); }
html.theme-gamer a:hover{ text-shadow:0 0 8px var(--gm-neon); }

/* ---- nav / tabs ---- */
html.theme-gamer nav a, html.theme-gamer .tabs a,
html.theme-gamer .tab{
  color:var(--gm-dim);
  border-bottom:2px solid transparent;
  transition:color .15s, border-color .15s, text-shadow .15s;
}
html.theme-gamer nav a:hover, html.theme-gamer .tab:hover{
  color:var(--gm-text); text-shadow:0 0 8px rgba(255,43,74,.7);
}
html.theme-gamer nav a.active, html.theme-gamer .tab.active,
html.theme-gamer nav a[aria-current]{
  color:var(--gm-neon);
  border-bottom-color:var(--gm-neon);
  text-shadow:0 0 10px rgba(255,43,74,.8);
}

/* ---- buttons: beveled carbon, angular clip, red edge light ---- */
html.theme-gamer button, html.theme-gamer .btn,
html.theme-gamer input[type="submit"]{
  background:linear-gradient(180deg, #1d0c12, #12060a);
  color:var(--gm-text);
  border:1px solid var(--lrw-metal-lo);
  clip-path:polygon(8px 0, 100% 0, 100% calc(100% - 8px),
    calc(100% - 8px) 100%, 0 100%, 0 8px);
  letter-spacing:.1em;
  position:relative;
  transition:box-shadow .15s, border-color .15s, color .15s;
}
html.theme-gamer button:hover, html.theme-gamer .btn:hover{
  border-color:var(--gm-neon);
  color:#fff;
  box-shadow:0 0 0 1px rgba(255,43,74,.5),
    0 0 18px rgba(255,43,74,.35),
    inset 0 0 12px rgba(255,43,74,.15);
}
html.theme-gamer button:active{
  transform:translateY(1px);
}
html.theme-gamer .st-gate{        /* the Studio POST gate goes hot */
  background:linear-gradient(180deg, var(--gm-neon),
    var(--gm-blood));
  color:#180208;
  border-color:var(--gm-neon);
  box-shadow:0 0 0 1px rgba(255,120,140,.5),
    0 8px 30px rgba(229,19,60,.45);
}

/* ---- inputs ---- */
html.theme-gamer input, html.theme-gamer textarea,
html.theme-gamer select{
  background:rgba(10,4,8,.8);
  color:var(--gm-text);
  border:1px solid var(--lrw-metal-lo);
  caret-color:var(--gm-neon);
}
html.theme-gamer input:focus, html.theme-gamer textarea:focus,
html.theme-gamer select:focus{
  outline:none;
  border-color:var(--gm-neon);
  box-shadow:0 0 0 1px var(--gm-neon),
    0 0 0 3px rgba(255,43,74,.25), 0 0 14px rgba(255,43,74,.35);
}

/* ---- cards / panels: HUD corner brackets on hover ---- */
html.theme-gamer .card, html.theme-gamer .panel,
html.theme-gamer .box, html.theme-gamer .ag-card,
html.theme-gamer .st-card, html.theme-gamer .sm-line,
html.theme-gamer .sw-card, html.theme-gamer .cx-card{
  background:linear-gradient(180deg, rgba(26,10,16,.75),
    rgba(12,5,9,.75));
  border-color:rgba(255,43,74,.22);
  position:relative;
}
html.theme-gamer .ag-card:hover, html.theme-gamer .st-card:hover,
html.theme-gamer .sw-card:hover, html.theme-gamer .cx-card:hover{
  border-color:rgba(255,43,74,.55);
  box-shadow:0 0 16px rgba(229,19,60,.25);
}
html.theme-gamer .cx-card:hover::before,
html.theme-gamer .st-card:hover::before{
  content:""; position:absolute; inset:-1px;
  pointer-events:none;
  background:
    linear-gradient(var(--gm-neon), var(--gm-neon)) top left/12px 2px,
    linear-gradient(var(--gm-neon), var(--gm-neon)) top left/2px 12px,
    linear-gradient(var(--gm-neon), var(--gm-neon)) bottom right/12px
      2px,
    linear-gradient(var(--gm-neon), var(--gm-neon)) bottom right/2px
      12px;
  background-repeat:no-repeat;
}

/* ---- scrollbar ---- */
html.theme-gamer ::-webkit-scrollbar{ width:10px; height:10px; }
html.theme-gamer ::-webkit-scrollbar-track{ background:#0c0509; }
html.theme-gamer ::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, var(--gm-blood), #5a0c1c);
  border-radius:5px; border:2px solid #0c0509;
}
html.theme-gamer ::-webkit-scrollbar-thumb:hover{
  background:var(--gm-neon);
}

/* ---- tables / code ---- */
html.theme-gamer table{ border-color:var(--lrw-metal-lo); }
html.theme-gamer th{
  color:var(--gm-neon); letter-spacing:.12em;
  text-transform:uppercase; font-size:.72em;
  border-bottom:1px solid var(--lrw-metal-lo);
}
html.theme-gamer tr:hover td{ background:rgba(229,19,60,.06); }
html.theme-gamer code, html.theme-gamer pre{
  background:#0d0509; color:#ffd7de;
  border:1px solid rgba(255,43,74,.25);
}

/* ---- status colors ---- */
html.theme-gamer .ok, html.theme-gamer .up{ color:var(--gm-ok); }
html.theme-gamer .warn{ color:var(--gm-warn); }
html.theme-gamer .err, html.theme-gamer .down{ color:var(--gm-neon); }

/* ---- header lockup scanline sweep ---- */
@keyframes gmSweep{
  0%{ transform:translateX(-110%);} 100%{ transform:translateX(210%);}
}
html.theme-gamer header, html.theme-gamer .banner,
html.theme-gamer .lockup{
  position:relative; overflow:hidden;
}
html.theme-gamer header::after, html.theme-gamer .banner::after{
  content:""; position:absolute; top:0; bottom:0; width:34%;
  left:0; pointer-events:none;
  background:linear-gradient(105deg, transparent,
    rgba(255,43,74,.14) 45%, rgba(255,255,255,.10) 50%,
    rgba(255,43,74,.14) 55%, transparent);
  animation:gmSweep 7s linear infinite;
}

/* ---- LastLight frame runs hot ---- */
html.theme-gamer .ll-frame{
  border-color:var(--gm-neon);
  box-shadow:0 0 0 1px rgba(255,43,74,.35),
    0 14px 44px rgba(229,19,60,.35);
}
html.theme-gamer .llp-stage, html.theme-gamer .llv-title{
  color:var(--gm-neon);
}

/* ---- fx layer host ---- */
.gm-fx{
  position:fixed; inset:0; pointer-events:none; z-index:1;
  display:none;
}
html.theme-gamer .gm-fx{ display:block; }
.gm-fx canvas{ width:100%; height:100%; display:block;
  opacity:.55; }
.gm-scan{
  position:absolute; inset:0;
  background:repeating-linear-gradient(0deg,
    rgba(255,255,255,.022) 0 1px, transparent 1px 3px);
  mix-blend-mode:overlay;
}
@keyframes gmPulse{
  0%,100%{ opacity:.32; } 50%{ opacity:.5; }
}
.gm-vign{
  position:absolute; inset:0;
  background:radial-gradient(120% 90% at 50% 55%, transparent 55%,
    rgba(160,8,40,.30) 100%);
  animation:gmPulse 6.5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){
  html.theme-gamer header::after,
  html.theme-gamer .banner::after{ animation:none; display:none; }
  .gm-vign{ animation:none; }
  .gm-fx canvas{ display:none; }
}
