/* ═══════════════════════════════════════════════════════════
   GetHumanized — Premium Dark Mode Stylesheet
   ════════════════════════════════════════════════════════════ */

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

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:          #07091a;
  --bg2:         #0d1025;
  --surface:     rgba(255,255,255,0.04);
  --surface-h:   rgba(255,255,255,0.07);
  --border:      rgba(255,255,255,0.08);
  --border-h:    rgba(124,58,237,0.45);
  --purple:      #7c3aed;
  --purple-l:    #9d6ffc;
  --purple-glow: rgba(124,58,237,0.25);
  --pink:        #db2777;
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dim:    #94a3b8;
  --green:       #22c55e;
  --yellow:      #eab308;
  --red:         #ef4444;
  --radius:      14px;
  --radius-sm:   8px;
  --font:        'Inter', system-ui, sans-serif;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.6);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input { font-family: inherit; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.35); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.6); }

/* ── Utilities ──────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--purple-l) 0%, var(--pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,9,26,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  color: var(--purple-l);
  font-size: 18px;
  animation: spin-slow 6s linear infinite;
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  padding: 2px 6px; border-radius: 99px;
  background: var(--purple-glow);
  border: 1px solid rgba(124,58,237,0.4);
  color: var(--purple-l);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link { font-size: 14px; font-weight: 500; color: var(--text-dim); transition: color 0.2s; }
.nav-link:hover { color: var(--text); }

/* ── Auth Buttons (logged out) ──────────────────────────────── */
.auth-buttons { display: flex; align-items: center; gap: 10px; }
.btn-signin {
  font-size: 13px; font-weight: 600; padding: 7px 14px;
  border-radius: 99px; color: var(--text-dim);
  border: 1px solid var(--border);
  background: transparent;
  transition: all 0.2s;
}
.btn-signin:hover { color: var(--text); border-color: var(--border-h); }
.btn-nav {
  font-size: 13px; font-weight: 600; padding: 7px 16px;
  border-radius: 99px; background: var(--purple); color: #fff;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-nav:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── Hamburger ──────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
}
.nav-hamburger span {
  display: block; height: 2px; border-radius: 99px;
  background: var(--text-dim); transition: all .25s;
}
.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(7,9,26,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 150;
  }
  .nav-open .nav-links { display: flex; }
  .nav-link { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .auth-buttons { flex-direction: column; gap: 8px; padding-top: 8px; }
  .auth-buttons .btn-signin,
  .auth-buttons .btn-nav { width: 100%; text-align: center; padding: 12px; font-size: 15px; border-radius: 10px; }
  .user-menu { flex-direction: row; gap: 10px; padding-top: 8px; }
}

/* ── User Menu (logged in) ──────────────────────────────────── */
.user-menu { display: flex; align-items: center; gap: 14px; }

.usage-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  white-space: nowrap;
}
.usage-track-mini {
  width: 50px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.usage-fill-mini {
  height: 100%; border-radius: 99px; width: 0%;
  background: var(--purple-l);
  transition: width 0.6s ease, background 0.6s ease;
}

.user-avatar-wrap { position: relative; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #9333ea);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.user-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px var(--purple-glow);
}
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 200px;
  background: #0f1228;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
}
.user-avatar-wrap:hover .user-dropdown,
.user-dropdown:hover { display: block; }
.dropdown-email {
  font-size: 13px; font-weight: 600; color: var(--text);
  padding-bottom: 6px; word-break: break-all;
}
.dropdown-plan {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.plan-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple-l); flex-shrink: 0;
}
.dropdown-divider {
  border: none; border-top: 1px solid var(--border);
  margin: 10px 0;
}
.dropdown-logout {
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  padding: 6px 0; width: 100%; text-align: left;
  transition: color 0.2s;
}
.dropdown-logout:hover { color: var(--red); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative; text-align: center;
  padding: 72px 24px 48px; overflow: hidden;
}
/* Animated star-grid backdrop */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 60px 60px, 30px 30px;
  background-position: 0 0, 15px 15px;
  opacity: 0.25;
  animation: star-drift 20s linear infinite;
  pointer-events: none;
}
@keyframes star-drift {
  from { background-position: 0 0, 15px 15px; }
  to   { background-position: 60px 60px, 75px 75px; }
}
.hero-glow {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 750px; height: 350px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-title {
  font-size: clamp(36px, 5vw, 60px); font-weight: 800;
  letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 18px;
  position: relative;
}
.hero-sub {
  font-size: clamp(15px, 2vw, 18px); color: var(--text-dim);
  max-width: 560px; margin: 0 auto 28px; line-height: 1.65;
  position: relative;
}
.trust-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; position: relative; }
.trust-badge {
  font-size: 13px; font-weight: 500; padding: 6px 14px;
  border-radius: 99px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text-dim);
  transition: border-color 0.25s, color 0.25s, transform 0.2s;
  cursor: default; overflow: hidden; position: relative;
}
.trust-badge::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  transition: none;
}
.trust-badge:hover { border-color: var(--border-h); color: var(--text); transform: translateY(-1px); }
.trust-badge:hover::after { left: 160%; transition: left 0.5s ease; }
.trust-badge-highlight {
  background: rgba(234,179,8,0.08);
  border-color: rgba(234,179,8,0.35);
  color: #fbbf24;
  font-weight: 700;
}

