/* ════════════════════════════════════════════
   ExpressiveFlow v3 — ExpressiveBlogs Theme
   Primary: #F43676 (brand pink)
   ════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cabinet+Grotesk:wght@400;500;700;800;900&family=Satoshi:wght@300;400;500;700&display=swap');

/* ── Variables ── */
:root {
  --bg:          #080b10;
  --bg2:         #0d1117;
  --bg3:         #12181f;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --text:        #f0f4f8;
  --text2:       #8a96a3;
  --text3:       #4a5568;
  --accent:      #F43676;
  --accent-glow: rgba(244,54,118,0.25);
  --accent2:     #ff6b9d;
  --accent-dark: #c41e5a;
  --purple:      #a855f7;
  --purple2:     #7c3aed;
  --gold:        #f59e0b;
  --red:         #ef4444;
  --green:       #10b981;
  --blue:        #3b82f6;
  --pk-green:    #01411C;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --glow-accent: 0 0 40px rgba(244,54,118,0.2);
}

[data-theme="light"] {
  --bg:    #fdf2f6;
  --bg2:   #ffffff;
  --bg3:   #fce7ef;
  --border: rgba(244,54,118,0.12);
  --border2: rgba(244,54,118,0.2);
  --text:  #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Satoshi', 'Cabinet Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Background ── */
.bg-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.noise-overlay {
  position: absolute; 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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
}
.g1 { width: 600px; height: 600px; background: #F43676; top: -200px; left: -200px; }
.g2 { width: 500px; height: 500px; background: #ff6b9d; top: 30%; right: -150px; }
.g3 { width: 400px; height: 400px; background: #c41e5a; bottom: 10%; left: 20%; }
[data-theme="light"] .glow { opacity: 0.06; }

/* ── Layout ── */
.navbar, .hero, .tools-nav, .main-wrap, .features-section, .site-footer {
  position: relative; z-index: 1;
}

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,11,16,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(244,54,118,0.15);
  padding: 0 24px;
}
[data-theme="light"] .navbar {
  background: rgba(253,242,246,0.92);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}
.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 900; font-size: 13px;
  color: #fff;
  box-shadow: 0 0 16px rgba(244,54,118,0.4);
}
.brand-icon.sm { width: 26px; height: 26px; font-size: 11px; }
.brand span { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; font-size: 17px; }
.brand strong { color: var(--accent); }
.brand-tag {
  font-size: 11px; color: var(--text3);
  background: var(--bg3); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 20px;
}
.nav-tools {
  display: flex; gap: 3px; flex: 1;
  overflow-x: auto; scrollbar-width: none;
}
.nav-tools::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 500; color: var(--text2);
  text-decoration: none; white-space: nowrap;
  transition: all 0.2s; cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  background: rgba(244,54,118,0.12); color: var(--accent);
  text-decoration: none;
}
.nav-more-btn {
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; color: var(--text2); cursor: pointer;
  white-space: nowrap; transition: all 0.2s;
}
.nav-more-btn:hover { color: var(--accent); }
.more-dropdown {
  display: none; position: absolute; top: 60px; right: 80px;
  background: var(--bg2); border: 1px solid rgba(244,54,118,0.2);
  border-radius: var(--radius-sm); padding: 6px;
  box-shadow: var(--shadow); z-index: 200; min-width: 200px;
}
.more-dropdown.open { display: block; }
.drop-item {
  display: block; padding: 8px 14px; border-radius: 6px;
  font-size: 13px; color: var(--text2); text-decoration: none;
  transition: all 0.15s;
}
.drop-item:hover { background: rgba(244,54,118,0.1); color: var(--accent); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--bg3); color: var(--text2);
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
[data-theme="dark"] .t-sun { display: none; }
[data-theme="light"] .t-moon { display: none; }

/* ── Hero ── */
.hero {
  text-align: center; padding: 70px 24px 50px;
  max-width: 900px; margin: 0 auto;
}
.hero-badge {
  display: inline-block; margin-bottom: 20px;
  background: rgba(244,54,118,0.1); border: 1px solid rgba(244,54,118,0.3);
  color: var(--accent); font-size: 12px; font-weight: 600;
  padding: 5px 16px; border-radius: 20px; letter-spacing: 0.05em;
}
.hero h1 {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 900; font-size: clamp(36px, 6.5vw, 68px);
  line-height: 1.05; margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.hero-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, #ff9ec4 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 16px; color: var(--text2); margin-bottom: 32px; line-height: 1.6;
}
.hero-stats {
  display: inline-flex; align-items: center;
  background: var(--bg2); border: 1px solid rgba(244,54,118,0.2);
  border-radius: var(--radius); padding: 16px 32px;
  box-shadow: 0 0 40px rgba(244,54,118,0.08);
}
.hstat { text-align: center; padding: 0 20px; }
.hstat strong { display: block; font-family: 'Cabinet Grotesk', sans-serif; font-weight: 900; font-size: 24px; color: var(--accent); }
.hstat span { font-size: 11px; color: var(--text2); }
.hstat-div { width: 1px; background: var(--border2); height: 36px; }

/* ── Tools Navigation ── */
.tools-nav {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 16px 24px; max-width: 1280px; margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.tools-nav::-webkit-scrollbar { display: none; }
.tool-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text2);
  font-family: 'Satoshi', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all 0.2s;
  flex-shrink: 0;
}
.tool-tab:hover { border-color: rgba(244,54,118,0.3); color: var(--accent); }
.tool-tab.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; box-shadow: 0 0 20px rgba(244,54,118,0.35);
}
.tool-tab.pk-tool {
  border-color: rgba(244,54,118,0.25);
  background: rgba(244,54,118,0.05);
}
.tool-tab.pk-tool:hover { border-color: var(--accent); background: rgba(244,54,118,0.1); color: var(--accent); }
.tool-tab.pk-tool.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Main Wrap ── */
.main-wrap {
  max-width: 1280px; margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Tool Panel ── */
.tool-panel { display: none; }
.tool-panel.active { display: block; }

/* ── Panel Controls ── */
.panel-controls { margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.ctrl-group { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ctrl-label {
  font-size: 11px; font-weight: 700; color: var(--text3);
  letter-spacing: 0.08em; padding-top: 6px; flex-shrink: 0; min-width: 40px;
}
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 5px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg2);
  color: var(--text2); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: 'Satoshi', sans-serif;
  transition: all 0.15s; white-space: nowrap;
}
.pill:hover { border-color: rgba(244,54,118,0.3); color: var(--accent); }
.pill.active {
  background: rgba(244,54,118,0.15); border-color: rgba(244,54,118,0.5);
  color: var(--accent);
}

/* ── Editor Grid ── */
.editor-grid {
  display: grid; grid-template-columns: 1fr 44px 1fr; gap: 0;
  margin-bottom: 16px; align-items: stretch;
}
.editor-grid.single-col { grid-template-columns: 1fr; }
.editor-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.output-box { border-color: rgba(244,54,118,0.15); }
.box-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.box-title { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; color: var(--text2); text-transform: uppercase; }
.box-actions { display: flex; gap: 5px; }
.bact {
  padding: 4px 10px; border-radius: 6px; font-size: 11px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text2); cursor: pointer; font-family: 'Satoshi', sans-serif;
  transition: all 0.15s; white-space: nowrap;
}
.bact:hover { border-color: rgba(244,54,118,0.4); color: var(--accent); background: rgba(244,54,118,0.06); }
.editor-area {
  flex: 1; min-height: 220px; resize: none; padding: 16px;
  background: transparent; border: none; outline: none;
  font-size: 14px; line-height: 1.75; color: var(--text);
  font-family: 'Satoshi', sans-serif;
}
.editor-area::placeholder { color: var(--text3); }
.output-area {
  flex: 1; min-height: 220px; padding: 16px;
  font-size: 14px; line-height: 1.75; color: var(--text);
  overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
.placeholder-txt { color: var(--text3); font-style: italic; }
.box-footer {
  display: flex; justify-content: space-between; padding: 7px 16px;
  border-top: 1px solid var(--border); font-size: 11px; color: var(--text3);
}
.editor-divider {
  display: flex; align-items: center; justify-content: center;
}
.flow-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(244,54,118,0.08); border: 1px solid rgba(244,54,118,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--accent);
}

