/* Базовые сбросы */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* Контейнер игры */
#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1; /* базовый слой */
}

canvas {
    display: block;
}

/* Нижняя панель — фиксирована внизу, поверх всех */
#bottom-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    padding: 16px 20px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #000;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    text-align: center;
    font-size: 14px;
    z-index: 2000; /* должен быть выше game-container */
    pointer-events: auto;
}

.stats {
    margin-top: 6px;
    font-size: 13px;
    color: #444;
}

/* Стили для шкалы скорости */
.speed-gauge-container {
    width: 100%;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: visible;
    margin-top: 10px;
    position: relative;
    margin-bottom: 18px;
}

.speed-gauge-limit {
    height: 100%;
    background-color: #ff6b6b;
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.speed-gauge-current {
    height: 70%;
    background-color: #4ecdc4;
    width: 0%;
    border-radius: 8px;
    position: absolute;
    top: 15%;
    left: 0;
    transition: width 0.1s linear;
}

/* Стили для меток шкалы */
.speed-gauge-labels {
    position: absolute;
    bottom: -22px;
    width: 100%;
    height: 20px;
    pointer-events: none;
}

.label {
    position: absolute;
    left: 0;
    bottom: 0;
    transform: translateX(-50%);
    font-size: 11px;
    color: #666;
    padding: 1px 3px;
    border-radius: 3px;
    white-space: nowrap;
}

/* Стили для визуального разделения шкалы на части */
.speed-gauge-divisions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.division {
    position: absolute;
    top: 0;
    width: 1px;
    height: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    transform: translateY(50%);
}