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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
}

h1 {
  color: #2c3e50;
  font-size: 2.5em;
  margin-bottom: 10px;
}

h1 img {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 8px;
}

p {
  color: #7f8c8d;
  font-size: 1.1em;
  margin-bottom: 40px;
}

.drop-zone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 30px;
  /* margin-bottom: 40px; */
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.drop-zone {
  position: relative;
  width: 200px;
  height: 200px;
  border: 3px dashed #bdc3c7;
  border-radius: 12px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-zone:hover {
  border-color: #3498db;
  background: #ebf3fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.2);
}

.drop-zone.drag-over {
  border-color: #27ae60;
  background: #d5f4e6;
  border-style: solid;
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(39, 174, 96, 0.3);
}

.drop-zone.has-image {
  border-color: #27ae60;
  border-style: solid;
  background: #ffffff;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #7f8c8d;
  font-weight: 500;
  pointer-events: none;
}

.drop-zone-hint {
  font-size: 0.9em;
  margin-top: 8px;
  color: #95a5a6;
}

.preview-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: none;
}

.merged-preview {
  margin: 40px 0;
}

.merged-preview h3 {
  color: #2c3e50;
  font-size: 1.4em;
  margin-bottom: 20px;
  font-weight: 400;
}

#mergedCanvas {
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  max-width: 100%;
  height: auto;
}

.controls {
  margin: 30px 0;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

#resetBtn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  box-shadow: 0 4px 12px rgba(238, 90, 82, 0.3);
}

#resetBtn:hover {
  box-shadow: 0 6px 18px rgba(238, 90, 82, 0.4);
}

.status {
  margin-top: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  min-height: 20px;
}

.status.success {
  background: #d5f4e6;
  color: #27ae60;
  border: 1px solid #2ecc71;
}

.status.error {
  background: #ffeaa7;
  color: #d63031;
  border: 1px solid #e17055;
}

.status.info {
  background: #dbeafe;
  color: #2563eb;
  border: 1px solid #60a5fa;
}

@media (max-width: 768px) {
  .container {
      padding: 20px;
      margin: 10px;
  }

  .drop-zone-grid {
      max-width: 300px;
  }

  .drop-zone {
      width: 140px;
      height: 140px;
  }

  h1 {
      font-size: 2em;
  }

  .controls {
      flex-direction: column;
      align-items: center;
  }

  button {
      width: 200px;
  }
}

@media (max-width: 480px) {
  .drop-zone-grid {
      max-width: 250px;
      gap: 10px;
  }

  .drop-zone {
      width: 115px;
      height: 115px;
  }

  .drop-zone-content span:first-child {
      font-size: 0.9em;
  }

  .drop-zone-hint {
      font-size: 0.8em;
  }
}
