body {
  background: #0d112f;
  color: #fff;
  font-family: "Urbanist", sans-serif;
  margin: 0;
}

/* Wrapper */
.formatter-wrapper {
  max-width: 1150px;
  margin: 100px auto;
  padding: 0 16px;
}

.formatter-wrapper h1 {
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
}

.tool-description {
  text-align: center;
  font-size: 16px;
  color: #b3b9d1;
  margin-bottom: 25px;
}

/* Suggested tools */
.formatter-tool-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 4px 24px;
  scrollbar-width: none;
}
.formatter-tool-row::-webkit-scrollbar { display: none; }

.formatter-tool-card {
  min-width: 220px;
  background: radial-gradient(circle at top, #1f2145 0, #050814 70%);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(124, 58, 237, 0.42);
  text-align: left;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.7), 0 26px 55px rgba(0,0,0,0.8);
  transition: 0.3s ease;
}
.formatter-tool-card:hover {
  transform: translateY(-8px);
  border-color: #9c4bff;
  box-shadow: 0 38px 85px rgba(0,0,0,0.92);
}

.icon-box { font-size: 32px; margin-bottom: 8px; }
.icon-box.primary { color: #38bdf8; }
.icon-box.secondary { color: #22c55e; }
.icon-box.accent { color: #a855f7; }

.formatter-tool-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}
.card-desc {
  font-size: 12px;
  color: #9aa3c5;
  margin-bottom: 12px;
}

/* Layout */
.decoder-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 22px;
}

.left-panel,
.right-panel {
  background: #0a0f2c;
  border-radius: 14px;
  border: 1px solid #1f2947;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Fields */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: #b3b9d1;
}

textarea,
input[type="text"],
input[type="password"] {
  background: #11192f;
  border-radius: 8px;
  border: 1px solid #334155;
  padding: 10px;
  font-size: 14px;
  color: #e5e7ff;
  resize: vertical;
  min-height: 80px;
}

input[type="checkbox"] {
  accent-color: #7c3aed;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cbd5f5;
}

/* Upload box */
.upload-box {
  border-radius: 14px;
  border: 2px dashed #334155;
  padding: 16px;
  cursor: pointer;
  transition: 0.25s;
}
.upload-box:hover {
  background: rgba(15,23,42,0.9);
}
.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.upload-inner ion-icon {
  font-size: 32px;
  opacity: 0.85;
}
.upload-inner p {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}
#fileInput { display: none; }

/* Tabs */
.tab-row {
  background: #020617;
  padding: 6px;
  border-radius: 12px;
  display: flex;
  gap: 8px;
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
  color: #9aa3c5;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}
.tab.active {
  background: #1f2947;
  color: #fff;
}

/* Certificate cards */
.cert-card {
  background: #020617;
  border-radius: 12px;
  border: 1px solid #1f2937;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cert-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.cert-field-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.cert-field-row .label { color: #94a3b8; }
.cert-field-row .value { color: #e5e7ff; text-align: right; }

/* Multi area */
.multi {
  background: #11192f;
  border-radius: 8px;
  border: 1px solid #1f2937;
  padding: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #d3d9ff;
  white-space: pre-wrap;
  line-height: 1.45;
}

/* Raw JSON */
.raw-json {
  background: #11192f;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #1f2937;
  font-size: 12px;
  color: #38bdf8;
  overflow: auto;
  min-height: 350px;
}

/* Saved */
.saved-wrapper {
  background: #020617;
  border-radius: 12px;
  border: 1px solid #1f2937;
  padding: 10px;
  margin-top: 10px;
}

.saved-empty {
  font-size: 12px;
  color: #9ca3c5;
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.saved-card {
  background: #020617;
  border-radius: 10px;
  border: 1px solid #111827;
  padding: 8px;
  font-size: 12px;
}

/* Buttons */
.btn-tool {
  background: #7c3aed;
  padding: 9px 10px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: 0.25s;
  text-align: center;
}
.btn-tool:hover { background: #6d28d9; }
.btn-tool.primary { background: #22c55e; }
.btn-tool.primary:hover { background: #16a34a; }
.btn-tool.danger { background: #f73d5d; }
.btn-tool.danger:hover { background: #dc2626; }
.btn-tool.small { padding: 6px 8px; font-size: 12px; }

/* Button row */
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Status */
.status-msg {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: #9aa3c5;
}

/* Mask Sensitive */
.blur-sensitive .sensitive {
  filter: blur(4px);
  pointer-events: none;
}

/* Responsive */
@media (max-width: 900px) {
  .decoder-grid {
    grid-template-columns: 1fr;
  }
  .btn-row {
    grid-template-columns: 1fr;
  }
}
