/* ============================================================
   AI HUMANIZER — STYLESHEET
   Theme: Toolslice.com — white, indigo accent, Plus Jakarta Sans
   Layout: Tool-first — visible above the fold immediately
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #ffffff;
  --hero-bg:     linear-gradient(135deg, #eef2ff 0%, #f5f3ff 60%, #eff6ff 100%);
  --surface:     #ffffff;
  --surface2:    #f8faff;
  --surface3:    #f1f5f9;
  --border:      #e2e8f0;
  --border2:     #cbd5e1;
  --accent:      #4f46e5;
  --accent-dim:  rgba(79,70,229,.08);
  --accent-hover:#4338ca;
  --logo-grad:   linear-gradient(135deg, #f97316 0%, #ec4899 50%, #8b5cf6 100%);
  --text:        #1e1b4b;
  --text2:       #475569;
  --muted:       #94a3b8;
  --danger:      #ef4444;
  --warn:        #f59e0b;
  --success:     #10b981;
  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(79,70,229,.07);
  --shadow-md:   0 4px 24px rgba(79,70,229,.14);
  --font:        'Plus Jakarta Sans', sans-serif;
  --transition:  .2s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::after { display: none; }
.bg-glow    { display: none; }

/* ══════════════════════════════════════════════════════════
   HEADER — slim, sticky
══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 54px;
  display: flex; align-items: center; gap: 12px;
}
.site-logo {
  font-family: var(--font);
  font-size: 1.25rem; font-weight: 800;
  background: var(--logo-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -.5px;
}
.site-logo .accent {
  background: var(--logo-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-tag {
  font-size: 12px; font-weight: 600; color: var(--muted);
  border-left: 1px solid var(--border); padding-left: 12px;
}
.badge {
  margin-left: auto;
  background: var(--accent-dim); border: 1px solid rgba(79,70,229,.2);
  color: var(--accent); font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: .5px; text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
   PAGE HERO — compact, lives ABOVE the tool card
   Shrunk to a tight banner, not a full hero section
══════════════════════════════════════════════════════════ */
.hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.hero-left { display: flex; flex-direction: column; gap: 6px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(79,70,229,.2);
  background: rgba(79,70,229,.06);
  padding: 3px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  color: var(--accent); letter-spacing: .5px; text-transform: uppercase;
  width: fit-content;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%,100%{ opacity:1; transform:scale(1) }
  50%{ opacity:.3; transform:scale(.7) }
}

/* h1 is now a one-liner, not a giant block */
.hero h1 {
  font-family: var(--font);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -.6px;
  color: var(--text);
  margin: 0;
}
.hero h1 .lime { color: var(--accent); }
.hero h1 .dim  { color: var(--muted); }

.hero-sub {
  color: var(--text2); font-size: 13px; font-weight: 400;
  max-width: 480px; line-height: 1.5; margin: 0;
  display: none; /* hidden on load — saves vertical space */
}

/* Detector pills — horizontal strip on the right */
.detector-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.det-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border: 1px solid var(--border);
  padding: 4px 11px; border-radius: 20px;
  font-size: 11.5px; color: var(--text2); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  white-space: nowrap;
}
.det-pill::before {
  content: '✓'; color: var(--success); font-size: 9px; font-weight: 800;
}

/* ══════════════════════════════════════════════════════════
   MAIN CONTAINER
══════════════════════════════════════════════════════════ */
.container {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 20px 60px;
}

/* ══════════════════════════════════════════════════════════
   AD SLOT
══════════════════════════════════════════════════════════ */
.ad-slot {
  background: var(--surface2);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  min-height: 70px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px;
  margin-bottom: 14px; padding: 12px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   SCORE STRIP — compact inline row INSIDE tool area
══════════════════════════════════════════════════════════ */
.score-strip {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  gap: 10px; align-items: center;
  margin-bottom: 12px;
}
.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px;
}
.score-card-left { flex-shrink: 0; }
.score-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); margin-bottom: 2px;
}
.score-num {
  font-family: var(--font);
  font-size: 1.6rem; font-weight: 800;
  line-height: 1;
  transition: color var(--transition);
}
.score-num.danger { color: var(--danger); }
.score-num.warn   { color: var(--warn); }
.score-num.safe   { color: var(--success); }
.score-num.empty  { color: var(--muted); }

.score-card-right { flex: 1; min-width: 0; }
.score-track {
  height: 5px; border-radius: 5px;
  background: var(--surface3); overflow: hidden; margin-bottom: 4px;
}
.score-fill {
  height: 100%; border-radius: 5px;
  transition: width .9s cubic-bezier(.4,0,.2,1), background .5s;
}
.score-desc { font-size: 11px; color: var(--muted); line-height: 1.3; }

