body {
  background: linear-gradient(to bottom right, #f0f0f0, #e0e0e0);
  font-family: 'Helvetica Neue', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center vertically */
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 800px;
  padding: 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 700px;        /* <-- Minimum height */
  max-height: 100vh;        /* <-- Never bigger than viewport */
  overflow: auto;           /* <-- Scroll inside if needed */
  box-sizing: border-box;
}

h1 {
  font-weight: 700;
  margin-bottom: 20px;
}

.canvas-wrapper {
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 20px;
}

canvas {
  width: 100%;
  max-width: 512px;
  height: auto;
  background: #fff;
  cursor: move;
  touch-action: none;
}

.controls {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

input[type="file"] {
  display: none;
}

button, input[type="file"] {
  touch-action: manipulation; /* prevent double-tap zoom on buttons and file input */
}

.custom-file-upload, button {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* space between icon and text */
  padding: 12px 24px;
  cursor: pointer;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.custom-file-upload:hover, button:hover {
  background-color: #333;
}

.custom-file-upload svg, button svg {
  fill: white;
}