/* shadow.css — HUD гри «Світло і тінь» (темна тема тіньового театру) */
:root {
  --bg: #10141a;
  --panel: rgba(14, 20, 28, 0.92);
  --panel-solid: #121a24;
  --accent: #ffd23f;
  --accent-2: #4aa3df;
  --text: #eaf2f8;
  --muted: #93a4b5;
  --ok: #6fe0a0;
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); user-select: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.hidden { display: none !important; }

.back-to-hub {
  position: fixed; top: 14px; right: 14px; z-index: 40;
  background: var(--panel); color: var(--text); text-decoration: none;
  padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); font-size: 14px;
}
.back-to-hub:hover { background: var(--panel-solid); }

.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.crosshair {
  position: fixed; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border: 2px solid rgba(255,255,255,0.9); border-radius: 50%; box-shadow: 0 0 4px rgba(0,0,0,0.7);
}

/* Чекліст завдань */
.hud-tasks {
  position: fixed; top: 16px; left: 16px;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 10px 14px; max-width: 320px; font-size: 13px;
}
.tasks-head { font-size: 14px; margin-bottom: 6px; }
.tasks-head b { color: var(--accent); }
.hud-tasks ul { list-style: none; margin: 0; padding: 0; }
.hud-tasks li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; color: var(--muted); line-height: 1.35; }
.hud-tasks li.done { color: var(--text); }
.hud-tasks .chk {
  flex-shrink: 0; width: 17px; height: 17px; border-radius: 50%; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; background: rgba(255,255,255,0.09); color: var(--muted);
}
.hud-tasks li.done .chk { background: var(--ok); color: #05271a; }

/* Вимірювач тіні */
.hud-meter {
  position: fixed; bottom: 20px; left: 20px;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 10px 14px; font-size: 14px; line-height: 1.55;
}
.hud-meter b { color: var(--accent); }
.hud-meter .dim { color: var(--muted); font-size: 12px; }

/* Підказка */
.hud-prompt {
  position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%);
  background: var(--panel); padding: 12px 20px; border-radius: 12px; text-align: center;
  border: 1px solid rgba(255,255,255,0.1); max-width: 82vw; font-size: 15px; line-height: 1.5;
}
.key {
  display: inline-block; min-width: 20px; padding: 2px 8px; margin: 0 2px;
  background: #223247; border: 1px solid #35506e; border-bottom-width: 2px; border-radius: 6px;
  font-size: 13px; font-weight: 700; color: #dbe9f7;
}

/* Картка пояснення */
.card {
  position: fixed; top: 78px; left: 50%; transform: translateX(-50%);
  width: min(520px, 92vw); background: var(--panel); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; z-index: 12; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,0.6);
  pointer-events: none;
}
.card-head { padding: 14px 18px; background: rgba(255, 210, 63, 0.14); }
.card-head.new { background: linear-gradient(90deg, rgba(255,210,63,0.22), rgba(74,163,223,0.1)); }
.card-title { font-size: 19px; font-weight: 700; }
.card-body { padding: 14px 18px; }
.explain { line-height: 1.55; margin: 0; }

/* Системне сповіщення */
.hud-note {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border-left: 3px solid var(--accent);
  padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 14;
}

/* Меню */
.overlay {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(900px 500px at 50% 20%, rgba(255,210,63,0.08), transparent), linear-gradient(180deg, #0c1016, #10141a);
}
.menu-box {
  width: min(560px, 92vw); background: var(--panel-solid); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 30px 34px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.menu-box h1 { margin: 0 0 6px; font-size: 28px; }
.subtitle { color: var(--accent); margin: 0 0 16px; font-weight: 600; }
.lead { color: var(--muted); line-height: 1.6; margin: 0 0 20px; }
.controls {
  list-style: none; margin: 0 auto 22px; padding: 16px; text-align: left;
  background: rgba(0,0,0,0.3); border-radius: 12px; display: grid; grid-template-columns: 1fr;
  gap: 8px; font-size: 14px; color: var(--muted);
}
.controls li { display: flex; align-items: center; gap: 8px; }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), #ff9d3f); color: #241a02; border: none;
  padding: 14px 28px; font-size: 16px; font-weight: 800; border-radius: 12px; cursor: pointer;
  transition: transform .15s, filter .15s;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }

body.touch .hud-meter { bottom: 170px; }
