/* ===========================
   CINTEIA TOOLS — GLOBAL CSS
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg:        #080808;
  --bg2:       #111111;
  --surface:   rgba(255,255,255,0.04);
  --border:    rgba(255,255,255,0.08);
  --border-h:  rgba(255,255,255,0.16);
  --text:      #f0f0f0;
  --muted:     #666;
  --muted2:    #444;
  --accent:    #ffffff;
  --accent-dim: rgba(255,255,255,0.12);
  --green:     #22c55e;
  --yellow:    #eab308;
  --red:       #ef4444;
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* --- NOISE TEXTURE OVERLAY --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 { font-family: 'Syne', sans-serif; letter-spacing: -0.02em; }

/* --- INPUTS --- */
input, select, textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-h);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

input::placeholder { color: var(--muted); }

select option { background: #1a1a1a; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: #000;
  width: 100%;
}
.btn-primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,255,255,0.12);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--accent-dim);
  border-color: var(--border-h);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  flex-shrink: 0;
}

/* --- CARD --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* --- LABEL --- */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

/* --- RESULT BOX --- */
.result-box {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.7;
  display: none;
  animation: fadeUp 0.3s ease;
}
.result-box.show { display: block; }
.result-box.good  { border-color: rgba(34,197,94,0.3);  background: rgba(34,197,94,0.05); }
.result-box.warn  { border-color: rgba(234,179,8,0.3);  background: rgba(234,179,8,0.05); }
.result-box.bad   { border-color: rgba(239,68,68,0.3);  background: rgba(239,68,68,0.05); }

.result-stat {
  font-family: 'Syne', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 12px 0 8px;
}

/* --- BACK LINK --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--text); }

/* --- LOGO BADGE --- */
.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo-badge .c {
  width: 28px;
  height: 28px;
  background: white;
  color: black;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

/* --- CTA STRIP --- */
.cta-strip {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-strip a {
  color: var(--text);
  font-weight: 600;
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity var(--transition);
}
.cta-strip a:hover { opacity: 0.7; }

/* --- LOADING STATE --- */
.loading { opacity: 0.5; pointer-events: none; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

/* --- ANIMATIONS --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- FIELD GROUP --- */
.field { margin-bottom: 20px; }
.field:last-of-type { margin-bottom: 0; }

/* --- DIVIDER --- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* --- COPY BTN (dentro de resultado) --- */
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.copy-btn:hover { border-color: var(--border-h); color: var(--text); }
