/* ===== Voxelcraft 3D — fixed "sunny voxel" theme, fullscreen =====
   No center chrome (no c-bar / c-app / gc-back top bar). The canvas fills the
   viewport and every control floats above it as a compact game HUD. This page
   deliberately ignores light/dark mode; colours match the 3D sky + block art. */
:root {
  --vc-sky:      #74b7e6;
  --vc-panel:    rgba(24, 20, 14, .74);
  --vc-panel-2:  rgba(40, 32, 20, .62);
  --vc-line:     rgba(255, 226, 160, .34);
  --vc-text:     #fff6e6;
  --vc-muted:    #d9c7a6;
  --vc-grass:    #6fb84a;
  --vc-wood:     #8a5f38;
  --vc-gold:     #ffcf5c;
  --vc-danger:   #ff6b6b;
  --vc-on-accent:#241826;
}

html, body { height: 100%; }
body.vc-body {
  margin: 0;
  overflow: hidden;
  background: var(--vc-sky);
  color: var(--vc-text);
  font-family: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body.vc-body *, body.vc-body *::before, body.vc-body *::after { box-sizing: border-box; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }

/* ---------- Crosshair ---------- */
.vc-cross { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.vc-cross[hidden] { display: none; }
.vc-cross::before, .vc-cross::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
  mix-blend-mode: difference;
}
.vc-cross::before { width: 18px; height: 2px; transform: translate(-50%, -50%); }
.vc-cross::after  { width: 2px; height: 18px; transform: translate(-50%, -50%); }

/* ---------- Floating HUD ---------- */
.vc-hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; font-weight: 700; }
.vc-hud[hidden] { display: none; }

.vc-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 12px 14px; pointer-events: none;
}
.vc-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.vc-chip {
  pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--vc-panel); border: 2px solid var(--vc-line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
  font-size: 15px; color: var(--vc-text); line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.vc-chip i { font-style: normal; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--vc-muted); }
