/* Shared look for the Laya demo pages: Acurast colours (Hub dark theme), pixel details. */
@import url('https://fonts.googleapis.com/css2?family=Saira:wght@400;600;800&family=Silkscreen:wght@400;700&display=swap');

:root {
  --bg: #0f0f0f;
  --panel: #181818;
  --panel-2: #222;
  --border: #4a4a4a;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --lime: #c0e700;
  --lime-dark: #6e8902;
  --purple: #8b3dff;
  --pixel: 'Silkscreen', ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 'Saira', system-ui, sans-serif; margin: 0; padding: 0 16px 24px; }
a { color: var(--lime); }
h1, h2, h3, h4 { font-family: var(--pixel); font-weight: 700; letter-spacing: 0.5px; margin: 0 0 12px; color: var(--text); }
h3 { font-size: 16px; }
label { display: block; font-size: 13px; color: var(--muted); }
summary { font-family: var(--pixel); font-size: 12px; color: var(--lime); cursor: pointer; margin: 8px 0; }
input, select, textarea { font: inherit; color: var(--text); width: 100%; margin: 4px 0 10px; padding: 7px 8px;
  background: var(--panel); border: 2px solid var(--border); border-radius: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); }
input[type=range] { padding: 0; accent-color: var(--lime); border: none; }
textarea { resize: vertical; }
code { font-family: ui-monospace, monospace; color: var(--lime); }

/* Pixel buttons: hard shadow, press-down on click. */
button { font: 12px var(--pixel); text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 14px; cursor: pointer;
  background: var(--lime); color: #0f0f0f; border: 2px solid #0f0f0f; border-radius: 0; box-shadow: 3px 3px 0 var(--lime-dark); }
button:hover { background: #d4ff1a; }
button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--lime-dark); }
button:disabled { opacity: 0.45; cursor: default; transform: none; }

.wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.side { flex: 1; min-width: 280px; max-width: 440px; }
.log { white-space: pre-wrap; line-height: 1.5; margin-top: 12px; font: 13px/1.55 ui-monospace, monospace; color: #ddd; }
.muted { color: var(--muted); }

/* Header injected by laya.js on every page. */
.acu-header { display: flex; align-items: center; gap: 12px; padding: 14px 0; margin-bottom: 18px; border-bottom: 2px solid var(--panel-2); }
.acu-header a.home { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.acu-header .logo-link { display: block; padding-right: 12px; border-right: 2px solid var(--panel-2); }
.acu-header .logo { height: 30px; display: block; }
.acu-header .share { font-size: 11px; padding: 7px 10px; background: #000; color: #fff; border: 2px solid var(--border); box-shadow: 3px 3px 0 #000; }
.acu-header .share:hover { background: #000; border-color: var(--lime); color: var(--lime); }
.acu-header .brand { font: 700 16px var(--pixel); letter-spacing: 1px; }
.acu-header .brand b { color: var(--lime); }
.acu-header .tag { font-size: 12px; color: var(--muted); }
.acu-header .spacer { flex: 1; }
.acu-header .all { font: 11px var(--pixel); text-decoration: none; border: 2px solid var(--border); padding: 6px 10px; }
.acu-header .all:hover { border-color: var(--lime); }
.acu-header .dot { width: 8px; height: 8px; background: var(--lime); display: inline-block; margin-right: 6px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* Pulse fired on every Laya answer: add .flash to any element (restart via reflow). */
.flash { animation: flash-glow 0.6s ease-out; }
@keyframes flash-glow { from { box-shadow: 0 0 0 6px var(--lime), 0 0 40px var(--lime); } to { box-shadow: 0 0 0 0 transparent; } }

/* Gear + settings dialog (from laya.js). */
.acu-header .gear { font: 20px/1 system-ui, sans-serif; padding: 6px 10px; background: var(--panel); color: var(--text);
  border: 2px solid var(--border); box-shadow: 3px 3px 0 #000; text-transform: none; }
.acu-header .gear:hover { border-color: var(--lime); color: var(--lime); background: var(--panel); }
.acu-settings { width: min(460px, calc(100vw - 32px)); background: var(--panel); color: var(--text); border: 2px solid var(--lime);
  box-shadow: 6px 6px 0 var(--lime-dark); padding: 18px; margin: 70px 16px auto auto; }
.acu-settings::backdrop { background: rgba(0, 0, 0, 0.6); }
.acu-settings .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.acu-settings .spacer { flex: 1; }
.acu-settings [data-status] { font-size: 12px; }

/* Which phone answers: header badge + toast after each answer (laya.js). */
.acu-header .acu-phone { font-size: 11px; line-height: 1.35; text-align: right; color: var(--muted); padding: 4px 10px; border-right: 2px solid var(--panel-2); }
.acu-header .acu-phone .where { font: 12px var(--pixel); color: var(--text); }
.acu-header .acu-phone b { color: var(--lime); }
.acu-toast { position: fixed; right: 16px; bottom: 16px; z-index: 50; max-width: calc(100vw - 32px); background: var(--panel); color: var(--text);
  border: 2px solid var(--lime); box-shadow: 4px 4px 0 var(--lime-dark); padding: 8px 12px; font-size: 13px; animation: toast-in 0.25s ease-out; }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 700px) { .acu-header { flex-wrap: wrap; } .acu-header .acu-phone { text-align: left; border: none; padding-left: 0; } }

/* Footer with the call to action (laya.js). */
.acu-footer { margin-top: 48px; padding-top: 20px; border-top: 2px solid var(--panel-2); max-width: 1100px; }
.acu-footer .cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 16px; background: var(--panel); border: 2px solid var(--lime); box-shadow: 4px 4px 0 var(--lime-dark); }
a.button { display: inline-block; font: 12px var(--pixel); text-transform: uppercase; text-decoration: none; padding: 10px 16px;
  background: var(--lime); color: #0f0f0f; border: 2px solid #0f0f0f; box-shadow: 3px 3px 0 var(--lime-dark); }
a.button:hover { background: #d4ff1a; }
.acu-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 8px; font: 11px var(--pixel); }
.acu-footer nav a { text-decoration: none; }
.acu-footer .credit { font-size: 12px; }

/* Embedded (?embed=1): slim brand strip, no header/footer. */
body.embed { padding-top: 8px; }
.acu-embed { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font: 11px var(--pixel); color: var(--muted); text-decoration: none; }
.acu-embed img { height: 18px; }

/* Share-result button used by several demos. */
.share-result { margin-top: 10px; background: #000; color: #fff; border-color: var(--border); box-shadow: 3px 3px 0 #000; }
.share-result:hover { background: #000; color: var(--lime); border-color: var(--lime); }

/* ---------------------------------------------------------------- mobile */
@media (max-width: 700px) {
  body { padding: 0 12px 20px; font-size: 15px; }
  input, select, textarea { font-size: 16px; }              /* stops iOS zooming into fields */
  button, a.button { min-height: 40px; }
  .acu-header { gap: 8px; padding: 10px 0; margin-bottom: 12px; }
  .acu-header .logo { height: 22px; }
  .acu-header .logo-link { padding-right: 8px; }
  .acu-header .brand { font-size: 13px; }
  .acu-header .tag { display: none; }
  .acu-header .spacer { display: none; }
  .acu-header .all span, .acu-header .share span { display: none; }
  .acu-header .all { padding: 8px 10px; }
  .acu-header .acu-phone { order: 10; flex-basis: 100%; }
  .wrap { gap: 16px; }
  .side { min-width: 0; max-width: none; flex-basis: 100%; }
  canvas { max-width: 100%; height: auto; }
  .acu-toast { left: 12px; right: 12px; bottom: 12px; font-size: 12px; }
  .acu-settings { margin: 60px auto auto; }
  .acu-footer .cta { flex-direction: column; align-items: flex-start; }
}
