/* base.css — shared variables, reset, body, common components */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --teal: #14B8A6;
  --teal-dark: #0D9488;
  --bg: #F9FAFB;
  --text: #1F2937;
  --muted: #6B7280;
  --border: #E5E7EB;
  --danger: #DC2626;
  --warn: #F59E0B;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Slate aliases used by tool/translate/index pages */
  --slate-900: #0F172A;
  --slate-700: #334155;
  --slate-500: #64748B;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  /* teal-dark alias */
  --teal-hover: #0F766E;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: white;
}
footer a { color: var(--teal-dark); text-decoration: none; }

/* Shared spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Shared privacy note */
.privacy-note {
  margin-top: 24px;
  padding: 12px;
  background: var(--slate-100);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Shared error/result boxes */
.result {
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}
.result a {
  display: inline-block;
  background: #16A34A;
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  margin-top: 8px;
  font-weight: 600;
}
.error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: white;
  margin-bottom: 16px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--teal);
  background: #F0FDFA;
}
.upload-zone input { display: none; }
.upload-zone p { margin: 0 0 4px; font-size: 15px; color: var(--slate-700); }
.upload-zone .hint { font-size: 13px; color: var(--muted); }

/* File item */
.file-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 8px;
}

/* Primary button */
.primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #14B8A6, #0F766E);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  margin-bottom: 8px;
  font-family: var(--font);
}
.primary:disabled { opacity: 0.5; cursor: not-allowed; }
.primary:not(:disabled):hover { opacity: 0.9; }

/* Toast */
.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  display: none;
  z-index: 1000;
  max-width: 360px;
}
.toast.success { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.toast.error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.toast.show { display: block; }

/* Modal overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-overlay .modal {
  background: white;
  border-radius: 16px;
  padding: 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
}
.modal-overlay .modal h3 { margin: 0 0 10px; font-size: 20px; }
.modal-overlay .modal p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.modal-btns { display: flex; gap: 10px; justify-content: center; }
.modal-btns a { padding: 10px 22px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; text-decoration: none; }
.btn-upgrade { background: linear-gradient(135deg, #14B8A6, #0F766E); color: white; }
.btn-cancel { background: var(--slate-100); color: var(--text); }

/* Badge */
.badge {
  display: inline-block;
  background: linear-gradient(135deg, #14B8A6, #0F766E);
  color: white;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Thanks widget */
.thanks-widget {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 24px 0 0;
  text-align: center;
  color: white;
  display: none;
}
.thanks-widget h3 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.thanks-widget p { font-size: 0.95rem; margin: 0 0 1rem; opacity: 0.95; }
.thanks-amounts { display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 1rem; }
.thanks-btn {
  background: white;
  color: #F59E0B;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}
.thanks-btn:hover { transform: translateY(-2px); }
.thanks-custom { display: flex; gap: 0.5rem; justify-content: center; align-items: center; }
.thanks-custom input {
  width: 100px;
  padding: 0.5rem;
  border: 2px solid white;
  border-radius: 6px;
  text-align: center;
  background: white;
}
.thanks-skip { margin-top: 0.75rem; font-size: 0.85rem; opacity: 0.8; cursor: pointer; text-decoration: underline; }

/* Content sections */
.content-section { max-width: 720px; margin: 48px auto 0; padding: 40px 24px 0; border-top: 1px solid var(--border); }
.content-section h2 { font-size: 19px; font-weight: 700; color: var(--slate-900); margin: 0 0 14px; }
.content-section p { color: var(--slate-700); line-height: 1.75; font-size: 15px; margin: 0 0 12px; }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: white; }
.faq-q { padding: 14px 16px; font-weight: 600; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q:hover { background: var(--slate-50); border-radius: var(--radius-sm); }
.faq-toggle { color: var(--teal); font-size: 20px; line-height: 1; flex-shrink: 0; }
.faq-a { padding: 0 16px 14px; color: var(--slate-700); font-size: 14px; line-height: 1.7; display: none; }
.faq-a.open { display: block; }

/* Steps list */
.steps-list { list-style: none; padding: 0; margin: 0; }
.steps-list li { display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start; font-size: 15px; color: var(--slate-700); line-height: 1.6; }
.step-num { background: var(--teal); color: white; border-radius: 50%; min-width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; margin-top: 1px; }

@media (max-width: 480px) {
  .thanks-amounts { flex-wrap: wrap; }
}
