/* justhetool.com — global styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;700&display=swap');

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

:root {
  --brand: #2563EB;
  --brand-dark: #1D4ED8;
  --brand-light: #EFF6FF;
  --accent: #10B981;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --muted: #64748B;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

/* NAV */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}
.nav-logo span { color: var(--text); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.9rem; transition: color .2s; }
.nav-links a:hover { color: var(--brand); }

/* HERO */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563EB 60%, #0ea5e9 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: .75rem;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  opacity: .88;
  max-width: 540px;
  margin: 0 auto 1.75rem;
}
.hero-search {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: .75rem 1.25rem;
  font-size: .95rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
}
.hero-search button {
  background: var(--accent);
  color: white;
  border: none;
  padding: .75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  transition: background .2s;
}
.hero-search button:hover { background: #059669; }

/* CATEGORIES */
.section { padding: 3rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.section-title span { color: var(--brand); }

/* TOOL CARDS GRID */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.tool-icon {
  width: 40px;
  height: 40px;
  background: var(--brand-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.tool-name {
  font-weight: 600;
  font-size: .95rem;
}
.tool-desc {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
}
.tool-badge {
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  width: fit-content;
}
.badge-popular { background: #FEF3C7; color: #92400E; }
.badge-new { background: #D1FAE5; color: #065F46; }

/* TOOL PAGE */
.tool-page { max-width: 860px; margin: 2rem auto; padding: 0 1.5rem 3rem; }
.tool-header { margin-bottom: 1.5rem; }
.tool-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.tool-header p { color: var(--muted); font-size: .95rem; }
.breadcrumb { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--brand); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* TOOL BOX */
.tool-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.tool-box-header {
  background: var(--brand);
  color: white;
  padding: .75rem 1.25rem;
  font-weight: 600;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.tool-box-body { padding: 1.25rem; }
textarea, input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .95rem;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
  color: var(--text);
  background: var(--bg);
}
textarea:focus, input[type="text"]:focus { border-color: var(--brand); background: white; }

/* STATS BAR */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .75rem 1.25rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.stat-val { font-size: 1.4rem; font-weight: 700; color: var(--brand); font-family: 'Space Grotesk', sans-serif; }
.stat-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* BUTTONS */
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.btn {
  padding: .55rem 1.2rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--accent); color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #EF4444; color: white; }
.btn-danger:hover { background: #DC2626; }

/* OUTPUT BOX */
.output-box {
  background: #F1F5F9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .9rem;
  min-height: 80px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

/* COPY TOAST */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--text);
  color: white;
  padding: .6rem 1.2rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s;
  pointer-events: none;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* SEO ARTICLE */
.seo-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.seo-article h2 { font-size: 1.1rem; margin-bottom: .75rem; font-family: 'Space Grotesk', sans-serif; }
.seo-article p { color: var(--muted); font-size: .9rem; line-height: 1.7; margin-bottom: .75rem; }
.seo-article h3 { font-size: .95rem; margin: 1rem 0 .4rem; color: var(--text); }

/* FOOTER */
footer {
  background: var(--text);
  color: #94A3B8;
  padding: 2rem;
  text-align: center;
  font-size: .85rem;
  margin-top: 3rem;
}
footer a { color: #93C5FD; text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: .75rem; flex-wrap: wrap; }

/* RESPONSIVE */
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .hero { padding: 2.5rem 1rem; }
  .section { padding: 2rem 1rem; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .stats-bar { justify-content: space-around; }
}
