body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    height: 100vh;
    background-color: #f8f9fa;
}

#sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 1px solid #dee2e6;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 20px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

.nav-item {
    padding: 10px 20px;
    cursor: pointer;
    color: #495057;
    transition: background-color 0.2s;
}

.nav-item:hover {
    background-color: #e9ecef;
}

.nav-item.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    border-right: 3px solid #0d6efd;
}

#content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 50px);
    gap: 5px;
    margin: 20px auto;
    width: fit-content;
}

.cell {
    width: 50px;
    height: 50px;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background-color: #fff;
    position: relative;
}

.cell.forbidden { background-color: #000; color: #fff; } /* Black for forbidden/obstacle */
.cell.target { background-color: #0d6efd; color: #fff; }
.cell.wall { background-color: #6c757d; }

/* Heatmap colors */
.cell-value {
    font-size: 12px;
    position: absolute;
    bottom: 2px;
    right: 2px;
    color: #333;
}

.controls {
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

button {
    padding: 8px 16px;
    border: 1px solid #ced4da;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

button.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

input[type="range"] {
    width: 100%;
}

.legend {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-box {
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
}

.hidden {
    display: none;
}
