* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', sans-serif;
  background: #f0f0f0;
  height: 100vh;
  overflow: hidden;
}
.app {
  display: flex;
  height: 100vh;
}
.toolbar {
  width: 160px;
  min-width: 160px;
  height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 12px;
  box-shadow: 2px 0 12px rgba(0,0,0,0.08);
  overflow-y: auto;
  z-index: 10;
}
.tool-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tool {
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease;
}
.tool:hover {
  background: #f5f5f5;
  transform: scale(1.03);
}
.tool:active {
  transform: scale(0.97);
}
.tool.active {
  background: #e8f0fe;
  border-color: #4285f4;
  color: #1a73e8;
}
input[type="color"] {
  width: 100%;
  height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
input[type="range"] {
  width: 100%;
  cursor: pointer;
}
button:not(.tool) {
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease;
}

button:not(.tool):hover {
  background: #f5f5f5;
  transform: scale(1.03);
}
.canvas-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f0f0f0;
  height: 100vh;
  overflow: hidden;
}
canvas {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  cursor: crosshair;
  display: block;
}
 

#eraserCursor {
  display: none;
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  border: 2px solid #4285f4;
  background: rgba(66, 133, 244, 0.08);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
  transform: translate(0, 0);
  z-index: 9999;
  transition: width 0.05s, height 0.05s;
}

[data-theme="dark"] body,
[data-theme="dark"] {
  background: #1a1a1a;
}
[data-theme="dark"] .canvas-container {
  background: #1a1a1a;
}
[data-theme="dark"] .toolbar {
  background: #2a2a2a;
  box-shadow: 2px 0 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .tool {
  background: #2a2a2a;
  border-color: #444;
  color: #eee;
}
[data-theme="dark"] .tool:hover {
  background: #333;
}
[data-theme="dark"] .tool.active {
  background: #1a3a6e;
  border-color: #4285f4;
  color: #7baaf7;
}
[data-theme="dark"] button:not(.tool) {
  background: #2a2a2a;
  border-color: #444;
  color: #eee;
}
[data-theme="dark"] button:not(.tool):hover {
  background: #333;
}
[data-theme="dark"] canvas {
  background: #111;
}
[data-theme="dark"] label {
  color: #aaa;
}
[data-theme="dark"] #eraserCursor {
  border-color: #7baaf7;
  background: rgba(123, 170, 247, 0.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}
.tool svg, button:not(.tool) svg {
  width: 18px;
  height: 18px;
  stroke: #333;
}

[data-theme="dark"] .tool svg,
[data-theme="dark"] button:not(.tool) svg {
  stroke: #eee;
}

[data-theme="dark"] .tool.active svg {
  stroke: #7baaf7;
}
