

.top-bar {
    width: 100%;
    height: 50px;
    background: rgba(24, 24, 27, 0.9);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 20;
    flex-shrink: 0;
}

.top-controls {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    background: #1e1b29;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-sm:hover {
    background: var(--accent-purple);
}

.map-container {
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 600px;
    border: 4px solid var(--border-color);
    overflow: auto;
    position: relative;
    background: #000;
    margin: auto; /* This centers the map vertically and horizontally in the flex area */
}

.grid-layer {
    position: relative;
    display: grid;
}

.grid-cell {
    width: var(--cell-size);
    height: var(--cell-size);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.grid-cell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.grid-cell.wall { background: #334155; }

/* Map Types */
.grid-cell.white-zone {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.grid-cell.black-zone {
    background: rgba(20, 0, 0, 0.6);
    border: 1px solid rgba(100, 0, 0, 0.3);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

.grid-cell.altar {
    background: #292524;
    border: 1px solid #78716c;
}

.grid-cell svg { width: 60%; height: 60%; }

/* Vision Layer */
.vision-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.vision-cell {
    position: absolute;
    width: var(--cell-size);
    height: var(--cell-size);
    pointer-events: none;
}

.vision-blue-30 {
    background-color: rgba(6, 182, 212, 0.2);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.vision-blue-70 {
    background-color: rgba(6, 182, 212, 0.6);
    border: 1px solid rgba(6, 182, 212, 0.8);
    box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.5);
}

.vision-red-30 {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.vision-red-70 {
    background-color: rgba(239, 68, 68, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.8);
    box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Edge Obstacle Layer */
.edge-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.edge-wall {
    position: absolute;
    background: var(--accent-purple);
    box-shadow: 0 0 5px var(--accent-pink);
}

.edge-wall.v {
    width: 4px;
    height: var(--cell-size);
    transform: translateX(38px); 
}

.edge-wall.h {
    width: var(--cell-size);
    height: 4px;
    transform: translateY(38px);
}
