/* ToolPulse — Global Styles */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-hover: #222633;
  --border: #2a2e3d;
  --text: #e4e6ed;
  --text-muted: #8b8fa3;
  --primary: #6c5ce7;
  --primary-hover: #7d6ff0;
  --accent: #00cec9;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --radius: 12px;
  --radius-sm: 8px;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Layout */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--primary); }
.nav { display: flex; gap: 1.5rem; }
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }

/* Tool Page */
.tool-header {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}
.tool-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.tool-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.tool-body {
  padding: 1.5rem 0 3rem;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* Textarea / Input */
textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  resize: vertical;
  transition: border-color 0.2s;
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
}
textarea { min-height: 180px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--sans);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }

.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }

/* Labels */
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Output area */
.output-area {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 60px;
  position: relative;
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); background: var(--surface-hover); }
.copy-btn.copied { color: var(--success); border-color: var(--success); }

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.status-bar .valid { color: var(--success); }
.status-bar .invalid { color: var(--danger); }

/* Grid for homepage */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.tool-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.tool-card p { color: var(--text-muted); font-size: 0.9rem; }
.tool-card .icon { font-size: 1.8rem; margin-bottom: 0.8rem; }

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 640px) {
  .tool-header h1 { font-size: 1.5rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
  .container { padding: 0 1rem; }
}

/* Utility */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* About & SEO content sections */
.about-heading {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.about-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.about-text ul {
  padding-left: 1.2rem;
}
.about-text a {
  color: var(--primary);
}
.about-list {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-left: 1.2rem;
  line-height: 2;
}
.seo-heading {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.seo-subheading {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
}
.seo-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.seo-text ul {
  padding-left: 1.2rem;
}
.seo-text p + p {
  margin-top: 0.5rem;
}
