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

html, body {
  /* E-ink inspired colors - warm grayish paper */
  background: #d4d4d0;
  overflow: auto;
  font-family: monospace;
  /* Prevent pull-to-refresh and overscroll on mobile */
  overscroll-behavior: none;
  /* Prevent text selection while drawing */
  user-select: none;
  -webkit-user-select: none;
  /* Prevent touch callout on iOS */
  -webkit-touch-callout: none;
  margin: 0;
  padding: 0;
}

#canvas {
  /* E-ink paper - warm off-white with subtle texture */
  background:
    /* Paper grain noise */
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.01) 2px, rgba(0,0,0,.01) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,.01) 2px, rgba(0,0,0,.01) 4px),
    /* Base paper color */
    #faf8f3;
  display: block;
  cursor: crosshair;
  /* Crisp pixel rendering like e-ink */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  /* Allow touch actions - we'll handle them in JS based on mode */
  touch-action: pan-x pan-y;
  /* High contrast filter for e-ink effect */
  filter: contrast(1.15) brightness(1.05);
}

#status {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 4px;
  font-size: 14px;
}

#controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  flex-direction: row;
}

.control-btn {
  width: 50px;
  height: 50px;
  padding: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.control-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.control-btn:active {
  background: rgba(0, 0, 0, 1);
}

.control-btn.active {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}
