/* Global Styles */
body {
    background-color: #F3F4F6;
    /* Gray 100 fallback */
    background-image: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 20%);
}

/* Glassmorphism utility via CSS variable composition if needed, 
   but mainly using Tailwind's backdrop-filter classes in HTML. 
   Here we just add some custom scrollbar styling. */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Range Slider Customization */
input[type=range] {
    -webkit-appearance: none;
    /* Hides the slider so that custom slider can be made */
    width: 100%;
    /* Specific width is required for Firefox. */
    background: transparent;
    /* Otherwise white in Chrome */
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    margin-top: -6px;
    /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #E5E7EB;
    border-radius: 2px;
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background: #D1D5DB;
}

/* Firefox Range Slider */
input[type=range]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #E5E7EB;
    border-radius: 2px;
    border: none;
}

input[type=range]:focus::-moz-range-track {
    background: #D1D5DB;
}

/* Card Hover Effects */
.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Canvas Crispness - only for agent simulation canvas */
canvas#agent-world {
    image-rendering: pixelated;
    image-rendering: crisp-edges; /* Firefox */
}

/* Scrollbar for Detail Panel */
aside .life-log::-webkit-scrollbar {
    width: 6px;
}

aside .life-log::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}