* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #dbeafe);
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

h1 {
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 2.2rem;
  text-align: center;
}

.mandala-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.mandala-gallery img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border: 3px solid #bbb;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s;
}

.mandala-gallery img:hover {
  transform: scale(1.1);
  border-color: #4f46e5;
}

#canvasContainer {
  flex-grow: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  border: 3px solid #999;
  background-color: white;
  touch-action: none;
  max-width: 95%;
  max-height: 80vh;
  border-radius: 8px;
}

.controls {
  margin-top: 15px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.controls input[type="color"] {
  width: 50px;
  height: 50px;
  border: none;
  padding: 0;
  cursor: pointer;
}

button {
  padding: 12px 20px;
  border: none;
  background: #4f46e5;
  color: white;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: #4338ca;
  transform: translateY(-2px);
}
