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

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.toolbar {
  background-color: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.tool-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  background-color: #4a90e2;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
  display: inline-block;
}

.btn:hover {
  background-color: #357abd;
}

.btn.active {
  background-color: #2c3e50;
}

#file-input {
  display: none;
}

.color-picker-container,
.brush-size-container,
.zoom-slider-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

input[type="range"] {
  width: 100px;
}

.canvas-container {
  background-color: #ddd;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  height: 70vh;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: grab;
}

.canvas-container:active {
  cursor: grabbing;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  background-color: transparent;
}

#text-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.text-overlay {
  position: absolute;
  min-width: 50px;
  min-height: 20px;
  padding: 5px;
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px dashed #000;
  cursor: move;
  pointer-events: auto;
}

.text-overlay:focus {
  outline: none;
  border: 1px solid #000;
}

.placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #666;
  font-size: 18px;
}

@media (max-width: 768px) {
  .toolbar {
    flex-direction: column;
    gap: 15px;
  }

  .tool-section {
    width: 100%;
    justify-content: center;
  }
}