/* ── Pakistan Tool Forms ── */
.pk-tool-hero {
  text-align: center; padding: 28px 24px 24px;
  background: linear-gradient(135deg, rgba(244,54,118,0.06), rgba(196,30,90,0.03));
  border: 1px solid rgba(244,54,118,0.18); border-radius: var(--radius);
  margin-bottom: 20px;
}
.pk-badge {
  display: inline-block; margin-bottom: 12px;
  background: rgba(244,54,118,0.12); border: 1px solid rgba(244,54,118,0.3);
  color: var(--accent); font-size: 12px; font-weight: 600;
  padding: 4px 14px; border-radius: 20px;
}
.pk-tool-hero h2 {
  font-family: 'Cabinet Grotesk', sans-serif; font-weight: 900; font-size: 28px; margin-bottom: 8px;
}
.pk-tool-hero p { color: var(--text2); font-size: 14px; max-width: 560px; margin: 0 auto; line-height: 1.65; }
.pk-form-grid { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.pk-field { display: flex; flex-direction: column; gap: 6px; }
.pk-label { font-size: 12px; font-weight: 600; color: var(--text2); letter-spacing: 0.04em; text-transform: uppercase; }
.pk-textarea {
  min-height: 160px; resize: vertical; padding: 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); outline: none;
  font-size: 14px; line-height: 1.7; color: var(--text);
  font-family: 'Satoshi', sans-serif; width: 100%;
  transition: border-color 0.2s;
}
.pk-textarea:focus { border-color: rgba(244,54,118,0.4); }
.pk-textarea::placeholder { color: var(--text3); }
.pk-textarea-sm {
  min-height: 90px; resize: vertical; padding: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); outline: none;
  font-size: 14px; line-height: 1.7; color: var(--text);
  font-family: 'Satoshi', sans-serif; width: 100%;
  transition: border-color 0.2s;
}
.pk-textarea-sm:focus { border-color: rgba(244,54,118,0.4); }
.pk-textarea-sm::placeholder { color: var(--text3); }

