.wildcraft-stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, #7dd3fc 0%, #dbeafe 28%, #86efac 28%, #4d7c0f 100%);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  user-select: none;
  touch-action: manipulation;
}

.wildcraft-stage * {
  box-sizing: border-box;
}

.wildcraft-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
}

.wildcraft-bank {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wildcraft-chip {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(6px);
}

.wildcraft-world {
  position: absolute;
  top: 58px;
  left: 50%;
  bottom: 98px;
  transform: translateX(-50%);
  width: min(96vw, 560px);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)),
    linear-gradient(180deg, #6ee7b7, #4d7c0f);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.wildcraft-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 2px;
  padding: 4px;
}

.wildcraft-cell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.wildcraft-cell.grass {
  background: linear-gradient(180deg, #86efac, #4d7c0f);
}

.wildcraft-cell.tree {
  background:
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.15)),
    linear-gradient(180deg, #65a30d, #3f6212);
}

.wildcraft-cell.rock {
  background: linear-gradient(180deg, #9ca3af, #4b5563);
}

.wildcraft-cell.water {
  background: linear-gradient(180deg, #60a5fa, #1d4ed8);
}

.wildcraft-cell.base {
  outline: 3px solid #facc15;
  outline-offset: -3px;
}

.wildcraft-entity {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

.wildcraft-player {
  font-size: 34px;
  z-index: 16;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.18));
}

.wildcraft-enemy,
.wildcraft-item,
.wildcraft-wall,
.wildcraft-fire {
  font-size: 28px;
}

.wildcraft-floating {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 800;
  color: #fde68a;
  text-shadow: 0 2px 6px rgba(0,0,0,.4);
  pointer-events: none;
  z-index: 24;
}

.wildcraft-log {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 106px;
  z-index: 42;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .68);
  backdrop-filter: blur(6px);
  font-size: 13px;
}

.wildcraft-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .28);
  text-align: center;
}

.wildcraft-overlay.hidden {
  display: none;
}

.wildcraft-overlay-card {
  width: min(92vw, 360px);
  padding: 22px 20px;
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  color: #1f2937;
  box-shadow: 0 18px 40px rgba(0,0,0,.16);
}

.wildcraft-overlay-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.wildcraft-overlay-card p {
  margin: 0 0 14px;
}

.wildcraft-overlay-card button {
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #16a34a, #166534);
}

.wildcraft-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.wildcraft-btn {
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: rgba(30, 41, 59, .92);
}

.wildcraft-btn.primary {
  background: linear-gradient(180deg, #22c55e, #15803d);
}

.wildcraft-btn.secondary {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}
