/* ===== CSS Tools — Global Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-input: #16162a;
  --bg-code: #0d0d1a;
  --border: #2a2a4a;
  --border-focus: #7c3aed;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b8;
  --text-muted: #6868a0;
  --accent-purple: #7c3aed;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --gradient-primary: linear-gradient(135deg, #7c3aed, #3b82f6, #06b6d4);
  --gradient-accent: linear-gradient(135deg, #7c3aed, #ec4899);
  --gradient-card: linear-gradient(135deg, rgba(124,58,237,.08), rgba(59,130,246,.08));
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --transition: .2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,.88);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid rgba(42,42,74,.6);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.logo:hover { opacity: .85; }

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}

.logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: color .2s ease, background .2s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(124,58,237,.1);
}

.nav-links a.active {
  color: #fff;
  background: rgba(124,58,237,.2);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-purple);
  border-radius: 1px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.mobile-toggle:hover { color: var(--accent-purple); }

/* ===== Ad Slots ===== */
.ad-slot {
  max-width: 1400px;
  margin: 16px auto;
  padding: 0 24px;
}

.ad-slot > div {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .75rem;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 24px 36px;
  margin-top: 80px;
  background: linear-gradient(180deg, transparent, rgba(18,18,26,.5));
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand { max-width: 340px; }

.footer-brand .logo { margin-bottom: 14px; }

.footer-brand p {
  color: var(--text-secondary);
  font-size: .875rem;
  line-height: 1.75;
}

.footer-links h4 {
  color: var(--text-primary);
  font-size: .8rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}

.footer-links ul { list-style: none; }

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .875rem;
  line-height: 2.1;
  transition: color .2s ease, padding-left .2s ease;
}

.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
  letter-spacing: .01em;
}

/* ===== Tool Layout ===== */
.tool-page { max-width: 1400px; margin: 0 auto; padding: 36px 24px; }

.tool-header {
  text-align: center;
  margin-bottom: 36px;
}

.tool-header h1 {
  font-size: 2.15rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.tool-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.tool-workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

/* ===== Controls Panel ===== */
.controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  box-shadow: 0 2px 20px rgba(0,0,0,.2);
}

.controls-panel h2 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  letter-spacing: .01em;
}

.control-group {
  margin-bottom: 18px;
}

.control-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.control-group label .value {
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  text-transform: none;
  font-size: .78rem;
}

/* Inputs */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background .15s ease;
}

input[type="range"]:hover {
  background: rgba(22,22,42,.9);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--gradient-primary);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124,58,237,.4);
  transition: transform .15s ease, box-shadow .15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(124,58,237,.5);
}

input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent-purple);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  cursor: pointer;
}

input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  padding: 2px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input[type="color"]:hover {
  border-color: var(--accent-purple);
}

input[type="color"]:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }

input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input[type="number"]:hover,
input[type="text"]:hover {
  border-color: rgba(124,58,237,.4);
}

input[type="number"]:focus,
input[type="text"]:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  outline: none;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

select:hover {
  border-color: rgba(124,58,237,.4);
}

select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  user-select: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(124,58,237,.3);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-purple);
  background: rgba(124,58,237,.08);
  color: #fff;
}

.btn-secondary:active {
  background: rgba(124,58,237,.15);
}

.btn-sm { padding: 7px 14px; font-size: .8rem; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
  font-size: 14px;
}

.btn-icon:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
  background: rgba(124,58,237,.1);
}

/* ===== Preview Panel ===== */
.preview-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0,0,0,.2);
}

.preview-area {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: repeating-conic-gradient(var(--bg-secondary) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
  position: relative;
}

/* ===== Code Output ===== */
.code-output {
  background: var(--bg-code);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  position: relative;
}

.code-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.code-output-header h3 {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: var(--radius-sm);
  color: var(--accent-purple);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
  font-family: 'Inter', sans-serif;
}

.copy-btn:hover {
  background: rgba(124,58,237,.22);
  border-color: rgba(124,58,237,.45);
  transform: translateY(-1px);
}

.copy-btn:active {
  transform: translateY(0);
}

.copy-btn.copied {
  background: rgba(6,182,212,.15);
  border-color: rgba(6,182,212,.35);
  color: var(--accent-cyan);
}

pre.code-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem;
  line-height: 1.75;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}

