/* Base */
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.font-geist-mono {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas, monospace;
}

/* Custom toggle switch */
.toggle-bg {
    transition: background-color 0.3s;
    cursor: pointer;
}

.toggle-dot {
    transition: transform 0.3s;
}

input[type="checkbox"]:not(:checked) + .toggle-bg {
    background-color: #374151;
}

input[type="checkbox"]:not(:checked) + .toggle-bg .toggle-dot {
    transform: translateX(0);
}

input[type="checkbox"]:checked + .toggle-bg {
    background-color: #4F46E5;
}

input[type="checkbox"]:checked + .toggle-bg .toggle-dot {
    transform: translateX(24px);
}

/* Range inputs */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;  
    background: #374151;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%; 
    background: #6366F1;
    cursor: pointer;
}

input[type=range]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #6366F1;
    cursor: pointer;
}

/* Button states */
.speed-btn.active,
.density-btn.active,
.difficulty-btn.active,
.theme-btn.active {
    background-color: #6366F1;
    color: white;
}

.tab-btn {
    transition: all 0.2s;
}

.tab-btn:hover {
    color: white;
}

/* Game animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

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

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

.animate-pulse {
    animation: pulse 1.5s infinite;
}

.animate-shake {
    animation: shake 0.5s;
}

.animate-fade-in {
    animation: fadeIn 0.3s forwards;
}

.animate-fade-out {
    animation: fadeOut 0.3s forwards;
}

.animate-slide-up {
    animation: slideUp 0.3s forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s forwards;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}
