/* 🌙 Dark Theme */
body {
  background: #0d112f;
  color: #fff;
  font-family: "Urbanist", sans-serif;
  margin: 0;
}

/* Page wrapper */
.formatter-wrapper {
  max-width: 1100px;
  margin: 100px auto;
  padding: 0 16px;
}

.formatter-wrapper h1 {
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
}

.tool-description {
  font-size: 16px;
  text-align: center;
  color: #b3b9d1;
  margin-bottom: 25px;
}

/* Suggested tools row */
.formatter-tool-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 10px 4px 25px;
  scrollbar-width: none;
}
.formatter-tool-row::-webkit-scrollbar {
  display: none;
}

.formatter-tool-card {
  background: #0b102d;
  padding: 12px 16px;
  min-width: 130px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #1f2947;
  transition: 0.25s;
}
.formatter-tool-card:hover {
  transform: translateY(-5px);
}
.icon-box {
  font-size: 30px;
  margin-bottom: 6px;
}
.icon-box.js {
  color: #f7df1e;
}

/* 🔧 Builder container */
.builder-container {
  background: #0a0f2c;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid #1f2947;
  margin-top: 25px;
  display: grid;
  gap: 20px;
  box-shadow: 0 4px 22px rgba(0,0,0,0.35);
}

/* Labels */
label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #b3b9d1;
  display: inline-block;
}

/* Fields */
select,
input {
  width: 100%;
  padding: 12px;
  background: #11192f;
  border: 1px solid #334155;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
}
select[multiple] {
  height: 140px;
}

/* Conditions section */
.conditions-section {
  border: 1px dashed #334155;
  padding: 14px;
  border-radius: 10px;
}

.condition-row {
  display: grid;
  grid-template-columns: 1fr 1fr 100px 30px;
  gap: 10px;
  margin-bottom: 10px;
}
.condition-row select,
.condition-row input {
  background: #1a2440;
}
.condition-row .remove-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #f43f5e;
  cursor: pointer;
}

/* Output area */
textarea {
  height: 260px;
  background: #11192f;
  border: 1px solid #334155;
  color: #b3c1e8;
  padding: 14px;
  border-radius: 8px;
  resize: vertical;
  font-family: monospace;
  font-size: 14px;
}

/* Buttons */
.btn-tool {
  width: 100%;
  background: #7c3aed;
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: 0.25s;
}
.btn-tool:hover {
  background: #6d28d9;
}
.btn-tool.small {
  padding: 6px 10px;
  font-size: 12px;
}

/* Action button grid */
.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Status text */
.status-msg {
  text-align: center;
  color: #9aa3c5;
  font-size: 14px;
}

/* Error highlight */
.error {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25);
}

/* 📱 Responsive */
@media (max-width: 850px) {
  .builder-container {
    grid-template-columns: 1fr;
  }
  .condition-row {
    grid-template-columns: 1fr 1fr 80px 30px;
  }
  textarea {
    height: 200px;
  }
}
