/* water.css — HUD 3D-гри «Плаває чи тоне?» */
:root {
  --bg: #dce8f2;
  --panel: rgba(16, 26, 38, 0.92);
  --panel-solid: #131f2e;
  --accent: #33c2b0;
  --accent-2: #4aa3df;
  --text: #eaf2f8;
  --muted: #9fb2c2;
  --ok: #6fe0a0;
  --no: #ff8a8a;
  --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-counter {
  position: fixed; top: 16px; left: 16px; background: var(--panel);
  padding: 8px 14px; border-radius: 10px; font-size: 14px; border: 1px solid rgba(255,255,255,0.08);
}
.hud-counter b { color: var(--accent); }

.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;
}
.hud-prompt .dim { color: var(--muted); font-size: 13px; }

.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;
}

.hud-held {
  position: fixed; bottom: 20px; left: 20px; background: var(--panel);
  padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); font-size: 14px;
}

/* Картка результату */
.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.5);
}
.card-head { padding: 14px 18px; display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.05); }
.card-head.new { background: linear-gradient(90deg, rgba(111,224,160,0.28), rgba(51,194,176,0.12)); }
.card-head.neutral { background: linear-gradient(90deg, rgba(255,138,138,0.2), rgba(255,138,138,0.05)); }
.card-title { font-size: 20px; font-weight: 700; }
.badge { font-weight: 700; font-size: 12px; padding: 4px 11px; border-radius: 20px; }
.badge.ok { background: var(--ok); color: #062617; }
.badge.no { background: var(--no); color: #2a0808; }
.card-body { padding: 16px 18px; }
.explain { line-height: 1.5; margin: 0 0 10px; }
.why { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 10px; }

/* Меню / пауза */
.overlay {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% 15%, rgba(74,163,223,0.18), transparent), linear-gradient(180deg, #b9d3e6, #dce8f2);
}
.menu-box {
  width: min(560px, 92vw); background: var(--panel); 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.4);
}
.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.25); border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px 18px; font-size: 14px; color: var(--muted);
}
.controls li { display: flex; align-items: center; gap: 8px; }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #04201c; 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); }

@media (max-width: 560px) { .controls { grid-template-columns: 1fr; } }
