* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    padding: 18px;
    background-color: #f8f9fa;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
}

.controls {
    margin-top: 0;
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

#phenotype-selector {
    padding: 7px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 150px;
}

button {
    padding: 7px 14px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    width: 70px;
    text-align: center;
}

button:hover {
    background-color: #0056b3;
}

#speed-slider {
    width: 200px;
}

.control-group:last-child {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-end;
}

.visualization {
    display: flex;
    gap: 18px;
    padding: 24px;
    background: white;
    border-radius: 7px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#maze {
    flex: 0 0 auto;
}

#maze svg {
    background-color: white;
}

#metrics {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    margin-right: 12px;
    max-width: 360px;
}

#metrics h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.graph-container {
    padding: 0;
    background: none;
}

.graph-container h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.graph-container svg {
    width: 100%;
    height: 100%;
}

#open-arms-graph,
#closed-arms-graph,
#total-graph {
    width: 100%;
    height: 135px;
    margin-bottom: 18px;
}

.maze-cell {
    stroke: #ddd;
}

.open-arm, .closed-arm, .center-zone {
    pointer-events: none;
}

.mouse {
    fill: red;
    r: 5;
    transition: cx 0.2s, cy 0.2s;
}

.line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.grid line {
    stroke: #ddd;
    stroke-opacity: 0.1;
}

.grid path {
    stroke-width: 0;
}

.x-axis path,
.y-axis path,
.x-axis line,
.y-axis line {
    stroke: #ccc;
}

.x-axis text,
.y-axis text {
    font-size: 12px;
    fill: #666;
}

.grid-cell {
    pointer-events: none;
}

#open-arms-graph .line {
    stroke: #387A96;
}

#closed-arms-graph .line {
    stroke: #BE514E;
}

#total-graph .line {
    stroke: #BE94C8;
}