.score-arrow {
  text-align: center; font-size: 18px; color: var(--muted);
  animation: pulse-arrow 2s ease-in-out infinite;
}
@keyframes pulse-arrow {
  0%,100%{ transform:translateX(0); opacity:.5 }
  50%{ transform:translateX(4px); opacity:1 }
}

/* ══════════════════════════════════════════════════════════
   TOOL CARD — the main event, now first thing users see
══════════════════════════════════════════════════════════ */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ── CONTROLS BAR ─────────────────────────────────────── */
.controls {
  border-bottom: 1px solid var(--border);
  padding: 11px 16px;
  background: var(--surface2);
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 12px;
}
.ctrl-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctrl-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); white-space: nowrap;
}

/* Mode Pills */
.mode-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.mode-pill {
  appearance: none; cursor: pointer; border: none;
  padding: 5px 13px; border-radius: 20px;
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  color: var(--text2); background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition); white-space: nowrap;
}
.mode-pill:hover { color: var(--accent); border-color: rgba(79,70,229,.35); background: var(--accent-dim); }
.mode-pill.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent); font-weight: 700;
  box-shadow: 0 2px 10px rgba(79,70,229,.28);
}

/* Slider */
.slider-wrap { display: flex; align-items: center; gap: 8px; }
.slider-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
input[type=range] {
  -webkit-appearance: none;
  width: 90px; height: 4px;
  background: var(--border2); border-radius: 4px;
  outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
  transition: box-shadow var(--transition);
}
input[type=range]::-webkit-slider-thumb:hover { box-shadow: 0 0 0 6px rgba(79,70,229,.2); }
.burst-val {
  font-family: var(--font); font-size: 12px; font-weight: 700;
  color: var(--accent); min-width: 52px;
}

.char-info { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.char-info.near { color: var(--warn); }
.char-info.over { color: var(--danger); }

/* ── PANELS ───────────────────────────────────────────── */
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.panel { position: relative; display: flex; flex-direction: column; }
.panel:last-child { border-left: 1px solid var(--border); }

.panel-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface2);
}
.panel-title {
  font-family: var(--font);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .7px; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.panel-title .dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-red   { background: #ef4444; }
.dot-green { background: var(--success); animation: blink 2s ease-in-out infinite; }

.panel-btn {
  appearance: none; cursor: pointer; border: none;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--font);
  font-size: 11.5px; font-weight: 600;
  padding: 3px 11px; border-radius: 6px;
  transition: all var(--transition);
}
.panel-btn:hover { color: var(--accent); border-color: rgba(79,70,229,.3); }

/* Tall textarea — fills screen nicely */
textarea#inputText {
  flex: 1; width: 100%; border: none; outline: none; resize: none;
  background: transparent;
  font-family: var(--font); font-size: 14px;
  color: var(--text); line-height: 1.75;
  padding: 16px 18px;
  caret-color: var(--accent);
  min-height: 320px;
}
textarea#inputText::placeholder { color: var(--muted); }

#outputPanel {
  flex: 1; padding: 16px 18px;
  font-size: 14px; line-height: 1.75;
  color: var(--text); white-space: pre-wrap;
  word-break: break-word; min-height: 320px;
  position: relative;
}
#outputPanel.empty { color: var(--muted); font-style: italic; }

/* Thinking dots */
.thinking {
  display: none;
  position: absolute; inset: 0;
  align-items: center; justify-content: center;
  background: var(--surface);
  flex-direction: column; gap: 14px;
}
.thinking.show { display: flex; }
.think-dots { display: flex; gap: 7px; }
.think-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  animation: think-bounce .9s ease-in-out infinite;
}
.think-dot:nth-child(2) { animation-delay: .15s; }
.think-dot:nth-child(3) { animation-delay: .3s; }
@keyframes think-bounce {
  0%,100%{ transform:translateY(0); opacity:.3 }
  50%{ transform:translateY(-8px); opacity:1 }
}
.think-label {
  font-size: 13px; color: var(--muted);
  font-family: var(--font); font-weight: 600;
}

.word-badge {
  display: none;
  position: absolute; bottom: 12px; right: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 10px;
  font-size: 11px; color: var(--muted); font-weight: 600;
}
.word-badge.show { display: block; }

/* ── ERROR ────────────────────────────────────────────── */
.error-bar {
  display: none; margin: 12px 16px 0;
  background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--danger); font-size: 13px;
  align-items: center; gap: 8px;
}
.error-bar.show { display: flex; }

/* ── ACTION BAR ───────────────────────────────────────── */
.action-bar {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap;
  background: var(--surface2);
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 24px;
  border: none; cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 12px rgba(79,70,229,.28);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(79,70,229,.32);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: var(--surface); color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--accent); border-color: rgba(79,70,229,.3); background: var(--accent-dim); }

