* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans', sans-serif;
  background: #000;
  overflow: hidden;
  touch-action: none;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 800px;
  max-height: 600px;
  background: #f5f5f0;
  border: 3px solid #333;
  border-radius: 8px;
}

#ui {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none;
}

#stats {
  display: flex;
  justify-content: space-around;
  padding: 12px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid #333;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
}

.stat .label {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

.stat span:last-child {
  font-weight: bold;
  font-size: 24px;
  color: #333;
}

#bottom-ui {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none;
}

#actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.5);
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.1s;
  min-width: 70px;
}

.action-btn:active {
  transform: scale(0.95);
  background: #f0f0f0;
}

.action-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-btn.disabled:active {
  transform: none;
}

.action-btn .icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.action-btn .name {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 2px;
}

.action-btn .cost {
  font-size: 10px;
  color: #666;
}

.action-btn {
  position: relative;
}

.action-btn .tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  margin-bottom: 5px;
  z-index: 100;
}

.action-btn:hover .tooltip {
  opacity: 1;
}

.action-btn .tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}