@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

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

:root {
  --bg: #f8f9fc;
  --bg2: #f1f3f9;
  --white: #ffffff;
  --surface: #ffffff;
  --surface2: #f4f6fb;
  --border: #e2e7f0;
  --border2: #c8d2e8;
  --ink: #0f172a;
  --ink2: #475569;
  --ink3: #94a3b8;
  --ink4: #cbd5e1;
  --blue: #2563eb;
  --blue2: #1d4ed8;
  --blue-light: #eff6ff;
  --blue-mid: #dbeafe;
  --green: #059669;
  --green-light: #ecfdf5;
  --red: #dc2626;
  --red-light: #fef2f2;
  --orange: #d97706;
  --orange-light: #fffbeb;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow: 0 4px 16px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.04);
  --shadow-lg: 0 20px 48px rgba(15,23,42,0.12), 0 8px 20px rgba(15,23,42,0.06);
  --shadow-blue: 0 4px 20px rgba(37,99,235,0.2);
  --r: 10px;
  --r2: 14px;
  --r3: 18px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-logo .logo-dot {
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%;
  display: inline-block;
}

.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-link {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover { background: var(--surface2); color: var(--ink); }
.nav-link.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink2);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
}

.nav-cta {
  padding: 7px 18px;
  background: var(--blue);
  color: white;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  font-family: 'Bricolage Grotesque', sans-serif;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-blue);
}
.nav-cta:hover { background: var(--blue2); transform: translateY(-1px); }

/* ── LAYOUT ── */
.page { padding-top: 62px; min-height: 100vh; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 740px; margin: 0 auto; padding: 0 1.5rem; }

/* ── TYPE ── */
h1, h2, h3, h4, h5 {
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: white;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { background: var(--blue2); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(37,99,235,0.3); }

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--surface2); border-color: var(--border2); }

.btn-ghost { background: transparent; color: var(--ink2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); color: var(--ink); }

.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: #047857; transform: translateY(-1px); }

.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── FORMS ── */
.form-group { margin-bottom: 1.1rem; }

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 6px;
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: 0.01em;
}

input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 11px 14px;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  line-height: 1.5;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

textarea { min-height: 120px; resize: vertical; }
select option { background: white; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: 0.03em;
}

.badge-blue { background: var(--blue-mid); color: var(--blue); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-gray { background: var(--surface2); color: var(--ink2); border: 1px solid var(--border); }

/* ── SCORE RING ── */
.score-ring {
  position: relative;
  width: 110px; height: 110px;
  flex-shrink: 0;
}
.score-ring svg { transform: rotate(-90deg); }
.score-ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-ring-num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}
.score-ring-sub { font-size: 0.62rem; color: var(--ink3); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }

/* ── LOADING ── */
.spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state { display: none; flex-direction: column; align-items: center; gap: 14px; padding: 3rem; }
.loading-state.show { display: flex; }
.loading-state p { color: var(--ink2); font-size: 0.88rem; font-weight: 500; }

.result-block { display: none; }
.result-block.show { display: block; }

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  text-align: center;
  color: var(--ink3);
  border: 2px dashed var(--border);
  border-radius: var(--r3);
  padding: 3rem;
  gap: 12px;
  background: var(--bg2);
}
.empty-icon { font-size: 2.8rem; }
.empty-state h3 { font-size: 1rem; color: var(--ink2); font-weight: 700; }
.empty-state p { font-size: 0.83rem; line-height: 1.6; max-width: 280px; }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink2);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); background: var(--blue-light); border-radius: 6px 6px 0 0; }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── PROGRESS BAR ── */
.progress-bar-wrap { margin-bottom: 10px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.78rem; font-weight: 500; color: var(--ink2); }
.progress-track { height: 7px; background: var(--bg2); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.progress-fill { height: 100%; border-radius: 10px; transition: width 1s ease; }

/* ── ERROR / SUCCESS ── */
.error-box {
  display: none;
  background: var(--red-light);
  border: 1px solid #fca5a5;
  border-radius: var(--r);
  padding: 12px 14px;
  color: var(--red);
  font-size: 0.83rem;
  font-weight: 500;
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.error-box.show { display: flex; }
.error-box.hidden { display: none !important; }

/* ── COPY BTN ── */
.copy-btn {
  padding: 5px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--ink2);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Bricolage Grotesque', sans-serif;
}
.copy-btn:hover { background: var(--border); color: var(--ink); }

/* ── TEXTAREA WRAP ── */
.textarea-wrap { position: relative; }
.char-count {
  position: absolute;
  bottom: 10px; right: 12px;
  font-size: 0.68rem;
  color: var(--ink4);
  pointer-events: none;
  font-family: 'Bricolage Grotesque', sans-serif;
}

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--r2);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg2);
}
.upload-zone:hover { border-color: var(--blue); background: var(--blue-light); }
.upload-zone.dragging { border-color: var(--blue); background: var(--blue-light); }
.upload-zone p { font-size: 0.83rem; color: var(--ink2); margin-top: 6px; }
.upload-icon { font-size: 1.8rem; }

/* ── MODE TOGGLE ── */
.mode-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 3px;
  gap: 2px;
  margin-bottom: 1.2rem;
}
.mode-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink2);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mode-btn.active { background: var(--white); color: var(--blue); box-shadow: var(--shadow-sm); }

/* ── PAYWALL OVERLAY ── */
.paywall-banner {
  background: linear-gradient(135deg, var(--blue-light), var(--purple-light));
  border: 1px solid var(--blue-mid);
  border-radius: var(--r2);
  padding: 1.5rem;
  text-align: center;
  display: none;
}
.paywall-banner.show { display: block; }
.paywall-banner h3 { font-size: 1rem; margin-bottom: 6px; }
.paywall-banner p { font-size: 0.83rem; color: var(--ink2); margin-bottom: 1rem; }

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

/* ── TAG LIST ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--ink2);
  font-weight: 500;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.45s ease both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  background: var(--white);
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1rem; color: var(--ink); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.78rem; color: var(--ink3); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { font-size: 0.75rem; color: var(--ink3); }

/* ── MOBILE ── */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links .nav-link span { display: none; }
}
