body {
    font-family: 'Inter', sans-serif;
}
code, .font-mono {
    font-family: 'JetBrains Mono', monospace;
}
.grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(232,121,249,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(232,121,249,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridScroll 20s linear infinite;
}
@keyframes gridScroll { 0% { transform: translate(0,0);} 100% { transform: translate(60px,60px);} }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
.nav-link { color: #94a3b8; border: 1px solid transparent; }
.nav-link:hover { color: #e2e8f0; background: rgba(30,41,59,0.5); }
.nav-link.active { color: #e879f9; background: rgba(232,121,249,0.1); border-color: rgba(232,121,249,0.2); }
.stat-card { transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
.stat-card:hover { transform: translateY(-2px); border-color: rgba(148,163,184,0.2); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3); }
.animate-pulse-slow { animation: pulseSlow 4s ease-in-out infinite; }
.animate-pulse-slow-delayed { animation: pulseSlow 4s ease-in-out infinite 2s; }
@keyframes pulseSlow { 0%,100% { opacity: 0.3; transform: scale(1);} 50% { opacity: 0.6; transform: scale(1.05);} }
.cog-node-item { transition: all 0.2s ease; animation: slideInCog 0.3s ease-out forwards; }
.cog-node-item:hover { background: rgba(30,41,59,0.5); }
@keyframes slideInCog { from { opacity: 0; transform: translateX(-10px);} to { opacity: 1; transform: translateX(0);} }
.log-entry { animation: fadeInLog 0.2s ease-out forwards; }
@keyframes fadeInLog { from { opacity: 0;} to { opacity: 1;} }
.code-block { background: #0a0f1c; border: 1px solid #1e293b; border-radius: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.tab-btn { background: rgba(15,23,42,0.5); color: #94a3b8; border: 1px solid #1e293b; }
.tab-btn:hover { color: #e2e8f0; border-color: #334155; }
.tab-btn.active { background: linear-gradient(135deg, #e879f9, #8b5cf6); color: white; border-color: transparent; }
.progress-ring { transform: rotate(-90deg); }
.progress-ring__circle { transition: stroke-dashoffset 0.8s ease; transform-origin: 50% 50%; }
.score-bar-bg { background: rgba(15,23,42,0.8); border-radius: 4px; overflow: hidden; height: 10px; }
.score-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }
#cogToast.show { transform: translateY(0); opacity: 1; }
#inverseCanvas { background: #0a0f1c; cursor: grab; }
#inverseCanvas:active { cursor: grabbing; }
.weak-point { animation: slideInWeak 0.3s ease-out forwards; }
@keyframes slideInWeak { from { opacity: 0; transform: translateY(5px);} to { opacity: 1; transform: translateY(0);} }
@keyframes cogPulse { 0%,100% { opacity: 0.5;} 50% { opacity: 1;} }
.cog-processing { animation: cogPulse 1s ease-in-out infinite; }
.ai-decision { animation: slideInDecision 0.3s ease-out forwards; }
@keyframes slideInDecision { from { opacity: 0; transform: translateX(-10px);} to { opacity: 1; transform: translateX(0);} }
#neuralCanvas { background: #0a0f1c; }
.mesh-toggle-bg { transition: background-color 0.3s ease; }
.mesh-toggle-bg.active { background-color: #22c55e; }
.mesh-toggle-knob { transition: transform 0.3s ease, background-color 0.3s ease; }
.mesh-toggle-knob.active { transform: translateX(1.5rem); background-color: #fff; }

@keyframes meshPulseActive {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}
.mesh-pulse-active { animation: meshPulseActive 2s ease-in-out infinite; }

@media (max-width: 768px) { .stat-card .text-2xl { font-size: 1.25rem; } }