/* ── Mode Selector ──────────────────────────────────────────── */
.controls-bar { padding: 0 24px 20px; }
.controls-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap;
}
.control-label {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap;
}
.mode-selector { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mode-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  transition: all 0.25s;
}
.mode-btn small { display: none; font-size: 11px; font-weight: 400; color: var(--text-muted); }
.mode-btn:hover { border-color: var(--border-h); color: var(--text); background: var(--surface-h); transform: translateY(-1px); }
.mode-btn.active {
  border-color: var(--purple);
  background: linear-gradient(135deg, rgba(124,58,237,0.2) 0%, rgba(147,51,234,0.1) 100%);
  color: var(--purple-l);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.2), 0 2px 12px rgba(124,58,237,0.15);
}
.mode-btn.active small { display: block; color: rgba(157,111,252,0.7); }

/* ── Editor Grid ─────────────────────────────────────────────── */
.editor-section { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }
.editor-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 20px; align-items: stretch;
}
@media (max-width: 768px) {
  .editor-grid { grid-template-columns: 1fr; align-items: start; }
  .controls-inner { justify-content: center; }
}
@media (max-width: 480px) {
  .controls-inner { flex-direction: column; align-items: center; gap: 10px; }
  .mode-selector { width: 100%; flex-direction: column; }
  .mode-btn { width: 100%; justify-content: center; }
}

/* ── Panel ──────────────────────────────────────────────────── */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.panel:focus-within {
  border-color: var(--border-h);
  box-shadow: var(--shadow), 0 0 0 1px rgba(124,58,237,0.15), inset 0 1px 0 rgba(124,58,237,0.08);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.panel-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-input  { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.dot-output { background: var(--green); box-shadow: 0 0 6px var(--green); }
.panel-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.2s;
  cursor: pointer; background: transparent; border: none;
}
.icon-btn:hover { background: var(--surface-h); color: var(--text); }
.btn-action {
  display: flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  transition: all 0.2s; cursor: pointer;
}
.btn-action:hover { background: var(--surface-h); color: var(--text); border-color: var(--border-h); }

/* ── Textarea ────────────────────────────────────────────────── */
.editor-textarea {
  width: 100%; min-height: 340px; padding: 16px;
  background: transparent; border: none; outline: none; resize: none;
  color: var(--text); font-family: var(--font); font-size: 14px;
  line-height: 1.75; caret-color: var(--purple-l);
  flex: 1;
}
.editor-textarea::placeholder { color: var(--text-muted); }

/* ── Output Content ─────────────────────────────────────────── */
.output-content {
  min-height: 340px; padding: 16px;
  font-size: 14px; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  flex: 1;
}
.output-placeholder {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; min-height: 300px; gap: 12px; text-align: center;
  position: relative;
}
.output-placeholder::before {
  content: '';
  position: absolute;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  animation: orb-pulse 3s ease-in-out infinite;
}
@keyframes orb-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.3); opacity: 1; }
}
.placeholder-icon {
  font-size: 32px; color: var(--purple-l); opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
  position: relative; z-index: 1;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 0.85; transform: scale(1.12); }
}
.output-placeholder p { font-size: 14px; color: var(--text-dim); font-weight: 500; position: relative; z-index: 1; }
.output-placeholder small { font-size: 12px; color: var(--text-muted); position: relative; z-index: 1; }
.output-placeholder strong { color: var(--purple-l); }