/* Syntax highlighting */
.css-prop { color: #06b6d4; }
.css-val { color: #c084fc; }
.css-unit { color: #facc15; }
.css-sel { color: #ec4899; }
.css-brace { color: #6868a0; }
.css-colon { color: #6868a0; }
.css-semi { color: #6868a0; }
.css-comment { color: #4a4a6a; font-style: italic; }
.css-func { color: #34d399; }
.css-str { color: #fb923c; }

/* ===== Content Section ===== */
.content-section {
  max-width: 800px;
  margin: 64px auto 0;
  padding: 0 24px;
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.content-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text-primary);
}

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.85;
}

.content-section ul, .content-section ol {
  color: var(--text-secondary);
  margin: 0 0 16px 24px;
  line-height: 1.85;
}

.content-section li {
  margin-bottom: 4px;
}

.content-section code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .83em;
  background: rgba(22,22,42,.8);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--accent-cyan);
  border: 1px solid rgba(42,42,74,.5);
}

/* ===== Toggle/Checkbox ===== */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toggle-row span {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}

/* ===== Segmented Control ===== */
.segmented {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.segmented button {
  flex: 1;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.segmented button:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(124,58,237,.08);
}

.segmented button.active {
  background: var(--accent-purple);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
}

/* ===== Color Stop (gradients) ===== */
.color-stop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.color-stop-row input[type="color"] { flex-shrink: 0; }

.color-stop-row input[type="number"] { width: 60px; flex-shrink: 0; }

.color-stop-row .remove-stop {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: rgba(239,68,68,.15);
  color: #ef4444;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
}

.color-stop-row .remove-stop:hover { background: rgba(239,68,68,.3); }

/* ===== Shadow Layer ===== */
.shadow-layer {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.shadow-layer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.shadow-layer-header span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Inline Input Row ===== */
.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-row .field { flex: 1; }

.input-row .field label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ===== Index Page ===== */
.hero {
  text-align: center;
  padding: 88px 24px 56px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(124,58,237,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 18px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.18rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

.tools-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 56px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

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

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s cubic-bezier(.4,0,.2,1), border-color .25s ease;
  display: flex;
  flex-direction: column;
  animation: cardFadeIn .5s ease both;
}

.tool-card:nth-child(1) { animation-delay: 0s; }
.tool-card:nth-child(2) { animation-delay: .07s; }
.tool-card:nth-child(3) { animation-delay: .14s; }
.tool-card:nth-child(4) { animation-delay: .21s; }
.tool-card:nth-child(5) { animation-delay: .28s; }

.tool-card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(124,58,237,.18), 0 4px 12px rgba(0,0,0,.25);
}

.tool-card:active {
  transform: translateY(-2px);
}

.tool-card-preview {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-card);
  position: relative;
  overflow: hidden;
  transition: background .3s ease;
}

.tool-card:hover .tool-card-preview {
  filter: brightness(1.05);
}

.tool-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tool-card-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.tool-card-body p {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.65;
  flex: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tool-card-tag {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent-cyan);
  background: rgba(6,182,212,.1);
  padding: 4px 12px;
  border-radius: 20px;
  transition: background .2s ease;
}

.tool-card:hover .tool-card-tag {
  background: rgba(6,182,212,.16);
}

.tool-card-arrow {
  color: var(--accent-purple);
  font-size: 1.2rem;
  transition: transform .25s cubic-bezier(.4,0,.2,1), color .2s ease;
}

.tool-card:hover .tool-card-arrow {
  transform: translateX(5px);
  color: #a78bfa;
}

/* ===== Flexbox items preview styling ===== */
.flex-item-preview {
  min-width: 50px;
  min-height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  transition: .15s ease;
}

/* ===== Grid preview ===== */
.grid-preview-cell {
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .78rem;
  color: rgba(255,255,255,.9);
  min-height: 48px;
  transition: .15s ease;
}

/* ===== More Tools Cross-Link Section ===== */
.more-tools-section {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 0 24px;
}

.more-tools-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.01em;
}

.more-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.more-tools-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 600;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.more-tools-link:hover {
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124,58,237,.12);
  background: rgba(124,58,237,.04);
}

.more-tools-link:active {
  transform: translateY(0);
}

.more-tools-link-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.more-tools-link span {
  flex: 1;
}

.more-tools-link-arrow {
  color: var(--text-muted);
  font-size: .9rem;
  transition: transform .2s ease, color .2s ease;
}

.more-tools-link:hover .more-tools-link-arrow {
  transform: translateX(3px);
  color: var(--accent-purple);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .tool-workspace {
    grid-template-columns: 1fr;
  }
  .controls-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.1rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: 64px 24px 40px; }
  .tools-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 0 16px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10,10,15,.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 16px; }
  .nav-links a.active::after { display: none; }

  .mobile-toggle { display: block; }

  .tool-header h1 { font-size: 1.6rem; }
  .preview-area { padding: 24px; min-height: 260px; }
  .tool-page { padding: 20px 16px; }

  .more-tools-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .more-tools-link {
    padding: 12px 14px;
    font-size: .84rem;
  }
}

@media (max-width: 480px) {
  .input-row { flex-wrap: wrap; }
  .hero { padding: 48px 16px 32px; }
  .hero h1 { font-size: 1.85rem; }

  .more-tools-grid {
    grid-template-columns: 1fr;
  }
}