/* ── Action Bar ── */
.action-bar {
  display: flex; justify-content: center; gap: 12px; margin-bottom: 12px;
}
.btn-run {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 32px; border-radius: var(--radius-sm);
  background: var(--accent); border: none;
  color: #fff; font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800; font-size: 15px; cursor: pointer;
  transition: all 0.2s; box-shadow: 0 0 30px rgba(244,54,118,0.25);
}
.btn-run:hover { transform: translateY(-1px); box-shadow: 0 0 40px rgba(244,54,118,0.45); background: var(--accent2); }
.btn-run:active { transform: translateY(0); }
.btn-run:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-run.btn-purple {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: #fff; box-shadow: 0 0 30px rgba(168,85,247,0.2);
}
.btn-run.btn-purple:hover { box-shadow: 0 0 40px rgba(168,85,247,0.4); }
.btn-run.btn-green { background: var(--green); color: #fff; box-shadow: 0 0 30px rgba(16,185,129,0.2); }
.btn-run.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 0 30px rgba(59,130,246,0.2); }
.btn-run.btn-pk {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; box-shadow: 0 0 30px rgba(244,54,118,0.3);
  padding: 13px 36px; font-size: 15px;
}
.btn-run.btn-pk:hover { box-shadow: 0 0 50px rgba(244,54,118,0.5); }
.btn-example {
  padding: 12px 24px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border2);
  color: var(--text2); font-family: 'Satoshi', sans-serif;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.btn-example:hover { border-color: var(--accent); color: var(--accent); }
.spin-ico { display: inline-block; }
.loading .spin-ico { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status Bar ── */
.status-bar {
  text-align: center; font-size: 13px; min-height: 20px;
  margin-bottom: 12px; color: var(--text2); transition: all 0.2s;
}
.status-bar.error { color: var(--red); }
.status-bar.success { color: var(--green); }
.status-bar.loading { color: var(--accent); }
.spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid var(--border2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 6px;
  vertical-align: middle;
}

/* ── Stats Strip ── */
.stats-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: center; padding: 12px 20px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text2); margin-bottom: 24px;
}
.stats-strip strong { color: var(--accent); font-weight: 700; }
.sdiv { color: var(--text3); }

