/* ==========================================================================
   QuickUtils — Production Standalone Design System (Zero External Runtime CDN)
   Pure modern CSS with full dark/light/system support & design tokens.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-text: #ffffff;
  --accent-sky: #0284c7;
  --accent-sky-light: #e0f2fe;
}

:root.dark {
  color-scheme: dark;
  --bg-main: #020617;
  --bg-surface: #0f172a;
  --bg-surface-hover: #1e293b;
  --bg-card: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --primary: #2563eb;
  --primary-hover: #3b82f6;
  --primary-text: #ffffff;
  --accent-sky: #38bdf8;
  --accent-sky-light: rgba(56, 189, 248, 0.15);
}

*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border-color);
}

html, body, #app {
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre, kbd, samp, textarea.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
}

#app {
  display: flex;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(99, 102, 241, 0.05), transparent 50%);
}

/* Accent Themes */
html[data-accent="midnight"] .bg-blue-600, html[data-accent="midnight"] .btn-primary { background-color: #4338ca !important; }
html[data-accent="forest"] .bg-blue-600, html[data-accent="forest"] .btn-primary { background-color: #047857 !important; }
html[data-accent="aurora"] .bg-blue-600, html[data-accent="aurora"] .btn-primary { background-color: #0f766e !important; }

/* Scrollbars */
.custom-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; }
html.dark .custom-scroll::-webkit-scrollbar-thumb { background: #334155; }
.custom-scroll { scrollbar-width: thin; }

textarea { resize: vertical; }

::selection {
  background: rgba(56, 189, 248, 0.35);
}

/* Animations */
.toast-enter {
  animation: toast-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Utilities Replacement */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.min-w-0 { min-width: 0px; }
.min-h-0 { min-h: 0px; }
.shrink-0 { flex-shrink: 0; }
.grow { flex-grow: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Grid columns */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:grid-cols-\[auto_1fr\] { grid-template-columns: auto 1fr; }
  .sm\:grid-cols-\[1fr_auto\] { grid-template-columns: 1fr auto; }
  .sm\:inline { display: inline !important; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-start { align-items: flex-start; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:w-auto { width: auto; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:p-8 { padding: 2rem; }
}

/* Gaps */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.ml-auto { margin-left: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

/* Width & Height */
.w-full { width: 100%; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.w-28 { width: 7rem; }
.h-4 { height: 1rem; } .w-4 { width: 1rem; }
.h-5 { height: 1.25rem; } .w-5 { width: 1.25rem; }
.h-6 { height: 1.5rem; } .w-6 { width: 1.5rem; }
.h-8 { height: 2rem; } .w-8 { width: 2rem; }
.h-9 { height: 2.25rem; } .w-9 { width: 2.25rem; }
.h-12 { height: 3rem; }
.h-24 { height: 6rem; }
.h-full { height: 100%; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-h-80 { max-height: 20rem; }
.min-h-\[42px\] { min-height: 42px; }
.min-h-\[44px\] { min-height: 44px; }
.min-h-\[180px\] { min-height: 180px; }
.min-h-\[200px\] { min-height: 200px; }
.min-h-\[50vh\] { min-height: 50vh; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.uppercase { text-transform: uppercase; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.break-words { overflow-wrap: break-word; }

/* Colors */
.text-white { color: #ffffff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-sky-600 { color: #0284c7; }
.text-sky-700 { color: #0369a1; }
.text-rose-500 { color: #f43f5e; }
.text-rose-600 { color: #e11d48; }
.text-emerald-600 { color: #059669; }
.text-emerald-800 { color: #065f46; }

html.dark .dark\:text-slate-100 { color: #f8fafc; }
html.dark .dark\:text-slate-200 { color: #e2e8f0; }
html.dark .dark\:text-slate-300 { color: #cbd5e1; }
html.dark .dark\:text-slate-400 { color: #94a3b8; }
html.dark .dark\:text-slate-500 { color: #64748b; }
html.dark .dark\:text-sky-400 { color: #38bdf8; }
html.dark .dark\:text-rose-300 { color: #fda4af; }
html.dark .dark\:text-rose-400 { color: #fb7185; }
html.dark .dark\:text-emerald-200 { color: #a7f3d0; }
html.dark .dark\:text-emerald-400 { color: #34d399; }

/* Backgrounds */
.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }
.bg-blue-600 { background-color: #2563eb; }
.bg-sky-50 { background-color: #f0f9ff; }
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.9); }
.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bg-transparent { background-color: transparent; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-rose-100 { background-color: #ffe4e6; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-200 { background-color: #fde68a; }

.list-disc { list-style-type: disc; }
.pl-5 { padding-left: 1.25rem; }

html.dark .dark\:bg-slate-800 { background-color: #1e293b; }
html.dark .dark\:bg-slate-900 { background-color: #0f172a; }
html.dark .dark\:bg-slate-950 { background-color: #020617; }
html.dark .dark\:bg-slate-950\/90 { background-color: rgba(2, 6, 23, 0.9); }
html.dark .dark\:bg-emerald-950\/70 { background-color: rgba(6, 78, 59, 0.7); }
html.dark .dark\:bg-rose-950\/70 { background-color: rgba(76, 5, 25, 0.7); }

@media (prefers-color-scheme: dark) {
  :root:not(.light) body { background-color: #020617; color: #f8fafc; }
  :root:not(.light) .dark\:bg-slate-800 { background-color: #1e293b; }
  :root:not(.light) .dark\:bg-slate-900 { background-color: #0f172a; }
  :root:not(.light) .dark\:bg-slate-950 { background-color: #020617; }
  :root:not(.light) .dark\:bg-slate-950\/90 { background-color: rgba(2, 6, 23, 0.9); }
  :root:not(.light) .dark\:text-slate-100 { color: #f8fafc; }
  :root:not(.light) .dark\:text-slate-200 { color: #e2e8f0; }
  :root:not(.light) .dark\:text-slate-300 { color: #cbd5e1; }
  :root:not(.light) .dark\:text-slate-400 { color: #94a3b8; }
  :root:not(.light) .dark\:text-slate-500 { color: #64748b; }
  :root:not(.light) .dark\:text-sky-400 { color: #38bdf8; }
  :root:not(.light) .dark\:border-slate-600 { border-color: #475569; }
  :root:not(.light) .dark\:border-slate-700 { border-color: #334155; }
  :root:not(.light) .dark\:border-slate-800 { border-color: #1e293b; }
  :root:not(.light) .dark\:hover\:bg-slate-800:hover { background-color: #1e293b; }
}

/* Borders & Rounded */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-r { border-right-width: 1px; }
.border-dashed { border-style: dashed; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-400 { border-color: #94a3b8; }
.border-emerald-300 { border-color: #6ee7b7; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

html.dark .dark\:border-slate-600 { border-color: #475569; }
html.dark .dark\:border-slate-700 { border-color: #334155; }
html.dark .dark\:border-slate-800 { border-color: #1e293b; }
html.dark .dark\:border-emerald-700 { border-color: #047857; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Hover & Focus */
.hover\:underline:hover { text-decoration-line: underline; }
.hover\:bg-blue-500:hover { background-color: #3b82f6; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:border-sky-400:hover { border-color: #38bdf8; }
.hover\:text-sky-600:hover { color: #0284c7; }
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.cursor-pointer { cursor: pointer; }

html.dark .dark\:hover\:bg-slate-800:hover { background-color: #1e293b; }

/* Positioning & Layout */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.static { position: static; }
.inset-0 { inset: 0px; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-\[60\] { z-index: 60; }
.z-\[70\] { z-index: 70; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Modern SaaS Visual Enhancements & Category Design System
   ========================================================================== */

/* Category Gradient Badges & Icon Boxes */
.badge-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.badge-cat-dev { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.badge-cat-sec { background: linear-gradient(135deg, #10b981, #14b8a6); color: #fff; }
.badge-cat-media { background: linear-gradient(135deg, #ec4899, #f43f5e); color: #fff; }
.badge-cat-text { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; }
.badge-cat-net { background: linear-gradient(135deg, #06b6d4, #3b82f6); color: #fff; }
.badge-cat-doc { background: linear-gradient(135deg, #ef4444, #e11d48); color: #fff; }
.badge-cat-math { background: linear-gradient(135deg, #0284c7, #6366f1); color: #fff; }

.cat-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.cat-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.45rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.cat-filter-btn:hover {
  border-color: #38bdf8;
  color: var(--text-main);
  transform: translateY(-1px);
}
.cat-filter-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.star-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.5rem;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.star-toggle-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  transform: scale(1.12);
}
.star-toggle-btn.is-active {
  color: #f59e0b;
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.06);
}
html.dark .feature-card {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(30, 41, 59, 0.8);
}
html.dark .feature-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.4), 0 0 20px -2px rgba(56, 189, 248, 0.15);
}

.icon-box-dev { background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.18)); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.25); }
.icon-box-sec { background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(20, 184, 166, 0.18)); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.icon-box-media { background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(244, 63, 94, 0.18)); color: #ec4899; border: 1px solid rgba(236, 72, 153, 0.25); }
.icon-box-text { background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(234, 88, 12, 0.18)); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.25); }
.icon-box-net { background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(59, 130, 246, 0.18)); color: #0284c7; border: 1px solid rgba(6, 182, 212, 0.25); }
.icon-box-doc { background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(225, 29, 72, 0.18)); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.25); }
.icon-box-math { background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(99, 102, 241, 0.18)); color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.25); }

html.dark .icon-box-dev { color: #a5b4fc; background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.28)); border-color: rgba(99, 102, 241, 0.4); }
html.dark .icon-box-sec { color: #6ee7b7; background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(20, 184, 166, 0.28)); border-color: rgba(16, 185, 129, 0.4); }
html.dark .icon-box-media { color: #f9a8d4; background: linear-gradient(135deg, rgba(236, 72, 153, 0.22), rgba(244, 63, 94, 0.28)); border-color: rgba(236, 72, 153, 0.4); }
html.dark .icon-box-text { color: #fde68a; background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 88, 12, 0.28)); border-color: rgba(245, 158, 11, 0.4); }
html.dark .icon-box-net { color: #7dd3fc; background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.28)); border-color: rgba(6, 182, 212, 0.4); }
html.dark .icon-box-doc { color: #fda4af; background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(225, 29, 72, 0.28)); border-color: rgba(239, 68, 68, 0.4); }
html.dark .icon-box-math { color: #93c5fd; background: linear-gradient(135deg, rgba(2, 132, 199, 0.22), rgba(99, 102, 241, 0.28)); border-color: rgba(2, 132, 199, 0.4); }

/* Modern Card Interactions (Visual-First Compact Tile) */
.tool-card-modern {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 0.875rem 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03);
}
.tool-card-modern:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 10px 24px -4px rgba(56, 189, 248, 0.16), 0 0 0 1px rgba(56, 189, 248, 0.3);
}
html.dark .tool-card-modern {
  background: #090d16;
  border-color: #1e293b;
}
html.dark .tool-card-modern:hover {
  border-color: #38bdf8;
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.5), 0 0 18px -2px rgba(56, 189, 248, 0.25);
}

/* Gradient Hero Background */
.hero-gradient {
  background:
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(99, 102, 241, 0.14), transparent 60%),
    radial-gradient(ellipse 40% 30% at 85% 10%, rgba(56, 189, 248, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 30% at 15% 10%, rgba(236, 72, 153, 0.08), transparent 50%);
}

.text-gradient {
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.dark .text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}
html.dark .glass-panel {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(30, 41, 59, 0.8);
}

/* Mobile sidebar logic */
@media (max-width: 767px) {
  .max-md\:fixed { position: fixed; }
  .max-md\:inset-y-0 { top: 0px; bottom: 0px; }
  .max-md\:-left-full { left: -100%; }
  .max-md\:transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 250ms; }
  .md\:hidden { display: none !important; }
}
@media (min-width: 768px) {
  .md\:static { position: static !important; left: auto !important; }
}

#sidebar.open {
  left: 0 !important;
}

/* Zen mode */
body.zen-mode #sidebar,
body.zen-mode #sidebar-backdrop,
body.zen-mode header {
  display: none !important;
}
body.zen-mode #workspace {
  padding: 1rem !important;
  max-width: 100% !important;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
