/* ===== TOOLPLEX DESIGN SYSTEM ===== */
/* Cyberpunk Dark Neon Theme */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f0f1a;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #475569;
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --accent-glow: rgba(124,58,237,0.3);
  --accent2-glow: rgba(6,182,212,0.3);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --gradient-text: linear-gradient(135deg, #a78bfa, #7c3aed, #06b6d4, #22d3ee);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(124,58,237,0.15);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent2); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
::selection { background: var(--accent); color: white; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.5); }

/* ===== ANIMATED BACKGROUND ===== */
#bgCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  backdrop-filter: blur(20px);
  background: rgba(10,10,15,0.8);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}
.logo-icon {
  font-size: 1.5rem;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.fav-count {
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: 140px 24px 60px;
  text-align: center;
}
.hero-content { max-width: 800px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.1s both;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.6s ease 0.2s both;
}
.counter {
  font-weight: 800;
  color: var(--accent2);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== SEARCH ===== */
.search-wrapper {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease 0.3s both;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 16px 60px 16px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-glow);
}
.search-input::placeholder { color: var(--text-dim); }
.search-kbd {
  position: absolute;
  right: 16px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-family: var(--font);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 50;
  box-shadow: var(--shadow);
}
.search-results.active { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-item .sr-icon { font-size: 1.3rem; flex-shrink: 0; }
.search-result-item .sr-info { flex: 1; }
.search-result-item .sr-name { font-weight: 600; font-size: 0.9rem; }
.search-result-item .sr-desc { font-size: 0.8rem; color: var(--text-muted); }
.search-result-item .sr-cat {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ===== CATEGORIES ===== */
.categories-section {
  position: relative;
  z-index: 1;
  padding: 0 0 40px;
}
.categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.category-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.category-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}
.category-chip.active {
  background: var(--gradient);
  border-color: transparent;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ===== TOOLS GRID ===== */
.tools-section {
  position: relative;
  z-index: 1;
  padding: 0 0 80px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ===== TOOL CARD ===== */
.tool-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: var(--transition);
}
.tool-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow);
  background: var(--bg-card-hover);
}
.tool-card:hover::before { opacity: 1; }
.tool-card:active { transform: translateY(-2px) scale(0.99); }

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.tool-card-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  transition: var(--transition);
}
.tool-card:hover .tool-card-icon {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}
.tool-card-fav {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  padding: 4px;
  transition: var(--transition);
  opacity: 0;
}
.tool-card:hover .tool-card-fav { opacity: 1; }
.tool-card-fav.active { color: #ef4444; opacity: 1; }
.tool-card-fav:hover { transform: scale(1.2); }

.tool-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.tool-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.tool-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag-text { background: rgba(168,85,247,0.15); color: #a855f7; }
.tag-developer { background: rgba(59,130,246,0.15); color: #3b82f6; }
.tag-design { background: rgba(236,72,153,0.15); color: #ec4899; }
.tag-converter { background: rgba(34,211,238,0.15); color: #22d3ee; }
.tag-security { background: rgba(16,185,129,0.15); color: #10b981; }

/* Card stagger animation */
.tool-card:nth-child(1) { animation-delay: 0.02s; }
.tool-card:nth-child(2) { animation-delay: 0.04s; }
.tool-card:nth-child(3) { animation-delay: 0.06s; }
.tool-card:nth-child(4) { animation-delay: 0.08s; }
.tool-card:nth-child(5) { animation-delay: 0.1s; }
.tool-card:nth-child(6) { animation-delay: 0.12s; }
.tool-card:nth-child(7) { animation-delay: 0.14s; }
.tool-card:nth-child(8) { animation-delay: 0.16s; }
.tool-card:nth-child(9) { animation-delay: 0.18s; }
.tool-card:nth-child(10) { animation-delay: 0.2s; }
.tool-card:nth-child(11) { animation-delay: 0.22s; }
.tool-card:nth-child(12) { animation-delay: 0.24s; }

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
}
.no-results-icon { font-size: 3rem; margin-bottom: 16px; }
.no-results h3 { color: var(--text); margin-bottom: 8px; }
.no-results p { color: var(--text-muted); }

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  background: var(--bg-secondary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 12px;
  line-height: 1.7;
}
.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 4px 0;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ===== TOOL PAGE ===== */
.tool-page {
  position: relative;
  z-index: 1;
  padding: 100px 24px 60px;
  min-height: 100vh;
}
.tool-page .container { max-width: 1100px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.3; }
.tool-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.tool-header-icon {
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.8rem;
}
.tool-header h1 {
  font-size: 2rem;
  font-weight: 800;
}
.tool-description {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 32px;
  max-width: 700px;
}

/* Tool workspace */
.tool-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tool-workspace.single-col {
  grid-template-columns: 1fr;
}
.tool-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 300px;
}
.tool-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.tool-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.tool-panel-actions { display: flex; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  transition: var(--transition);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gradient);
  color: white;
}
.btn-primary:hover { box-shadow: 0 4px 15px var(--accent-glow); }
.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.textarea {
  min-height: 200px;
  resize: vertical;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group { margin-bottom: 16px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
}
.range-input {
  width: 100%;
  accent-color: var(--accent);
}

/* Output area */
.output-area {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-height: 200px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-y: auto;
  max-height: 500px;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent2);
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error { border-left: 3px solid var(--error); }
.toast.toast-info { border-left: 3px solid var(--accent); }
.toast-icon { font-size: 1.1rem; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100px); }
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle.active { background: var(--accent); }
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle.active::after { left: 23px; }

/* Color preview */
.color-preview {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.color-swatch:hover { transform: scale(1.1); }

/* Color palette */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.palette-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.palette-item:hover { transform: scale(1.05); }

/* Table styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.02);
}
.data-table tr:hover { background: rgba(255,255,255,0.02); }

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-success { background: rgba(16,185,129,0.15); color: var(--success); }
.status-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-error { background: rgba(239,68,68,0.15); color: var(--error); }
.status-info { background: rgba(59,130,246,0.15); color: #3b82f6; }

/* Diff highlighting */
.diff-added { background: rgba(16,185,129,0.15); color: var(--success); }
.diff-removed { background: rgba(239,68,68,0.15); color: var(--error); }
.diff-line { padding: 2px 8px; display: block; }

/* Regex match highlight */
.regex-match {
  background: rgba(124,58,237,0.3);
  border-bottom: 2px solid var(--accent);
  padding: 1px 0;
}

/* Strength meter */
.strength-meter {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}
.strength-meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background 0.3s ease;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--text); background: var(--bg-card); }
.tab-btn.active { color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Slider groups for visual editors */
.slider-group {
  margin-bottom: 16px;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.slider-label { font-size: 0.8rem; color: var(--text-muted); }
.slider-value { font-size: 0.8rem; color: var(--accent2); font-weight: 600; font-family: monospace; }

/* Preview box for CSS tools */
.preview-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: repeating-conic-gradient(rgba(255,255,255,0.03) 0% 25%, transparent 0% 50%) 50%/20px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 20px;
}
.preview-element {
  width: 200px;
  height: 200px;
  background: var(--gradient);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

/* Code output */
.code-output {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--accent2);
  position: relative;
}
.code-output .copy-btn {
  position: absolute;
  top: 8px; right: 8px;
}

/* Flexbox/Grid playground */
.playground-container {
  display: flex;
  gap: 12px;
  padding: 20px;
  min-height: 250px;
  background: rgba(0,0,0,0.2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  transition: all 0.2s ease;
}
.playground-item {
  width: 60px;
  height: 60px;
  background: var(--gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero { padding: 120px 16px 40px; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .tool-workspace { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .categories { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .category-chip { flex-shrink: 0; }
  .search-kbd { display: none; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 1.7rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .tool-header h1 { font-size: 1.4rem; }
}


/* ===== FAQ Section ===== */
.faq-section {
  padding: 4rem 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}
.faq-section .section-heading {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #00f5ff, #bf5af2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item:hover {
  border-color: rgba(0,245,255,0.2);
}
.faq-item[open] {
  border-color: rgba(0,245,255,0.3);
  background: rgba(255,255,255,0.05);
}
.faq-question {
  cursor: pointer;
  padding: 1rem 1.25rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::before {
  content: "+";
  font-size: 1.2rem;
  font-weight: 600;
  color: #00f5ff;
  min-width: 1.2rem;
  text-align: center;
  transition: transform 0.2s;
}
.faq-item[open] .faq-question::before {
  content: "\2212";
  color: #bf5af2;
}
.faq-question h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #e0e0e0;
  margin: 0;
}
.faq-answer {
  padding: 0 1.25rem 1rem 2.75rem;
  color: #8b949e;
  font-size: 0.9rem;
  line-height: 1.6;
}
