.shadowcrypt-stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at top, #2a1b45 0%, #140f22 40%, #09070f 100%);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  user-select: none;
  touch-action: manipulation;
}

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

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

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

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

.shadowcrypt-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,.04), rgba(255,255,255,0)),
    linear-gradient(180deg, #1b1830 0%, #0f1020 100%);
  box-shadow: 0 18px 40px rgba(0,0,0,.26);
}

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

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

.shadowcrypt-cell.floor {
  background: linear-gradient(180deg, #2c2941, #1a1729);
}

.shadowcrypt-cell.wall {
  background: linear-gradient(180deg, #4b5563, #1f2937);
}

.shadowcrypt-cell.exit {
  background:
    radial-gradient(circle, rgba(192,132,252,.35), transparent 65%),
    linear-gradient(180deg, #312e81, #1e1b4b);
  outline: 2px solid rgba(196,181,253,.55);
  outline-offset: -2px;
}

.shadowcrypt-cell.treasure {
  outline: 3px solid #facc15;
  outline-offset: -3px;
}

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

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

.shadowcrypt-enemy,
.shadowcrypt-loot,
.shadowcrypt-altar {
  font-size: 28px;
}

.shadowcrypt-fx {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
}

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

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

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

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

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

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

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

.shadowcrypt-overlay-card button {
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
}

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

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

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

.shadowcrypt-btn.secondary {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
}