/* ── Humanizer Hero ── */
.humanizer-hero {
  text-align: center; padding: 32px 24px; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(124,58,237,0.05));
  border: 1px solid rgba(168,85,247,0.2); border-radius: var(--radius);
}
.hh-badge {
  display: inline-block; margin-bottom: 12px;
  background: rgba(244,54,118,0.12); border: 1px solid rgba(244,54,118,0.3);
  color: var(--accent); font-size: 12px; font-weight: 600;
  padding: 4px 14px; border-radius: 20px;
}
.humanizer-hero h2 {
  font-family: 'Cabinet Grotesk', sans-serif; font-weight: 900; font-size: 30px; margin-bottom: 10px;
}
.humanizer-hero p { color: var(--text2); font-size: 14px; max-width: 540px; margin: 0 auto 16px; line-height: 1.6; }
.detector-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.detector-badges span {
  font-size: 12px; font-weight: 600; color: var(--green);
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25);
  padding: 3px 12px; border-radius: 20px;
}

/* ── Tone Analyzer ── */
.tone-result-area {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-top: 16px;
  display: none; min-height: 100px;
}
.tone-result-area.visible { display: block; }
.tone-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tone-card {
  flex: 1; min-width: 120px; padding: 14px 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-align: center;
}
.tone-card .tc-label { font-size: 11px; color: var(--text2); margin-bottom: 6px; letter-spacing: 0.05em; }
.tone-card .tc-val { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800; font-size: 20px; }
.tone-detail { font-size: 14px; color: var(--text2); line-height: 1.7; }

/* ── Language Select ── */
.lang-select-wrap { flex: 1; }
.lang-select {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 13px; color: var(--text); font-family: 'Satoshi', sans-serif;
  outline: none; cursor: pointer; width: auto; min-width: 180px;
}
.lang-select:focus { border-color: rgba(244,54,118,0.4); }

/* ── Features ── */
.features-section {
  max-width: 1280px; margin: 0 auto 64px; padding: 0 24px;
}
.feat-title {
  font-family: 'Cabinet Grotesk', sans-serif; font-weight: 900;
  font-size: clamp(24px, 4vw, 36px); text-align: center; margin-bottom: 36px;
}
.feat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.feat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feat-card:hover {
  border-color: rgba(244,54,118,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(244,54,118,0.1);
}
.feat-ico { font-size: 26px; margin-bottom: 12px; }
.feat-card h3 { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800; font-size: 17px; margin-bottom: 8px; }
.feat-card p { font-size: 13px; color: var(--text2); line-height: 1.65; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border); padding: 24px;
  position: relative; z-index: 1;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand span { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
.footer-brand strong { color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--text2); }
kbd {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 4px; padding: 1px 5px; font-size: 11px; font-family: monospace;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .editor-grid { grid-template-columns: 1fr; }
  .editor-divider { display: none; }
  .nav-tools { display: none; }
  .hero { padding: 48px 16px 36px; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .hero-stats {
    flex-wrap: wrap; gap: 0;
    padding: 12px 16px;
  }
  .hstat { padding: 8px 12px; }
  .hstat-div { display: none; }
  .tools-nav { padding: 12px 16px; gap: 8px; }
  .tool-tab { font-size: 12px; padding: 7px 12px; }
  .main-wrap { padding: 20px 16px 48px; }
  .pk-tool-hero { padding: 20px 16px; }
  .pk-tool-hero h2 { font-size: 22px; }
  .hero-sub { font-size: 14px; }
  .pill { font-size: 12px; padding: 5px 10px; }
  .btn-run { padding: 11px 24px; font-size: 14px; }
  .box-actions { gap: 3px; }
  .bact { padding: 3px 7px; font-size: 11px; }
  .feat-grid { grid-template-columns: 1fr; }
  .hero-badge { font-size: 11px; padding: 4px 12px; }
  .more-dropdown { right: 16px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .hero-stats { width: 100%; justify-content: space-around; }
  .tool-tab { padding: 6px 10px; font-size: 11px; }
  .ctrl-group { flex-direction: column; gap: 6px; }
  .ctrl-label { min-width: unset; }
}
