/* ── Tool Page General ─────────────────────────────────── */
.tool-page {
  padding: 48px 0 80px;
  min-height: 80vh;
}
.tool-hero {
  text-align: center;
  margin-bottom: 48px;
}
.tool-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.2;
}
.tool-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.35);
  color: #a78bfa;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ── Mini CTA Bar ──────────────────────────────────────────── */
.mini-cta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.22);
  border-radius: 999px;
  padding: 8px 20px;
  margin: -28px auto 28px;
  max-width: 560px;
  flex-wrap: wrap;
}
.mini-cta-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.mini-cta-text strong { color: var(--text-primary); font-weight: 700; }
.mini-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-primary);
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s, transform .2s;
  line-height: 1;
}
.mini-cta-link:hover { opacity: .88; transform: scale(1.03); }

/* ── Interface Grid ─────────────────────────────────── */
.spam-checker-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 900px) {
  .spam-checker-container { grid-template-columns: 1fr; }
}

/* ── Panels ─────────────────────────────────────────── */
.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gradient-primary);
}
.panel-title .spam-dot {
  background: #f59e0b; /* Default yellow/orange */
}
.panel-title .spam-dot.safe { background: #10b981; }
.panel-title .spam-dot.danger { background: #ef4444; }


/* Custom Tooltips */
.custom-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.custom-tooltip .tooltip-content {
  visibility: hidden;
  width: 240px;
  background-color: #1e293b;
  color: #f8fafc;
  text-align: left;
  border-radius: 8px;
  padding: 10px 14px;
  position: absolute;
  z-index: 50;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.custom-tooltip .tooltip-content.tooltip-left {
  left: auto;
  right: -10px;
  transform: translateX(0) translateY(10px);
}
.custom-tooltip .tooltip-content.tooltip-left::after {
  left: auto;
  right: 14px;
  margin-left: 0;
}
.custom-tooltip .tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}
.custom-tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.custom-tooltip:hover .tooltip-content.tooltip-left {
  transform: translateX(0) translateY(0);
}

/* ESP Select Styling */
.esp-select-wrapper {
  position: relative;
  display: inline-flex;
}
.esp-select-classic {
  background: rgba(0,0,0,0.2) !important;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 36px 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}
.esp-select-classic:hover {
  border-color: rgba(255,255,255,0.2);
}
.esp-select-classic:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 2px rgba(124,58,237,0.2);
}
.esp-select-classic option {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 10px;
}

/* Buttons */
.btn-action {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
}
.btn-action:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
}
.btn-clear { color: #f87171; }
.btn-clear:hover { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); }

.btn-check {
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}
.btn-check:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(124,58,237,.4);
}

/* Input Area */
.panel-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.input-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}
.subject-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .25s;
}
.subject-input:focus { border-color: rgba(124,58,237,.6); }

.body-input {
  width: 100%;
  flex: 1;
  min-height: 280px;
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color .25s;
}
.body-input:focus { border-color: rgba(124,58,237,.6); }

/* Highlight in textarea isn't possible natively without a contenteditable div,
   so we will just show a summary of found words. */

.panel-footer {
  padding: 14px 20px;
  background: rgba(255,255,255,.02);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Results Panel ─────────────────────────────────── */
.results-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Score Circle layout */
.score-container {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(0,0,0,.2);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.05);
}
.score-circle {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}
.circle-bg {
  fill: none;
  stroke: rgba(255,255,255,.05);
  stroke-width: 2.8;
}
.circle-progress {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease-out, stroke 0.3s;
  /* Colors manipulated by JS */
  stroke: #10b981; /* Safe */
}
.score-text {
  fill: var(--text-primary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
}
.score-meta h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.score-meta p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat-box {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.stat-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
  letter-spacing: .04em;
}
.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}
.stat-box.highlight-spam .stat-value { color: #f59e0b; }
.stat-box.highlight-spam.danger .stat-value { color: #ef4444; }
.stat-box.safe .stat-value { color: #10b981; }


/* Explainability Breakdown */
.breakdown-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.breakdown-items li:last-child {
  border-bottom: none;
}
.breakdown-value {
  font-weight: 800;
  width: 40px;
  text-align: right;
}
.breakdown-value.bad { color: #f87171; }
.breakdown-value.good { color: #34d399; }

/* Spam Words Found */
.spam-words-list {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 16px;
}
.list-title {
  font-size: .85rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 12px;
}
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.spam-chip {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.spam-chip span {
  background: rgba(239,68,68,.3);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
}

/* Pro Tips */
.tips-box {
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-top: auto;
}
.tips-title {
  font-size: .85rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.tips-list {
  margin: 0;
  padding-left: 18px;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.tips-list li { margin-bottom: 6px; }

/* ── SEO Blocks ─────────────────────────────────────── */
/* ── SEO Blocks ─────────────────────────────────────── */
.seo-content-block {
  max-width: 800px;
  margin: 64px auto 0;
}
.seo-content-block h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 52px 0 24px;
  padding-left: 18px;
  position: relative;
  letter-spacing: -.02em;
}
.seo-content-block h2::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #7c3aed, #a78bfa);
}
.seo-content-block h2:first-of-type { margin-top: 12px; }
.seo-content-block h3 {
  font-size: .97rem;
  font-weight: 700;
  color: #c4b5fd;
  margin: 28px 0 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: .01em;
}
.seo-content-block h3::before {
  content: '';
  display: inline-flex;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  box-shadow: 0 0 8px rgba(124,58,237,.5);
  flex-shrink: 0;
}
.seo-content-block p {
  color: rgba(255,255,255,.62);
  line-height: 1.85;
  margin-bottom: 14px;
  font-size: .94rem;
}
.seo-content-block ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.seo-content-block ul li {
  position: relative;
  padding-left: 22px;
  color: rgba(255,255,255,.62);
  line-height: 1.8;
  font-size: .94rem;
}
.seo-content-block ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  box-shadow: 0 0 6px rgba(124,58,237,.4);
}
.seo-content-block ul li strong { color: var(--text-primary); font-weight: 700; }
.seo-content-block p strong { color: var(--text-primary); font-weight: 700; }
.seo-content-block p a { color: #a78bfa; text-underline-offset: 3px; }
.seo-content-block p a:hover { color: #c4b5fd; }
.seo-content-block p code,
.seo-content-block li code {
  background: rgba(124,58,237,.13);
  border: 1px solid rgba(124,58,237,.22);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: .82rem;
  color: #c4b5fd;
  font-family: 'Courier New', monospace;
}

/* ── FAQ Accordion ─────────────────────────────────────────── */
.faq-list { 
  margin-top: 24px; 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(10px);
}
.faq-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(17, 24, 39, 0.6);
}
.faq-item.open {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(17, 24, 39, 0.8);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  user-select: none;
  transition: all 0.2s;
}
.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1;
}
.faq-item.open .faq-icon {
  border-color: var(--accent-purple);
  color: #fff;
  background: var(--accent-purple);
  transform: rotate(45deg);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 28px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-item.open .faq-answer { 
  max-height: 800px; 
  padding: 0 28px 28px; 
}
.faq-answer code {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: .83rem;
  font-family: 'Courier New', monospace;
}

/* ── Final CTA ────────────────────────────────────────────── */
.tool-cta {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin-top: 48px;
}
.btn-convert {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 20px rgba(124,58,237,.4);
}
.btn-convert:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,.55);
}
