@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --purple-50: #EEEDFE;
  --purple-100: #CECBF6;
  --purple-500: #6C5FE6;
  --purple-600: #534AB7;
  --purple-800: #3C3489;
  --teal-400: #1D9E75;
  --teal-500: #0F6E56;
  --coral-400: #D85A30;
  --gray-50: #F8F7F5;
  --gray-100: #F1EFE8;
  --gray-200: #D3D1C7;
  --gray-700: #444441;
  --gray-900: #2C2C2A;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 60px;
  color: #fff;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: center;
  margin-bottom: 4px;
  background: linear-gradient(90deg, #a78bfa, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-align: center;
  margin-bottom: 28px;
}

.canvas-wrapper {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

canvas {
  display: block;
  width: 320px;
  height: 320px;
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
}

.upload-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.upload-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

input[type="file"] {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

input[type="file"]:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.3);
}

input[type="file"]::file-selector-button {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--purple-500);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 5px 12px;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
  background: var(--purple-600);
}

.filters-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 14px;
  text-align: center;
}

.btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin-bottom: 10px;
}

.btn-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

input[type="button"] {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

input[type="button"]:hover {
  transform: translateY(-2px);
  opacity: 0.92;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

input[type="button"]:active {
  transform: translateY(0);
  opacity: 1;
  box-shadow: none;
}

#red {
  background: linear-gradient(135deg, #ff4e50, #c0392b);
}

#green {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

#blue {
  background: linear-gradient(135deg, #2980b9, #6dd5fa);
}

#rainbow {
  background: linear-gradient(135deg, #f7971e, #ffd200, #21d4fd, #b721ff);
}

#clear {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  text-shadow: none;
}

#clear:hover {
  background: rgba(255,255,255,0.18);
}

#blur {
  background: linear-gradient(135deg, #bdc3c7, #8e9eab);
  color: #fff;
}

#grey {
  background: linear-gradient(135deg, #636e72, #2d3436);
}

#reset {
  background: linear-gradient(135deg, #6C5FE6, #a78bfa);
}