.vc-chip b { font-variant-numeric: tabular-nums; }
.vc-chip--mode b { color: var(--vc-gold); }
.vc-chip--kill  { border-color: var(--vc-danger); }
.vc-chip--kill  b { color: #ffd0d0; }
.vc-chip--tool  { border-color: var(--vc-sky); }
.vc-chip--tool  b { color: #cdeaff; }

.vc-btn {
  pointer-events: auto; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 14px; letter-spacing: .02em;
  color: var(--vc-text); background: var(--vc-panel);
  border: 2px solid var(--vc-line); border-bottom-width: 4px; border-radius: 12px;
  padding: 9px 18px; box-shadow: 0 3px 0 rgba(0, 0, 0, .28);
  transition: transform .06s ease, background .15s ease;
}
.vc-btn:hover { background: var(--vc-panel-2); }
.vc-btn:active { transform: translateY(2px); border-bottom-width: 2px; }

.vc-card kbd {
  display: inline-block; min-width: 16px; padding: 1px 6px; margin: 0 1px;
  font: 700 12px/1.5 ui-monospace, "Segoe UI", monospace; text-align: center;
  color: var(--vc-gold); background: rgba(0, 0, 0, .28);
  border: 1px solid var(--vc-line); border-radius: 6px;
}

/* ---------- Hotbar ---------- */
.vc-hotbar {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 7px; pointer-events: none;
  background: var(--vc-panel); border: 2px solid var(--vc-line); border-radius: 14px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .28);
}
.vc-slot {
  pointer-events: auto; position: relative; cursor: pointer;
  width: 46px; height: 46px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .22); border: 2px solid rgba(255, 255, 255, .1);
  border-radius: 10px; transition: transform .06s ease, border-color .12s ease, background .12s ease;
}
.vc-slot svg { width: 34px; height: 34px; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.vc-slot span {
  position: absolute; right: 4px; bottom: 2px;
  font-size: 10px; font-weight: 800; color: rgba(255, 255, 255, .6);
}
.vc-slot:hover { background: rgba(0, 0, 0, .34); }
.vc-slot--on {
  border-color: var(--vc-gold); background: rgba(255, 207, 92, .18);
  box-shadow: 0 0 12px rgba(255, 207, 92, .4); transform: translateY(-3px);
}
@media (max-width: 560px) {
  .vc-slot { width: 40px; height: 40px; }
  .vc-slot svg { width: 28px; height: 28px; }
}

/* ---------- Full-screen menu / error overlays ---------- */
.vc-screen {
  position: fixed; inset: 0; z-index: 40;
  display: flex; padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: radial-gradient(120% 90% at 50% 10%, rgba(30, 50, 80, .5), rgba(8, 12, 22, .72));
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.vc-screen[hidden] { display: none; }
.vc-card {
  position: relative; z-index: 1; margin: auto;
  width: min(92vw, 460px);
  padding: 26px 28px 22px; text-align: center;
  background: linear-gradient(160deg, #241a10, #141824);
  border: 2px solid var(--vc-line); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .1);
  color: var(--vc-text);
}
.vc-card__crest { line-height: 0; }
.vc-card__crest svg { filter: drop-shadow(0 0 10px rgba(111, 184, 74, .35)); }
.vc-card__title {
  margin: 6px 0 4px; font-size: 30px; font-weight: 800; letter-spacing: .02em;
  color: var(--vc-grass); text-shadow: 0 2px 0 #2f5a22, 0 0 18px rgba(111, 184, 74, .4);
}
.vc-card__over { margin: 4px 0; font-size: 24px; font-weight: 800; color: var(--vc-danger); }
.vc-card__lead { margin: 8px 0 4px; font-size: 14.5px; line-height: 1.6; color: var(--vc-muted); }
.vc-card__list { margin: 12px 0 6px; padding: 0 0 0 2px; list-style: none; text-align: left; }
.vc-card__list li { margin: 8px 0; font-size: 13.5px; line-height: 1.55; color: var(--vc-text); }
.vc-card__list b { color: var(--vc-gold); }
.vc-card__row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.vc-cta {
  pointer-events: auto; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 800; font-size: 15px;
  padding: 11px 22px; border: 0; border-bottom: 4px solid rgba(0, 0, 0, .4);
  border-radius: 13px;
  background: linear-gradient(140deg, #8fd05e, var(--vc-grass)); color: var(--vc-on-accent);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .3);
  transition: transform .06s ease, filter .15s ease;
}
.vc-cta:hover { filter: brightness(1.06); }
.vc-cta:active { transform: translateY(2px); border-bottom-width: 2px; }
.vc-cta--ghost { background: var(--vc-panel-2); color: var(--vc-text); border: 2px solid var(--vc-line); border-bottom-width: 4px; }
.vc-backlink {
  display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700;
  color: var(--vc-muted); text-decoration: none;
}
.vc-backlink:hover { color: var(--vc-gold); }

/* ---------- Damage vignette ---------- */
.vc-hurt {
  position: fixed; inset: 0; z-index: 9; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 90% at 50% 55%, rgba(255, 40, 40, 0) 46%, rgba(170, 10, 20, .6) 100%);
  transition: opacity .28s ease;
}
.vc-hurt--on { opacity: 1; transition: opacity .05s ease; }

/* ---------- "Click to look around" prompt (only while mouse is released) ---------- */
.vc-lockprompt {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
  z-index: 12; pointer-events: none;
  padding: 12px 22px; border-radius: 14px;
  background: var(--vc-panel); border: 2px solid var(--vc-line);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .4);
  font-size: 17px; font-weight: 800; color: var(--vc-text); letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.vc-lockprompt[hidden] { display: none; }

/* ---------- Transient toast (needs-a-tool, crafted, etc.) ---------- */
.vc-toast {
  position: fixed; left: 50%; top: 20%; transform: translate(-50%, -6px);
  z-index: 13; pointer-events: none;
  padding: 9px 18px; border-radius: 12px;
  background: var(--vc-panel); border: 2px solid var(--vc-gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  font-size: 15px; font-weight: 800; color: var(--vc-gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  opacity: 0; transition: opacity .18s ease, transform .18s ease;
}
.vc-toast--on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Bottom-left survival cluster (hearts + toolbelt) ---------- */
.vc-beltwrap {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.vc-hearts { display: flex; gap: 2px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.vc-heart { width: 22px; height: 22px; display: inline-block; }
.vc-heart svg { width: 22px; height: 22px; display: block; }
.vc-heart path { fill: #2a1c22; stroke: #100a0e; stroke-width: 1.4; }
.vc-heart--full path { fill: #ff4a5e; stroke: #7a1526; }

.vc-toolbelt {
  display: flex; gap: 6px; padding: 6px; pointer-events: none;
  background: var(--vc-panel); border: 2px solid var(--vc-line); border-radius: 12px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28);
}
.vc-tool {
  pointer-events: auto; position: relative; cursor: pointer;
  width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .22); border: 2px solid rgba(255, 255, 255, .1);
  border-radius: 9px; transition: transform .06s ease, border-color .12s ease, background .12s ease;
}
.vc-tool svg { width: 30px; height: 30px; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.vc-tool:hover { background: rgba(0, 0, 0, .34); }
.vc-tool--on {
  border-color: var(--vc-gold); background: rgba(255, 207, 92, .18);
  box-shadow: 0 0 11px rgba(255, 207, 92, .4); transform: translateY(-2px);
}
.vc-tool--lock { opacity: .5; }
.vc-tool__lock {
  display: none; position: absolute; right: 1px; bottom: 1px;
  width: 15px; height: 15px; pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .7));
}
.vc-tool__lock svg { width: 15px; height: 15px; }
.vc-tool--lock .vc-tool__lock { display: inline-flex; }

/* ---------- Crafting button + crafting card ---------- */
.vc-btn--craft { border-color: var(--vc-sky); color: #cdeaff; }
.vc-card--craft { text-align: left; }
.vc-card__craft {
  margin: 0 0 6px; font-size: 24px; font-weight: 800; text-align: center;
  color: var(--vc-gold); text-shadow: 0 2px 0 #6a4a12, 0 0 16px rgba(255, 207, 92, .3);
}
.vc-card__resources {
  margin: 0 0 12px; text-align: center; font-size: 13px; color: var(--vc-muted);
  display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center;
}
.vc-card__resources b { color: var(--vc-text); font-variant-numeric: tabular-nums; }
.vc-recipes { display: flex; flex-direction: column; gap: 8px; }
.vc-recipe {
  pointer-events: auto; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .26); border: 2px solid rgba(255, 255, 255, .08);
  color: var(--vc-text); font: inherit; transition: border-color .12s ease, background .12s ease, opacity .12s ease;
}
.vc-recipe svg { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.vc-recipe__txt { flex: 1; min-width: 0; }
.vc-recipe__name { display: block; font-size: 15px; font-weight: 800; }
.vc-recipe__cost { display: block; font-size: 12px; color: var(--vc-muted); margin-top: 2px; }
.vc-recipe__cost .have { color: #9fe3a0; }
.vc-recipe__cost .lack { color: var(--vc-danger); }
.vc-recipe__go { flex: none; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--vc-muted); }
.vc-recipe--can { border-color: var(--vc-gold); background: rgba(255, 207, 92, .14); }
.vc-recipe--can .vc-recipe__go { color: var(--vc-gold); }
.vc-recipe--done { opacity: .55; cursor: default; }
.vc-recipe--done .vc-recipe__go { color: var(--vc-sky); }

@media (prefers-reduced-motion: reduce) {
  .vc-btn, .vc-slot, .vc-cta { transition: none; }
}
