/* ============================================================
   ESTILOS DEL TRADUCTOR ESPAÑOL – WICHÍ
   ============================================================ */

:root {
  --bg:           #faf7f2;
  --surface:      #ffffff;
  --border:       #ece3d6;
  --border-strong:#d9c9ae;
  --text:         #241c14;
  --text-2:       #6e6253;
  --text-hint:    #a89d8a;
  --accent:       #b5530c;
  --accent-light: #fbe9d8;
  --accent-mid:   #e2a567;
  --accent-dark:  #7a3a08;
  --success:      #1a6b3d;
  --radius:       10px;
  --radius-sm:    6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #18130d;
    --surface:      #221b13;
    --border:       #342a1d;
    --border-strong:#52432d;
    --text:         #f3ece1;
    --text-2:       #b3a691;
    --text-hint:    #6b6050;
    --accent:       #e8954f;
    --accent-light: #2e2113;
    --accent-mid:   #b5752f;
    --accent-dark:  #f6c896;
    --success:      #5dcaa5;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 16px;
}

/* ---- Header ---- */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-mark {
  width: 42px;
  height: 42px;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
header h1 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
header p {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

/* ---- Main ---- */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* ---- Selector de idioma ---- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}
.lang-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: all .15s;
}
.lang-btn.active {
  background: var(--accent-light);
  border-color: var(--accent-mid);
  color: var(--accent-dark);
}
.lang-btn:hover:not(.active) {
  background: var(--bg);
}
.swap-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  font-family: inherit;
  transition: background .15s;
}
.swap-btn:hover { background: var(--bg); }

/* ---- Ejemplos ---- */
.examples-label {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 6px;
}
.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}
.ex-pill {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.ex-pill:hover {
  border-color: var(--accent-mid);
  color: var(--accent-dark);
  background: var(--accent-light);
}

/* ---- Paneles ---- */
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 560px) {
  .panels { grid-template-columns: 1fr; }
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.panel-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  min-height: 110px;
  line-height: 1.65;
}
textarea::placeholder { color: var(--text-hint); }

.result-box {
  min-height: 110px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
}
.result-placeholder {
  color: var(--text-hint);
  font-style: italic;
}

/* ---- Loading ---- */
.loading {
  color: var(--text-2);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Botones ---- */
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
button:hover { background: var(--bg); }
button:active { transform: scale(.98); }
button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
button.primary {
  background: var(--accent-light);
  border-color: var(--accent-mid);
  color: var(--accent-dark);
  font-weight: 500;
}
button.primary:hover {
  background: var(--accent-mid);
  color: #fff;
}

/* ---- Nota ---- */
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-mid);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.note strong { color: var(--text); }

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 12px;
  color: var(--text-hint);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