/* ── Panel Footer ────────────────────────────────────────────── */
.panel-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}
.word-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.btn-secondary {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); font-size: 12px; font-weight: 600;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--border-h); color: var(--text); background: var(--surface-h); }

/* ── Score Card ─────────────────────────────────────────────── */
.score-card {
  padding: 14px 16px; border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.score-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.score-label-text { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.score-value { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.score-track {
  height: 6px; border-radius: 99px;
  background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 10px;
}
.score-bar {
  height: 100%; border-radius: 99px; width: 0%;
  transition: width 0.9s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.9s ease;
}
.score-signals { display: flex; flex-wrap: wrap; gap: 5px; }
.signal-tag {
  font-size: 11px; padding: 3px 8px; border-radius: 99px;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Center Action ───────────────────────────────────────────── */
.center-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 20px 0;
}
.no-scramble-badge {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 99px;
  color: #10b981; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.btn-humanize {
  position: relative; width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple) 0%, #9333ea 100%);
  border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s; overflow: hidden;
}
/* Shimmer sweep on idle */
.btn-humanize::before {
  content: '';
  position: absolute; top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-15deg);
  animation: btn-shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btn-shimmer {
  0%, 70%, 100% { left: -75%; opacity: 0; }
  10% { opacity: 1; }
  50% { left: 150%; opacity: 0; }
}
.btn-humanize:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 8px var(--purple-glow), 0 8px 32px rgba(124,58,237,0.5);
}
.btn-humanize:active { transform: scale(0.96); }
.btn-humanize:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-humanize:disabled::before { display: none; }
.btn-humanize-inner {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; height: 100%;
  position: relative; z-index: 1;
}
.btn-icon { font-size: 20px; color: #fff; transition: transform 0.4s; }
.btn-humanize:hover .btn-icon { transform: rotate(180deg); }
#humanizeBtnText {
  font-size: 9px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: rgba(255,255,255,0.85);
}
.btn-glow {
  position: absolute; inset: -4px; border-radius: 50%;
  animation: glow-ring 2.5s ease-in-out infinite; pointer-events: none;
}
@keyframes glow-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(124,58,237,0); }
}
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Output Loading ─────────────────────────────────────────── */
.output-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 340px; gap: 14px;
  color: var(--text-muted); font-size: 13px;
}
.output-loading .spinner {
  border-color: rgba(124,58,237,0.3);
  border-top-color: var(--purple-l);
}

/* ════════════════════════════════════════════════════════════
   AUTH MODAL
   ════════════════════════════════════════════════════════════ */

