html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #ffffff;
  transition: background-color 300ms ease;
}

button {
  padding: 20px 40px;
  font-size: 16px;
}

button:hover {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

#button, #lnm-button, #shop-button, #vex-button {
  pointer-events: auto;
}

#item-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

#void-screen {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at top, rgba(118, 158, 255, 0.18), transparent 35%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1), transparent 18%),
    radial-gradient(circle at 80% 30%, rgba(138, 255, 219, 0.12), transparent 20%),
    radial-gradient(circle at center, #22273f 0%, #090912 58%, #000000 100%);
  color: #f1f1ff;
  text-align: center;
  z-index: 20;
}

.void-shell {
  width: min(980px, 100%);
  max-height: min(92vh, 860px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid rgba(191, 215, 255, 0.24);
  border-radius: 28px;
  background: rgba(10, 14, 24, 0.78);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.void-kicker {
  margin: 0 0 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: #9ab1ff;
}

#void-screen h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 64px);
}

#void-description,
#void-objective {
  max-width: 680px;
  margin: 12px auto 0;
  color: #d6dcf7;
}

.void-progress {
  display: inline-flex;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #eff3ff;
}

.void-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.void-card,
.void-core-card {
  padding: 20px;
  border: 1px solid rgba(191, 215, 255, 0.18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  text-align: left;
}

.void-card h2,
.void-core-card h2 {
  margin: 0 0 10px;
}

.void-card p,
.void-core-card p {
  margin: 0;
  color: #d6dcf7;
}

.void-runes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.void-rune,
#void-shoot-button,
#void-offer-button,
#void-finish-button,
.void-exit {
  width: 100%;
  padding: 14px 18px;
  margin-top: 16px;
  border: 1px solid rgba(191, 215, 255, 0.24);
  border-radius: 16px;
  background: rgba(17, 22, 37, 0.96);
  color: #f5f7ff;
}

.void-rune:hover,
#void-shoot-button:hover,
#void-offer-button:hover,
#void-finish-button:hover,
.void-exit:hover {
  background: rgba(31, 39, 66, 0.98);
}

.void-status {
  min-height: 24px;
  margin-top: 14px !important;
  font-weight: 700;
  color: #95f3d3 !important;
}

.void-core-card {
  margin-top: 20px;
}

#void-finish-button:disabled {
  opacity: 0.45;
}

.void-exit {
  max-width: 280px;
  margin: 22px auto 0;
  display: block;
}

body.game-finished {
  background: linear-gradient(180deg, #fdf7d6 0%, #f3e7a5 100%);
}

body.game-finished #text {
  border-color: #8a6c11;
  background: rgba(255, 249, 218, 0.85);
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  transition: transform 1.5s ease-in-out;
}

.btn-container.shift-left {
  transform: translateX(-25vw);
}

.lnm-container {
  display: none;
  transform: translateX(100vw);
}

.lnm-container.shift-right {
  transform: translateX(25vw);
}

#lnm-button {
  border: 4px solid #440000;
  border-radius: 10px;
  background-color: #a50606;
}

#text {
  border: 1px solid black;
  padding: 10px;
  font-size: 20px;
  margin: 10px;
}

#clicks, #vex {
  font-size: 18px;
  margin: 10px;
}

.hidden {
  display: none !important;
}

.side-panel {
  position: fixed;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
}

.side-panel.left {
  left: 24px;
}

.side-panel.right {
  right: 24px;
}

.shop-panel {
  position: fixed;
  top: 50%;
  right: 24px;
  width: 360px;
  padding: 18px;
  border: 2px solid #111111;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(48px, -50%);
  transition: transform 250ms ease, opacity 250ms ease;
  z-index: 5;
}

.shop-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-32vw, -50%);
}

.shop-panel h2 {
  margin: 0 0 8px;
}

.shop-panel p {
  margin: 0 0 14px;
}

.shop-controls {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: stretch;
  gap: 12px;
}

.shop-controls > button {
  width: 52px;
  padding: 0;
  border-radius: 12px;
}

.shop-item-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 190px;
  padding: 14px;
  border: 1px solid #cfcfcf;
  border-radius: 14px;
  text-align: center;
  background: #f7f7f7;
}

#shop-item-name {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

#shop-item-description {
  min-height: 48px;
  color: #505050;
}

#shop-item-cost {
  font-weight: 700;
}

#shop-item-button {
  width: 100%;
  margin-top: auto;
}

.item {
  position: fixed;
  width: 88px;
  height: 88px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #111111;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  cursor: grab;
  transform-origin: center center;
}

.item.dragging {
  cursor: grabbing;
  z-index: 8;
}

.item.static-item {
  cursor: default;
}

.item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  pointer-events: none;
}

.item[data-item-id="door"] {
  width: 124px;
  height: 164px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.item[data-item-id="door"] img {
  width: 124px;
  height: 164px;
}

.item.door-locked img {
  filter: saturate(0.75) brightness(0.9);
}

.item.door-unlocked img {
  filter: drop-shadow(0 0 10px rgba(120, 200, 255, 0.55));
}

.bullet {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #111111;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transform: translate(0, 0);
  transition: transform 450ms linear;
  z-index: 7;
}

.bullet.flying {
  transform: translate(var(--bullet-dx, 100vw), var(--bullet-dy, 0));
}

body.exploding {
  animation: explosion-shake 90ms infinite;
}

@keyframes explosion-shake {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  20% {
    transform: translate(-18px, 14px) rotate(-2deg) scale(1.02);
  }
  40% {
    transform: translate(20px, -16px) rotate(2deg) scale(0.99);
  }
  60% {
    transform: translate(-24px, -10px) rotate(-3deg) scale(1.03);
  }
  80% {
    transform: translate(22px, 18px) rotate(3deg) scale(0.98);
  }
  100% {
    transform: translate(-12px, -20px) rotate(-1deg) scale(1.01);
  }
}
