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

body {
    width: 240px;
    height: 282px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 12px;
    background: #0a0a0a;
    color: #fff;
    overflow: hidden;
    margin: 0;
}

button {
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.maze-app {
    width: 100%;
    height: 100%;
    border: 5px solid #00ff88;
    background: #0d1014;
    display: flex;
    flex-direction: column;
}

.maze-header {
    height: 38px;
    padding: 4px 7px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #26313b;
    background: #151a20;
}

.maze-header h1 {
    font-size: 13px;
    line-height: 1;
    margin-bottom: 2px;
}

.maze-main {
    flex: 1;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#mazeCanvas {
    width: 220px;
    height: 148px;
    border: 1px solid #33414d;
    border-radius: 6px;
    background: #101418;
    display: block;
}

.hud-row {
    display: flex;
    gap: 4px;
}

.hud-row-compact .hud-box {
    padding: 3px 4px;
}

.hud-box {
    flex: 1;
    background: #171d24;
    border: 1px solid #2b3741;
    border-radius: 6px;
    padding: 4px 5px;
    min-width: 0;
}

.status-box {
    width: 100%;
}

.compact-status-box {
    flex: 1.2;
}

.hud-label {
    display: block;
    font-size: 8px;
    color: #8ea0b0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hud-value {
    display: block;
    font-size: 10px;
    color: #f4f7fa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sensor-debug {
    background: #121820;
    border: 1px solid #25303a;
    border-radius: 5px;
    padding: 2px 5px;
}

.help-text {
    font-size: 9px;
    color: #97a6b3;
    text-align: center;
}

.mode-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: bold;
}

.mode-badge.mock {
    background: #3a2a00;
    color: #ffd24d;
    border: 1px solid #8a6d00;
}

.mode-badge.live {
    background: #00331a;
    color: #6dffb3;
    border: 1px solid #00aa55;
}

.mock-controls {
    min-height: 0;
}

.mock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.mini-button {
    padding: 5px 6px;
    background: #33414d;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
}

.mini-button:hover {
    background: #40505e;
}