/* ── Auth Tabs ───────────────────────────────────────────────── */
.auth-tabs {
  position: relative;
  display: flex; gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1; padding: 8px 0;
  border-radius: 99px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  position: relative; z-index: 1;
  transition: color 0.2s;
}
.auth-tab.active { color: var(--text); }
.auth-tab-slider {
  position: absolute; top: 3px; left: 3px; bottom: 3px;
  width: calc(50% - 3px);
  background: linear-gradient(135deg, var(--purple), #9333ea);
  border-radius: 99px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 0;
  box-shadow: 0 2px 12px var(--purple-glow);
}
.auth-tab-slider.register { transform: translateX(100%); }

/* ── Forms ──────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 16px; }


.form-group input::placeholder { color: var(--text-muted); }



.btn-auth {
  padding: 12px;
  background: linear-gradient(135deg, var(--purple), #9333ea);
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px var(--purple-glow);
}
.btn-auth:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}





/* ── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(15, 18, 40, 0.97);
  border: 1px solid var(--border); color: var(--text);
  padding: 12px 22px 12px 18px; border-radius: 99px;
  font-size: 13px; font-weight: 500;
  backdrop-filter: blur(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s;
  opacity: 0; z-index: 999; white-space: nowrap;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--purple-l);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-error   { border-left-color: var(--red); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.footer-brand .logo-icon { color: var(--purple-l); font-size: 16px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--text-muted); width: 100%; text-align: center; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .footer-brand { justify-content: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
  .footer-copy { margin-top: 4px;  text-align: center; padding-top: 8px; }
}

/* ── Google Button ──────────────────────────────────────────── */
.google-btn-wrap {
  width: 100%;
  margin-bottom: 0;
}

.btn-google:active { transform: translateY(0); }
.btn-google:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── OR Divider ─────────────────────────────────────────────── */
.or-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 12px; font-weight: 500;
  margin: 4px 0;
}
.or-divider::before,
.or-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ── Dropdown Action Link ────────────────────────────────────── */
.dropdown-action {
  display: block;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  padding: 6px 0; width: 100%; text-align: left;
  transition: color 0.2s; text-decoration: none;
  cursor: pointer;
}
.dropdown-action:hover { color: var(--purple-l); }

/* ── Upgrade Modal ───────────────────────────────────────────── */
.upgrade-modal-card { max-width: 440px; text-align: center; }
.upgrade-modal-icon { font-size: 42px; margin-bottom: 12px; }
.upgrade-modal-title {
  font-size: 22px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px;
}
.upgrade-modal-sub {
  font-size: 14px; color: var(--text-dim); margin-bottom: 24px; line-height: 1.6;
}
.upgrade-modal-plans { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.upgrade-plan-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; color: var(--text);
  transition: all 0.2s; text-align: left; position: relative; overflow: hidden;
}
.upgrade-plan-card:hover { border-color: var(--border-h); background: var(--surface-h); transform: translateY(-1px); }
.upgrade-plan-featured {
  border-color: var(--purple);
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(147,51,234,0.06) 100%);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.15), 0 4px 20px rgba(124,58,237,0.1);
}
.upgrade-plan-featured:hover { border-color: var(--purple-l); }
.upc-badge {
  position: absolute; top: 0; right: 0;
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  padding: 3px 8px; border-radius: 0 12px 0 8px;
  background: var(--purple); color: #fff;
}
.upc-icon { font-size: 22px; flex-shrink: 0; }
.upc-body { flex: 1; }
.upc-body strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.upc-body span { font-size: 12px; color: var(--text-muted); }
.upc-arrow { font-size: 18px; color: var(--text-muted); }
.upgrade-modal-note { font-size: 12px; color: var(--text-muted); }

/* ── Dropdown action button (history) ───────────────────────── */
.dropdown-action-btn {
  display: block; width: 100%; text-align: left;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  padding: 6px 0; background: none; border: none; cursor: pointer;
  font-family: inherit; transition: color .2s;
}
.dropdown-action-btn:hover { color: var(--purple-l); }

