/* General styling */
:root {
    --color-start: #07a16e;
    --color-end: #e43d3d;
    --color-wall: #252c38;
    --color-path: #e7970b;
}
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 56.25rem;
    margin: 2rem auto;
}

/* Control panel styling */
.controls-panel {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}
.mode-selector {
    display: flex;
    gap: 0.5rem;
}
.mode-selector button:not(.active) {
    background-color: transparent;
    color: var(--page-text);
    border-color: var(--border-color);
}
.mode-selector button.active {
    background-color: var(--primary-hover);
    box-shadow: 0 0 8px var(--primary-color);
}
#btn-reset {
    background-color: var(--secondary-color);
}
#btn-reset:hover {
    background-color: var(--secondary-hover);
}
.info-banner {
    color: var(--page-text);
    opacity: 0.8;
    font-size: 0.95rem;
    text-align: center;
}

/* Grid and cell styling */
#grid {
    display: grid;
    gap: 1px;
    background: var(--border-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    width: 100%;
    max-width: 50rem;
}
.cell {
    background: var(--container-bg);
    aspect-ratio: 1;
    transition: background-color 0.15s ease;
    cursor: pointer;
}
.cell.start {
    background: var(--color-start);
    border-radius: 4px;
}
.cell.end {
    background: var(--color-end);
    border-radius: 4px;
}
.cell.wall {
    background: var(--color-wall);
}
.cell.path {
    background: var(--color-path);
    animation: pathGlow 0.4s ease forwards;
}
@keyframes pathGlow {
    0% {
        transform: scale(0.7);
    }
    100% {
        transform: scale(1);
    }
}