.btn-spinner {
  display: none; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading .btn-spinner { display: block; }
.loading .btn-text   { display: none; }
.loading .btn-icon   { display: none; }

.action-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.powered-by { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.powered-by .model-badge {
  background: var(--accent-dim); border: 1px solid rgba(79,70,229,.2);
  border-radius: 5px; padding: 2px 7px;
  font-size: 10px; font-weight: 700;
  color: var(--accent); letter-spacing: .3px;
}

/* ══════════════════════════════════════════════════════════
   TIPS ROW — below tool, compact
══════════════════════════════════════════════════════════ */
.tips-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin: 16px 0;
}
.tip-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; gap: 10px; align-items: flex-start;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.tip-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tip-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.tip-title { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.tip-desc  { font-size: 12px; color: var(--text2); line-height: 1.5; }

/* ══════════════════════════════════════════════════════════
   SEO SECTION
══════════════════════════════════════════════════════════ */
.seo-section {
  border-top: 1px solid var(--border);
  background: var(--surface2);
  padding: 56px 0 0;
}
.seo-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.seo-inner h2 {
  font-family: var(--font);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800; letter-spacing: -.7px;
  color: var(--text); margin-bottom: 14px;
}
.seo-inner h3 {
  font-family: var(--font); font-size: 1.05rem; font-weight: 700;
  color: var(--text); margin: 28px 0 8px;
}
.seo-inner p { color: var(--text2); font-size: 14px; line-height: 1.8; max-width: 800px; margin-bottom: 12px; }

/* Compare Table */
.compare-wrap { overflow-x: auto; margin: 16px 0 28px; }
.compare-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; min-width: 580px;
  background: var(--surface); box-shadow: var(--shadow);
}
.compare-table th {
  text-align: left; padding: 11px 14px;
  background: var(--surface3);
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1px solid var(--border);
}
.compare-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.compare-table tr:hover td { background: var(--surface2); }
.compare-table tr:last-child td { border-bottom: none; }
.yes { color: var(--success); font-weight: 700; }
.no  { color: var(--danger); font-weight: 500; }
.star-row td { font-weight: 700; background: rgba(79,70,229,.04); }
.star-row td:first-child::before { content: '★ '; color: var(--accent); }

/* FAQ */
.faq-wrap { margin: 16px 0 48px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  cursor: pointer; padding: 18px 0;
  font-family: var(--font); font-size: 14.5px; font-weight: 700;
  color: var(--text); display: flex; justify-content: space-between;
  align-items: center; gap: 14px;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--accent); }
.faq-icon {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--muted);
  transition: all var(--transition);
}
.faq-item.open .faq-icon { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(45deg); }
.faq-a { display: none; padding: 0 0 18px; color: var(--text2); font-size: 13.5px; line-height: 1.8; max-width: 740px; }
.faq-item.open .faq-a { display: block; }

/* ══════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════ */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  background: var(--text); color: #fff;
  padding: 11px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(10px);
  transition: all .3s; pointer-events: none;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 8px 28px rgba(30,27,75,.2);
}
#toast.show { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface2);
  text-align: center; padding: 32px 20px;
  color: var(--muted); font-size: 13px;
}
footer a { color: var(--muted); text-decoration: none; margin: 0 9px; }
footer a:hover { color: var(--accent); }
.footer-links { margin-bottom: 12px; }
.footer-warn { font-size: 11px; color: var(--muted); max-width: 680px; margin: 12px auto 0; line-height: 1.6; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .tips-row { grid-template-columns: 1fr 1fr; }
  .detector-row { display: none; } /* save space on tablet */
}
@media (max-width: 700px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .panels { grid-template-columns: 1fr; }
  .panel:last-child { border-left: none; border-top: 1px solid var(--border); }
  .score-strip { grid-template-columns: 1fr 26px 1fr; gap: 6px; }
  .score-num { font-size: 1.4rem; }
  .score-arrow { font-size: 14px; }
  .score-card { padding: 10px 12px; gap: 8px; }
  .tips-row { grid-template-columns: 1fr; }
  .controls { gap: 10px; }
  .char-info { margin-left: 0; }
  .action-right { margin-left: 0; width: 100%; }
  .site-header { padding: 0 14px; }
}
@media (max-width: 480px) {
  .mode-pills { gap: 4px; }
  .mode-pill { padding: 5px 10px; font-size: 11.5px; }
  .btn { padding: 8px 16px; font-size: 13px; }
  .hero { padding: 14px 16px 12px; }
  .container { padding: 12px 14px 50px; }
}