* {
  box-sizing: border-box;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}

body {
  margin: 0;
  padding: 0;
  background-color: #1a1a1a;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 800px;
  max-height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  background: #2b2b2b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  width: 100%;
  height: 100%;
  object-fit: contain;
  touch-action: none;
}

#ui {
  position: absolute;
  top: 16px;
  left: 16px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#stage-text {
  font-size: 22px;
  font-weight: 900;
  color: #f1c40f;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#msg {
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* インクゲージ UI */
#ink-bar-container {
  width: 160px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

#ink-bar {
  width: 100%;
  height: 100%;
  background-color: #3498db;
  transition: width 0.1s ease-out;
}

#controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

button {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s, background-color 0.2s;
}

button:active {
  transform: scale(0.95);
}

#start-btn {
  background-color: #2ed573;
}

#start-btn:hover {
  background-color: #26af5f;
}

#reset-btn {
  background-color: #ff4757;
}

#reset-btn:hover {
  background-color: #e03d4f;
}