:root {
  --bg: #080c14;
  --bg2: #0d1321;
  --panel: #121a2e;
  --accent: #e43f5a;
  --gold: #ffd700;
  --green: #00e676;
  --blue: #40c4ff;
  --text: #f5f5f5;
  --text2: #90a4ae;
  --border: #1e2d4a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #root { width: 100%; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  user-select: none;
}

.font-display { font-family: 'Lilita One', cursive; }

.game-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(180deg, #141c2e 0%, #0d1321 100%);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-shrink: 0;
  z-index: 10;
  flex-wrap: wrap;
}

.canvas-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.canvas-wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.help-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 19, 33, 0.85);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12px;
  color: #556080;
  pointer-events: none;
  white-space: nowrap;
}

.tool-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 19, 33, 0.9);
  border: 1px solid var(--gold);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--gold);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px;
  background: #060a12;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: #3a5070;
  flex-shrink: 0;
}

.separator {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

/* Tool button */
.tool-btn {
  background: linear-gradient(180deg, #1e2d4a 0%, #141c2e 100%);
  border: 2px solid #2a4070;
  color: var(--text);
  cursor: pointer;
  transition: all 0.12s ease;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  white-space: nowrap;
}
.tool-btn:hover {
  border-color: #4a7aba;
  background: linear-gradient(180deg, #2a3f5f 0%, #1e2d44 100%);
}
.tool-btn.selected {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
  background: linear-gradient(180deg, #2a3a1a 0%, #1a2a0e 100%);
}
.tool-btn.delete-active {
  border-color: #e43f5a !important;
  box-shadow: 0 0 12px rgba(228, 63, 90, 0.4) !important;
}

.upgrade-btn {
  background: linear-gradient(180deg, #1a3a1a 0%, #0e2a0e 100%);
  border: 1.5px solid #3a7a3a;
  color: var(--green);
  cursor: pointer;
  transition: all 0.12s ease;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}
.upgrade-btn:hover:not(:disabled) {
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.25);
}
.upgrade-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .top-bar { padding: 6px 8px; gap: 6px; }
  .tool-btn { padding: 6px 8px !important; font-size: 12px; }
}