:root {
  --bg: #F1F2FB;
  --text: #1A2B48;
  --muted: #5b6b7c;
  --primary: #115982;
  --card: #ffffff;
  --soft-shadow: rgba(0,0,0,0.06);
  --border: #cfd8e6;
  --danger: #D93025;
  --danger-bg: #FFF4F3;
  --danger-border: #FFDAD6;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  padding: 30px;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

/* Header */
.header { text-align: center; margin-bottom: 20px; }
.header h1 { font-size: 38px; font-weight: 800; margin: 0 0 6px; }
.header p { font-size: 16px; color: var(--muted); }

/* ✅ FIXED SETTINGS PILL BAR */
.setting-bar {
  background: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  border: 1px solid #dfe5ef;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;

  /* ✅ FIX: limit width and center */
  width: auto;
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.setting-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.setting-title { font-weight: 800; }

/* Divider (optional visual separator) */
.setting-divider {
  width: 1px;
  height: 26px;
  background: #e3e3e3;
}

/* Tool card */
.card {
  background: var(--card);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 28px var(--soft-shadow);
  border: 1px solid #edf1f7;
  display: flex;
  justify-content: center;
  gap: 35px;
  flex-wrap: wrap;
}

.input-wrap, .output-wrap { flex: 1; min-width: 48%; }

label { font-size: 16px; font-weight: 700; margin-bottom: 8px; display: block; }

textarea {
  width: 100%;
  height: 320px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.6;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  resize: vertical;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(17,89,130,.12);
}

/* Error UI */
.error-box {
  margin-top: 10px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}
textarea.has-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(217,48,37,.10) !important;
}

/* Buttons */
.bottom-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 14px;
}
.action-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
}
.clear-btn { background: #E04545 !important; }

/* Content */
.content { margin-top: 26px; }
.content h2 { font-size: 26px; margin: 22px 0 10px; font-weight: 800; }
.content p { font-size: 16px; margin-bottom: 10px; color: var(--text); }
.info-box {
  background:#f7f9ff;
  border:1px solid #e2e8f5;
  padding:12px 14px;
  border-radius:10px;
  margin-top:10px;
}

.steps { padding-left:18px; }
.steps li { margin: 6px 0; }

.features, .use-cases { list-style:none; padding:0; margin:0; }
.features li, .use-cases li {
  padding: 10px 12px;
  border: 1px solid #e9eef7;
  background: #fbfcff;
  border-radius: 10px;
  margin-bottom: 8px;
}

/* FAQ */
.faq details {
  border:1px solid #e9eef7;
  background:#fbfcff;
  padding:12px 14px;
  border-radius:10px;
  margin-bottom:10px;
}
.faq summary { font-weight:800; cursor:pointer; }

/* Footer */
.site-footer {
  text-align:center;
  padding:15px 0;
  font-size:14px;
  color:var(--muted);
  margin-top:40px;
}
.site-footer a {
  color:var(--primary);
  font-weight:800;
  text-decoration:none;
}

/* Responsive */
@media (max-width: 900px) {
  .input-wrap, .output-wrap { min-width: 100%; }
  textarea { height: 260px; }
  .header h1 { font-size: 32px; }
  .setting-bar { border-radius: 18px; max-width: 100%; padding: 12px; }
}
