/* ===========================================================================
   REAL APEX BOT — SHARED SKIN  (Fortnite battle-royale arena)
   OWNER: LANE D.  Lanes E (app.html) and F IMPORT this file read-only.
   Token names are FROZEN — they are the contract in docs/SKIN_TOKENS.md.
   Page-specific rules DO NOT belong here; put them in login.css / app.css /
   each lane's own stylesheet. Everything here is shared vocabulary: tokens, panels,
   buttons, chips, offline notes, focus + motion baseline.
   No external fonts, no CDN, no build step. Plain static CSS.
   =========================================================================== */

:root {
  /* --- arena backdrop ---------------------------------------------------- */
  --apex-bg:          #150d3c;   /* base */
  --apex-bg-2:        #3b1d86;   /* gradient stop */

  /* --- angular panels ---------------------------------------------------- */
  --apex-panel:       rgba(26, 19, 72, 0.86);
  --apex-panel-edge:  #6f5cff;

  /* --- accents ----------------------------------------------------------- */
  --apex-blue:        #2f7dff;
  --apex-purple:      #b45cff;
  --apex-yellow:      #ffd426;   /* punchy primary control */
  --apex-cyan:        #34e8ff;   /* secondary accent */

  /* --- text -------------------------------------------------------------- */
  --apex-text:        #f5f3ff;
  --apex-text-dim:    #b7b0e6;

  /* --- state ------------------------------------------------------------- */
  --apex-ok:          #34e6a8;
  --apex-warn:        #ffb020;
  --apex-danger:      #ff5d78;
  --apex-offline:     #948dc0;   /* explicitly "offline" panels */

  /* --- type -------------------------------------------------------------- */
  --font-display: "Bahnschrift", "Arial Narrow", "Liberation Sans Narrow",
                  "Roboto Condensed", "Oswald", "Helvetica Neue Condensed",
                  "Helvetica Neue", Impact, system-ui, sans-serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto,
                  "Helvetica Neue", Arial, sans-serif;

  /* --- geometry ---------------------------------------------------------- */
  --panel-clip: polygon(
      0 18px, 18px 0,
      100% 0, 100% calc(100% - 18px),
      calc(100% - 18px) 100%, 0 100%);
  --radius: 6px;
  --shadow: 0 18px 44px rgba(5, 2, 26, 0.55), 0 0 0 1px rgba(111, 92, 255, 0.28);
}

/* ===========================================================================
   BASE
   =========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--apex-text);
  background: var(--apex-bg);
  overflow-x: hidden;             /* no horizontal scroll at phone width */
}

h1, h2, h3, h4, .apex-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.98;
  margin: 0 0 0.4em;
}

a { color: var(--apex-cyan); }

img, svg { max-width: 100%; }

/* Visually hidden but readable by assistive tech. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* Always-visible focus. Never remove this. */
:focus-visible {
  outline: 3px solid var(--apex-cyan);
  outline-offset: 3px;
}

/* ===========================================================================
   ANGULAR PANELS  (shared)
   .apex-panel                 base angular panel
   .apex-panel--blue/--purple  accent edge
   .apex-panel--offline        explicit "offline / no live source" state
   .apex-panel__head           panel header strip
   =========================================================================== */
.apex-panel {
  position: relative;
  clip-path: var(--panel-clip);
  /* The element background IS the edge stroke; ::before inset 2px is the fill. */
  background: linear-gradient(140deg, var(--apex-panel-edge), var(--apex-blue) 45%, var(--apex-purple));
  box-shadow: var(--shadow);
  padding: 1.15rem 1.15rem 1.25rem;
}

.apex-panel::before {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: var(--panel-clip);
  background:
    linear-gradient(160deg, rgba(111, 92, 255, 0.22), rgba(0, 0, 0, 0) 58%),
    var(--apex-panel);
}

/* The fill layer is a positioned pseudo-element, so real content must also be
   positioned to paint above it. Applies to every lane using .apex-panel. */
.apex-panel > * { position: relative; }

.apex-panel--blue   { background: linear-gradient(140deg, var(--apex-blue), var(--apex-cyan)); }
.apex-panel--purple { background: linear-gradient(140deg, var(--apex-purple), var(--apex-blue)); }
.apex-panel--offline{ background: linear-gradient(140deg, var(--apex-offline), #4a4470); }
.apex-panel--offline        { color: var(--apex-offline); }

.apex-panel__head {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  color: var(--apex-cyan);
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.apex-panel__head::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--apex-panel-edge), transparent);
}

/* ===========================================================================
   BUTTONS  (shared)
   .apex-btn                  angular base
   .apex-btn--primary         punchy yellow control
   .apex-btn--ghost           outlined
   .apex-btn--danger          destructive
   .apex-btn--key             keypad / square control
   =========================================================================== */
.apex-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.4rem;
  border: 2px solid var(--apex-panel-edge);
  border-radius: var(--radius);
  background: rgba(47, 125, 255, 0.16);
  color: var(--apex-text);
  cursor: pointer;
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: transform 120ms ease, filter 120ms ease, background-color 120ms ease;
  touch-action: manipulation;
}
.apex-btn:hover:not(:disabled)  { filter: brightness(1.15); }
.apex-btn:active:not(:disabled) { transform: translateY(2px) scale(0.985); }
.apex-btn:disabled              { opacity: 0.45; cursor: not-allowed; }

.apex-btn--primary {
  background: linear-gradient(180deg, #ffe97a, var(--apex-yellow));
  border-color: #fff3a8;
  color: #1a1030;
  box-shadow: 0 6px 0 #b98f00, 0 14px 28px rgba(255, 212, 38, 0.28);
}
.apex-btn--primary:active:not(:disabled) { box-shadow: 0 2px 0 #b98f00; }

.apex-btn--ghost {
  background: transparent;
  border-color: rgba(183, 176, 230, 0.5);
  color: var(--apex-text-dim);
}
.apex-btn--ghost:hover:not(:disabled) { color: var(--apex-text); border-color: var(--apex-cyan); }

.apex-btn--danger {
  background: rgba(255, 93, 120, 0.16);
  border-color: var(--apex-danger);
  color: #ffd9e0;
}

.apex-btn--key {
  padding: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
  min-height: 3.2rem;
}

/* ===========================================================================
   CHIPS + OFFLINE NOTE  (shared)
   =========================================================================== */
.apex-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(183, 176, 230, 0.4);
  color: var(--apex-text-dim);
  background: rgba(10, 6, 34, 0.55);
}
.apex-chip--live    { color: var(--apex-ok);      border-color: rgba(52, 230, 168, 0.55); }
.apex-chip--offline { color: var(--apex-offline); border-color: rgba(148, 141, 192, 0.5); }
.apex-chip--warn    { color: var(--apex-warn);    border-color: rgba(255, 176, 32, 0.55); }

/* Standard "no live source" copy block. Shared so every lane renders the
   offline state identically. Never style a fabricated value with this. */
.apex-offline-note {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--apex-offline);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.apex-offline-note::before {
  content: "";
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: var(--apex-offline);
  box-shadow: 0 0 0 4px rgba(148, 141, 192, 0.18);
}

/* ===========================================================================
   MOTION BASELINE — every lane inherits this.
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
