:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-elevated: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

:root[data-theme="dark"] {
  --bg: #0c0f17;
  --surface: #151922;
  --surface-muted: #1c212d;
  --surface-elevated: #1f2633;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #2d3748;
  --border-hover: #4a5568;
  --brand: #818cf8;
  --brand-2: #a78bfa;
  --brand-3: #22d3ee;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.4);
  --glow: 0 0 60px rgba(129, 140, 248, 0.2);
}

/* Prism dark theme override */
:root[data-theme="dark"] .code-output,
:root[data-theme="dark"] pre[class*="language-"] {
  background: var(--surface-muted);
}
:root[data-theme="dark"] code[class*="language-"],
:root[data-theme="dark"] pre[class*="language-"] {
  color: #e2e8f0;
  text-shadow: none;
}
:root[data-theme="dark"] .token.comment,
:root[data-theme="dark"] .token.prolog,
:root[data-theme="dark"] .token.doctype,
:root[data-theme="dark"] .token.cdata { color: #64748b; }
:root[data-theme="dark"] .token.punctuation { color: #94a3b8; }
:root[data-theme="dark"] .token.property,
:root[data-theme="dark"] .token.tag,
:root[data-theme="dark"] .token.boolean,
:root[data-theme="dark"] .token.number,
:root[data-theme="dark"] .token.constant,
:root[data-theme="dark"] .token.symbol,
:root[data-theme="dark"] .token.deleted { color: #f87171; }
:root[data-theme="dark"] .token.selector,
:root[data-theme="dark"] .token.attr-name,
:root[data-theme="dark"] .token.string,
:root[data-theme="dark"] .token.char,
:root[data-theme="dark"] .token.builtin,
:root[data-theme="dark"] .token.inserted { color: #34d399; }
:root[data-theme="dark"] .token.operator,
:root[data-theme="dark"] .token.entity,
:root[data-theme="dark"] .token.url { color: #fbbf24; }
:root[data-theme="dark"] .token.atrule,
:root[data-theme="dark"] .token.attr-value,
:root[data-theme="dark"] .token.keyword { color: #818cf8; }
:root[data-theme="dark"] .token.function,
:root[data-theme="dark"] .token.class-name { color: #f472b6; }
:root[data-theme="dark"] .token.regex,
:root[data-theme="dark"] .token.important,
:root[data-theme="dark"] .token.variable { color: #fb923c; }

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 5% -20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 100% 60% at 95% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--brand);
  color: white;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand);
}

img {
  max-width: 100%;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.brand span {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.btn,
button,
input,
select,
textarea {
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--border-hover);
  background: var(--surface-muted);
  transform: translateY(-1px);
}

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

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: var(--shadow-sm), 0 4px 16px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  transform: translateY(-2px);
  box-shadow: var(--shadow), 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
}

.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 40%, var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 1.2rem auto 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.search-bar {
  display: flex;
  gap: 0.75rem;
  margin: 2rem auto 0;
  max-width: 560px;
}

.search-bar .input {
  flex: 1;
  box-shadow: var(--shadow);
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  transition: all var(--transition);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.textarea {
  min-height: 180px;
  resize: vertical;
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.92rem;
  line-height: 1.5;
}

.section {
  padding: 2.5rem 0;
}

.section h2 {
  margin: 0 0 1rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -0.02em;
}

.section p.lead {
  color: var(--text-muted);
  margin-top: 0;
  font-size: 1.05rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
}

.tag:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(99, 102, 241, 0.08);
}

.tag-category {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--brand);
  font-size: 0.8rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.tools-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.card:hover::before {
  opacity: 1;
}

.card .tag {
  margin-bottom: 0.8rem;
}

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.ad-banner,
.affiliate-block {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  background: var(--surface-muted);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

.ad-banner {
  margin: 1.5rem 0;
}

.tool-shell {
  display: grid;
  gap: 1.25rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.output {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: 1rem;
  white-space: normal;
  word-break: break-word;
  min-height: 140px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.output pre {
  margin: 0;
}

.plain-output {
  font-family: "Fira Code", "Consolas", monospace;
  white-space: pre-wrap;
}

.code-output {
  overflow: auto;
  border-radius: calc(var(--radius-sm) - 2px);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.9rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.code-output code {
  font-family: "Fira Code", "Consolas", monospace;
  white-space: pre-wrap;
}

.swatch-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-bottom: 0.9rem;
}

.swatch-chip {
  border: none;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}

.swatch-chip:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.2), var(--shadow-sm);
}

.visual-preview {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.8rem;
  margin-bottom: 0.9rem;
}

.gradient-preview {
  width: 100%;
  height: 96px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 0.45rem;
}

.shadow-preview-surface {
  min-height: 130px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(148, 163, 184, 0.12) 0%, transparent 45%),
    linear-gradient(225deg, rgba(148, 163, 184, 0.12) 0%, transparent 45%),
    var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.shadow-preview-card {
  width: min(220px, 80%);
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.dynamic-qr {
  margin-bottom: 0.9rem;
}

.muted {
  color: var(--text-muted);
}

.status {
  font-size: 0.92rem;
  font-weight: 500;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

.two-col {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
  transition: all var(--transition);
}

.faq details:hover {
  border-color: var(--border-hover);
}

.faq details[open] {
  background: var(--surface-muted);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq details[open] summary::after {
  content: '−';
}

.faq summary::-webkit-details-marker {
  display: none;
}

.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  background: var(--surface-muted);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.link-list a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.link-list a:hover {
  color: var(--brand);
}

/* Animations */
.fade-in {
  animation: fadeUp 0.6s ease-out both;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Copy button */
.copy-btn {
  opacity: 0;
  transition: opacity var(--transition);
}

.output:hover .copy-btn,
.copy-btn:focus {
  opacity: 1;
}

/* Utility classes */
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Stats section */
.stats-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  text-align: center;
  margin: 2rem 0;
}

.stat-item {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat-number {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

@media (min-width: 860px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
  }

  .search-bar {
    flex-direction: column;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .card {
    padding: 1.1rem;
  }

  .footer-grid {
    gap: 1.5rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-muted);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Focus states */
*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface) 50%, var(--surface-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-new {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
}

.badge-popular {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
}

/* Tool page specific */
.tool-header {
  text-align: center;
  padding-bottom: 1.5rem;
}

.tool-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

/* Color preview for color tools */
.color-preview {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

/* QR Code container */
.qr-output {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.qr-output canvas,
.qr-output img {
  max-width: 200px;
}

/* HTML Preview for markdown, email signature, etc. */
.html-preview-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 1rem;
  overflow: hidden;
}

.html-preview-label {
  background: var(--surface-muted);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.html-preview-output {
  padding: 1.5rem;
  min-height: 100px;
  line-height: 1.7;
}

.html-preview-output h1 { font-size: 1.8rem; margin: 0 0 0.75rem; font-weight: 700; }
.html-preview-output h2 { font-size: 1.4rem; margin: 0.75rem 0; font-weight: 600; }
.html-preview-output h3 { font-size: 1.2rem; margin: 0.5rem 0; font-weight: 600; }
.html-preview-output p { margin: 0.5rem 0; }
.html-preview-output strong { font-weight: 700; }
.html-preview-output em { font-style: italic; }
.html-preview-output code { 
  background: var(--surface-muted); 
  padding: 0.15rem 0.4rem; 
  border-radius: 4px; 
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.html-preview-output a { color: var(--brand); text-decoration: underline; }
.html-preview-output li { margin-left: 1.5rem; margin-bottom: 0.25rem; }
.html-preview-output ul, .html-preview-output ol { margin: 0.5rem 0; padding-left: 1rem; }
.html-preview-output blockquote {
  border-left: 3px solid var(--brand);
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: var(--surface-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.html-preview-output pre {
  background: var(--surface-muted);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.html-preview-output table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}
.html-preview-output th, .html-preview-output td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.html-preview-output th {
  background: var(--surface-muted);
  font-weight: 600;
}

.html-code-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.html-code-details summary {
  padding: 0.75rem 1rem;
  background: var(--surface-muted);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  user-select: none;
}

.html-code-details summary:hover {
  background: var(--surface);
}

.html-code-details[open] summary {
  border-bottom: 1px solid var(--border);
}

.html-code-details .code-output {
  border: none;
  border-radius: 0;
  margin: 0;
}

/* Image preview styles */
.image-preview-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.image-preview-container .html-preview-label {
  background: var(--surface-muted);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-image {
  display: block;
  margin: 1rem auto;
  padding: 1rem;
}

/* ===== ENHANCED HERO SECTION ===== */
.hero-enhanced {
  position: relative;
  padding: 4rem 0;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero-enhanced::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(ellipse 60% 50% at 50% 30%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
              radial-gradient(ellipse 40% 40% at 80% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse 50% 35% at 20% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 40%, var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: 540px;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--glow);
  border: 1px solid var(--border);
  padding: 0.75rem;
  background: var(--surface);
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.6s ease;
}

.hero-image:hover img {
  transform: scale(1.02);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-cta .btn {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* ===== CATEGORY CARDS ===== */
.category-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.category-card {
  position: relative;
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  opacity: 0;
  transition: opacity var(--transition);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.category-card:hover::before {
  opacity: 1;
}

.category-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  color: var(--brand);
}

.category-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.category-count {
  font-size: 0.85rem;
  color: var(--brand);
  font-weight: 500;
}

/* Category color variants */
.category-card[data-category="developer"] .category-icon { background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05)); color: #6366f1; }
.category-card[data-category="ai"] .category-icon { background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.05)); color: #ec4899; }
.category-card[data-category="design"] .category-icon { background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05)); color: #8b5cf6; }
.category-card[data-category="security"] .category-icon { background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05)); color: #10b981; }
.category-card[data-category="generator"] .category-icon { background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.05)); color: #06b6d4; }
.category-card[data-category="daily"] .category-icon { background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05)); color: #f97316; }
.category-card[data-category="text"] .category-icon { background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.05)); color: #eab308; }
.category-card[data-category="finance"] .category-icon { background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05)); color: #22c55e; }

/* ===== FEATURE HIGHLIGHTS ===== */
.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.feature-item {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.8rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  color: var(--brand);
}

.feature-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== TOOL FILTER TABS ===== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: white;
}

/* ===== ENHANCED FOOTER ===== */
.footer-enhanced {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}

.footer-top {
  padding: 4rem 0 3rem;
}

.footer-grid-enhanced {
  display: grid;
  gap: 3rem;
  grid-template-columns: 2fr repeat(3, 1fr);
}

.footer-brand p {
  color: var(--text-muted);
  margin: 1rem 0;
  max-width: 300px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.footer-social a:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

.footer-column h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 1.2rem;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.footer-column a {
  color: var(--text);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-column a:hover {
  color: var(--brand);
}

.footer-bottom {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--brand);
}

@media (max-width: 900px) {
  .footer-grid-enhanced {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .footer-grid-enhanced {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== TOOL PAGE ENHANCEMENTS ===== */
.tool-page-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tool-breadcrumb a {
  color: var(--text-muted);
}

.tool-breadcrumb a:hover {
  color: var(--brand);
}

.tool-breadcrumb svg {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.tool-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tool-page-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
}

.tool-main-content {
  display: grid;
  gap: 2rem;
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 480px) {
  .container {
    width: 95%;
  }

  .hero-enhanced {
    padding: 2rem 0;
    min-height: auto;
  }

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

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .site-header,
  .footer,
  .footer-enhanced,
  .btn,
  .toolbar,
  [data-theme-toggle] {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .output {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}