@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  margin: 0;
  /* font-family: Inter, system-ui, sans-serif; */
  font-family: "DM Sans", sans-serif;
  background: #eef2f6;
  padding: 60px 20px;
  color: #1e293b;
}

.tool-wrapper {
  max-width: 1100px;
  margin: auto;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: -1px;
}

.tab {
  padding: 12px 24px;
  font-family: "DM Sans", sans-serif;
  border: none;
  background: #e0e0e0;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  font-weight: 500;
  color: #000000;
}

.tab.active {
  background: white;
  color: #2563eb;
}

.hidden{
display:none;
}

.upload-icon{
font-size:40px;
color:#64748b;
margin-bottom:10px;
}

.editor-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:30px;
}

.editor-header h2{
margin:0;
font-weight:600;
}

.btn-light{
background:#e2e8f0;
}

/* Panel Container */
.panel {
  display: none;
  background: white;
  padding: 40px;
  border-radius: 0 16px 16px 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

.panel.active {
  display: block;
}

/* Upload Box */
.upload-box {
  border: 2px dashed #94a3b8;
  border-radius: 14px;
  padding: 80px 20px;
  text-align: center;
  background: #f8fafc;
  transition: 0.2s;
  cursor: pointer;
}

.upload-box:hover {
  border-color: #2563eb;
  background: #f1f5ff;
}

.upload-box h3 {
  margin: 10px 0;
  font-weight: 500;
}

.upload-info {
  font-size: 14px;
  color: #64748b;
}

.hidden {
  display: none;
}

/* Buttons */
.button-row {
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #000000;
  font-size: 18px;
  font-family: "DM Sans", sans-serif;
}

.btn-primary {
  background: #2563eb;
  color: white;
  padding: 10px 20px;
}

.btn-danger {
  background: #fca5a5;
  color: #7f1d1d;
}

/* Preview */
.preview {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.canvas-box {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.color-picker-label{
  font-size: .875rem;
    color: #2B3445;
    margin-bottom: 5px;
}

canvas {
  max-width: 100%;
  border-radius: 8px;
}

/* Controls */
.controls {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* align-items: start; */
  flex-wrap: wrap;
}

.removeColor {
  height: 35px;
  width: 35px;
  color: #EF4444;
  background-color: rgba(239,68,68,.1);
  border-radius: 100%;
  border: none;
   padding: 0px; 
}

.color-group-wrapper {
  display: flex;
  gap: 15px;
}

.color-row {
  background-color: #f9fafb;
  border: 1px solid #E5E7EB;
  width: 100%;
  display: flex;
  padding: 20px;
  justify-content: space-between;
}

#colorList {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.color-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #dbdbdb;
}

.color-group input[type="color"] {
  width: 36px;
  height: 36px;
  border: none;
  cursor: pointer;
}

#addColorBtn {
  width: fit-content;
}

.color-group input[type="text"] {
  width: 90px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  text-transform: uppercase;
}

input[type="range"] {
  width: 180px;
}

@media (max-width: 600px) {
  #raster-panel,  #svg-panel{
    padding: 25px 10px;
  }
  .editor-header h2 {
    font-size: 20px;
  }
  .btn {
    padding: 10px 12px;
    font-size: 16px;
  }
  .tab {
    font-size: 16px;
  }
  .preview {
    gap: 10px;
    margin-top: 15px;
  }
  .canvas-box h4 {
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
  }
  .color-row {
    padding: 10px;
  }
  .controls {
    flex-wrap: nowrap;
  }
  .color-group {
    padding: 5px;
  }
  .color-group-wrapper {
    gap: 10px;
  }
  .removeColor {
    width: 25px;
    height: 25px;
  }

}