/* ========================================= */
/* === Game of Life (/life)              === */
/* ========================================= */

.life-container {
    max-width: 1000px;
}

.rule-info {
    color: var(--text-muted);
    min-height: 1.4em;
    margin: 4px 0 8px;
}

.life-controls,
.life-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 10px 0;
}

.life-controls label,
.life-actions label {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.life-actions button,
#life_place {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--secondary-bg);
    color: var(--text);
    cursor: pointer;
    font-weight: bold;
}

.life-actions button:hover,
#life_place:hover { border-color: var(--accent); }

.life-actions button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.life-actions button.primary.running { background: #b02a37; border-color: #b02a37; }

#life_canvas {
    display: block;
    width: 100%;
    margin: 12px auto;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg);
    cursor: crosshair;
    touch-action: none; /* rita med fingret utan att sidan scrollar */
}

.life-stats {
    display: flex;
    justify-content: center;
    gap: 12px 40px;
    margin: 8px 0 0;
}

.life-stats div { text-align: center; }
.life-stats dt { font-size: 0.85rem; color: var(--text-muted); }
.life-stats dd { margin: 2px 0 0; font-size: 1.4rem; font-weight: bold; }