/* ── Transformation Score Badge ─────────────────────────────── */
.transform-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 99px; letter-spacing: .4px;
}
.transform-badge.high   { background: rgba(34,197,94,.15);  color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.transform-badge.medium { background: rgba(234,179,8,.12);  color: #eab308; border: 1px solid rgba(234,179,8,.3); }
.transform-badge.low    { background: rgba(239,68,68,.12);  color: #ef4444; border: 1px solid rgba(239,68,68,.3); }

/* ── File Upload Loading ─────────────────────────────────────── */
.upload-loading {
  position: absolute; inset: 0; background: rgba(7,9,26,.7);
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--purple-l);
  z-index: 10; gap: 8px;
}
#inputPanel { position: relative; }

/* ── History Drawer ──────────────────────────────────────────── */
.history-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.history-overlay.open { opacity: 1; pointer-events: all; }

.history-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 95vw;
  background: var(--bg2); border-left: 1px solid var(--border);
  z-index: 201; transform: translateX(100%); transition: transform .35s cubic-bezier(.25,.8,.25,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.history-drawer.open { transform: translateX(0); }

.history-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.history-title { font-size: 16px; font-weight: 700; }

.history-list {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.history-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 40px 0; }

.history-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; cursor: default;
  transition: border-color .2s;
}
.history-card:hover { border-color: var(--border-h); }
.history-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; gap: 8px;
}
.history-card-date { font-size: 11px; color: var(--text-muted); }
.history-card-badges { display: flex; gap: 6px; }
.history-card-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 99px; background: rgba(124,58,237,.15);
  color: var(--purple-l); border: 1px solid rgba(124,58,237,.2);
}
.history-card-preview {
  font-size: 12px; color: var(--text-dim); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px;
}
.history-card-actions { display: flex; gap: 8px; }
.btn-restore {
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 99px; background: linear-gradient(135deg, var(--purple), #9333ea);
  color: #fff; border: none; cursor: pointer; transition: opacity .2s;
}
.btn-restore:hover { opacity: .85; }
.btn-restore-input {
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 99px; border: 1px solid var(--border);
  color: var(--text-dim); background: none; cursor: pointer; transition: all .2s;
}
.btn-restore-input:hover { border-color: var(--border-h); color: var(--text); }

/* ── Persistent Usage Bar ────────────────────────────────────── */
.usage-bar {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  padding: 7px 24px;
  position: sticky; top: 60px; z-index: 90;
  backdrop-filter: blur(12px);
}
.usage-bar.urgent { background: rgba(239,68,68,0.06); border-bottom-color: rgba(239,68,68,0.2); }
.usage-bar.warning { background: rgba(234,179,8,0.05); border-bottom-color: rgba(234,179,8,0.18); }
.usage-bar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.usage-bar-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.usage-bar-icon { font-size: 14px; }
.usage-bar-text { font-size: 12px; font-weight: 500; color: var(--text-dim); white-space: nowrap; }
.usage-bar-track { flex: 1; max-width: 160px; height: 4px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.usage-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--purple), var(--purple-l)); transition: width .4s ease; }
.usage-bar.warning .usage-bar-fill { background: linear-gradient(90deg, #ca8a04, #eab308); }
.usage-bar.urgent  .usage-bar-fill { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.usage-bar-cta { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 99px; background: linear-gradient(135deg, var(--purple), #9333ea); color: #fff; text-decoration: none; white-space: nowrap; transition: opacity .2s; }
.usage-bar-cta:hover { opacity: .85; }
.usage-bar.unlimited .usage-bar-cta { display: none; }

/* ── Theme Toggle Button ─────────────────────────────────────── */
.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; transition: all .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border-h); background: var(--surface-h); }
.theme-icon-light { display: none; }



/* ── Light Mode Overrides ────────────────────────────────────── */
body.light {
  --bg:          #f8f9ff;
  --bg2:         #eef0fa;
  --surface:     rgba(0,0,0,0.04);
  --surface-h:   rgba(0,0,0,0.07);
  --border:      rgba(0,0,0,0.1);
  --border-h:    rgba(124,58,237,0.4);
  --text:        #0f172a;
  --text-dim:    #475569;
  --text-muted:  #94a3b8;
  --shadow:      0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.18);
}





/* ── Animated Score Demo ─────────────────────────────────────── */
.score-demo {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 28px;
}
@media (max-width: 600px) {
  .score-demo { flex-direction: column; align-items: center; gap: 12px; }
  .score-demo-panel { width: 100%; max-width: 280px; }
  .score-demo-arrow { transform: rotate(90deg); }
}
.score-demo-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 22px; min-width: 155px;
  text-align: center; transition: all .4s; flex: 1; max-width: 220px;
}
.score-demo-before { border-color: rgba(239,68,68,.3); }
.score-demo-after  { border-color: rgba(34,197,94,.35); box-shadow: 0 0 20px rgba(34,197,94,.12); }
.sdp-label { font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 6px; }
.sdp-tool  { font-size: 11px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; }
.sdp-score {
  font-size: 42px; font-weight: 900; letter-spacing: -2px; line-height: 1;
  margin-bottom: 10px; font-variant-numeric: tabular-nums;
}
.score-demo-before .sdp-score { color: #ef4444; }
.score-demo-after  .sdp-score { color: #22c55e; }
.sdp-bar-track { height: 5px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.sdp-bar { height: 100%; border-radius: 99px; transition: width 1.5s cubic-bezier(.4,0,.2,1); }
.sdp-bar-bad  { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.sdp-bar-good { background: linear-gradient(90deg, #15803d, #22c55e); }
.sdp-verdict { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; display: inline-block; }
.sdp-verdict-ai    { background: rgba(239,68,68,.12); color: #ef4444; border: 1px solid rgba(239,68,68,.25); }
.sdp-verdict-human { background: rgba(34,197,94,.1);  color: #22c55e; border: 1px solid rgba(34,197,94,.25); }

/* ── Humanize animation between panels ── */
.score-demo-arrow {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  flex-shrink: 0;
}
.sda-ring {
  position: relative; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.sda-ring::before {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%);
  animation: ring-pulse 2s ease-in-out infinite;
}
.sda-ring::after {
  content: '';
  position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--purple-l);
  border-right-color: rgba(124,58,237,0.4);
  animation: ring-spin 1.5s linear infinite;
}
@keyframes ring-pulse { 0%,100% { transform: scale(1); opacity: .6; } 50% { transform: scale(1.2); opacity: 1; } }
@keyframes ring-spin  { to { transform: rotate(360deg); } }
.sda-icon {
  font-size: 24px; color: var(--purple-l);
  animation: star-pulse 2s ease-in-out infinite;
  position: relative; z-index: 1;
}
@keyframes star-pulse { 0%,100% { transform: scale(1) rotate(0deg); opacity:.8; } 50% { transform: scale(1.15) rotate(180deg); opacity:1; } }
.sda-arrow { font-size: 14px; color: var(--purple-l); opacity: .7; animation: arrow-bounce 1.5s ease-in-out infinite; }
@keyframes arrow-bounce { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.sda-label { font-size: 10px; font-weight: 700; color: var(--purple-l); letter-spacing: 1px; text-transform: uppercase; }

/* demo cycling animation */
@keyframes demo-count-down { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sdp-score.animating { animation: demo-count-down .15s ease both; }

/* ── Visual Proof Section ──────────────────────────────────────── */
.proof-section {
  max-width: 1100px; margin: 0 auto;
  padding: 80px 24px 40px;
}
.proof-header { text-align: center; margin-bottom: 56px; }
.proof-header .section-sub { max-width: 700px; margin: -20px auto 0; font-size: 17px; color: var(--text-muted); line-height: 1.6; }

.proof-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px;
}
@media (max-width: 800px) { .proof-grid { grid-template-columns: 1fr; } }

.proof-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}
.proof-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-h);
}
.pc-badge {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  padding: 6px 14px; border-radius: 99px;
}
.pc-badge.highlight { background: rgba(147, 51, 234, 0.15); color: #c084fc; border: 1px solid rgba(147, 51, 234, 0.3); }
.pc-badge.highlight-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.pc-score-val { font-size: 32px; font-weight: 800; color: #fff; letter-spacing: -1px; }
.pc-score { font-size: 14px; font-weight: 600; color: #10b981; display: flex; align-items: baseline; gap: 8px; }

.proof-body { display: flex; flex-direction: column; gap: 12px; }
.pb-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-radius: 12px; font-size: 15px; font-weight: 600;
}
.pb-row.pb-bad { background: rgba(239, 68, 68, 0.05); color: var(--text-dim); border: 1px solid rgba(239, 68, 68, 0.2); }
.pb-row.pb-bad strong { color: #f87171; }
.pb-row.pb-good { background: rgba(16, 185, 129, 0.05); color: var(--text); border: 1px solid rgba(16, 185, 129, 0.2); }
.pb-row.pb-good strong { color: #34d399; }
.pb-arrow { text-align: center; color: var(--border-h); font-size: 20px; margin: -4px 0; }

/* ── Testimonials ────────────────────────────────────────────── */
.testimonials-section {
  max-width: 1100px; margin: 0 auto;
  padding: 72px 24px 80px;
}
.section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: var(--purple-l); text-align: center; margin-bottom: 12px;
}
.section-title {
  font-size: clamp(26px, 3.5vw, 36px); font-weight: 800;
  letter-spacing: -.7px; text-align: center; margin-bottom: 48px;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .testimonials-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .testimonials-grid { grid-template-columns: 1fr; } }

.tcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px;
  transition: border-color .25s, transform .25s;
  display: flex; flex-direction: column; gap: 14px;
}
.tcard:hover { border-color: var(--border-h); transform: translateY(-3px); }
.tcard-featured {
  border-color: rgba(124,58,237,.35);
  background: linear-gradient(145deg, rgba(124,58,237,.07), rgba(147,51,234,.03));
}
.tcard-stars { color: #eab308; font-size: 14px; letter-spacing: 1px; }
.tcard-text  { font-size: 14px; line-height: 1.7; color: var(--text-dim); flex: 1; }
.tcard-author { display: flex; align-items: center; gap: 10px; }
.tcard-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tcard-av-1 { background: linear-gradient(135deg,#7c3aed,#6d28d9); }
.tcard-av-2 { background: linear-gradient(135deg,#db2777,#be185d); }
.tcard-av-3 { background: linear-gradient(135deg,#0891b2,#0e7490); }
.tcard-av-4 { background: linear-gradient(135deg,#16a34a,#15803d); }
.tcard-av-5 { background: linear-gradient(135deg,#ea580c,#c2410c); }
.tcard-av-6 { background: linear-gradient(135deg,#9333ea,#7c3aed); }
.tcard-name { font-size: 13px; font-weight: 700; color: var(--text); }
.tcard-role { font-size: 11px; color: var(--text-muted); }

/* ── Built for Workflow ──────────────────────────────────────── */
.built-for-section {
  max-width: 1200px; margin: 0 auto;
  padding: 60px 24px 80px; text-align: center;
}
.built-for-section .section-sub {
  font-size: 16px; color: var(--text-muted); margin: -20px auto 48px; max-width: 600px;
}
.workflow-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 900px) { .workflow-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .workflow-grid { grid-template-columns: 1fr; } }
.workflow-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: default; text-align: left;
}
.workflow-card:hover {
  transform: translateY(-4px); border-color: rgba(124,58,237,0.4);
  box-shadow: 0 10px 40px -10px rgba(124,58,237,0.15);
}
.wc-image-wrap {
  position: relative; padding: 32px 24px; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: rgba(255,255,255,0.02); overflow: hidden;
}
.wc-gradient-overlay {
  position: absolute; inset: 0; opacity: 0.15; transition: opacity 0.4s;
  background: radial-gradient(circle at top right, var(--purple-l) 0%, transparent 60%);
}
.wc-gradient-pro { background: radial-gradient(circle at top right, #3b82f6 0%, transparent 60%); }
.wc-gradient-agency { background: radial-gradient(circle at top right, #10b981 0%, transparent 60%); }
.workflow-card:hover .wc-gradient-overlay { opacity: 0.3; }
.wc-content { position: relative; z-index: 1; }
.wc-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 8px; letter-spacing: -0.5px; }
.wc-desc { font-size: 14px; line-height: 1.6; color: var(--text-dim); }

/* ── Privacy Priority ────────────────────────────────────────── */
.privacy-section {
  max-width: 1000px; margin: 0 auto;
  padding: 60px 24px; text-align: center;
}
.privacy-section .section-sub {
  font-size: 16px; color: var(--text-muted); margin: -20px auto 48px; max-width: 600px; line-height: 1.6;
}
.privacy-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; text-align: left;
}
@media (max-width: 768px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px;
  transition: background 0.3s border-color 0.3s;
}
.privacy-card:hover {
  background: rgba(255,255,255,0.02); border-color: rgba(124,58,237,0.3);
}
.pc-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(124,58,237,0.1); color: var(--purple-l);
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.pc-title { font-size: 18px; font-weight: 700; color: #fff; }
.pc-desc { font-size: 14px; line-height: 1.6; color: var(--text-dim); }
