body {min-width: 320px; max-width: 380px;}

/* Меню в гараже */

.garage-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 10px;
}

.garage-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;

    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

garage-btn:hover {
    border-color: #ff6699;
    box-shadow: 0 4px 8px rgb(255, 102, 153);
    transform: translateY(-2px);
    color: #ff6699;
}

/* */
.garage-statistics {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
}

/* Заголовки блоков для гонок — компактная версия */

.section-title {
    display: inline-block; /* чтобы не во всю ширину */
    background: linear-gradient(90deg, #ff6699, #ff66e6);
    color: #fff;
    font-weight: 900;
    font-size: 13px; /* как у тебя было */
    padding: 4px 18px; /* чуть больше горизонтально для ширины */
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.3);
    transform: skewX(-8deg); /* лёгкий эффект скорости */
    text-shadow: 1px 1px 2px #000;
    white-space: nowrap; /* текст не переносится */
}

.garage-car {
    margin: 0 5px;
    background-color: #ff6699; /* основной цвет */
    border-radius: 40px / 40px; /* делает блок овальным */
}



/* Общая панель */
.race-panel {
    overflow: hidden;
}

/* Навигация */
.race-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-link {
    flex: 1;
    text-align: center;

    font-weight: 600;
    font-size: 13px;
    padding: 10px 0;
    text-decoration: none;
    position: relative;
    transition: color 0.2s, transform 0.2s;
}

.nav-link.active {
    color: #000;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #ff6699, #ff66e6);
    box-shadow: 0 0 6px rgba(255, 102, 153, 0.8);
}

.nav-link:active {
    transform: scale(0.95);
}

/* HUD валют */
.race-hud {
    display: block;
    padding: 5px 0px;
    text-align: center;
}

.hud-item {
    background: #fff;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 5px;
    font-size: small;
    display: inline-block;
    color: #fff;
}

/* Уровень */
.level-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
}

.level-label {
    background: linear-gradient(135deg, #ff6699, #ff66e6);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 0 6px rgba(255, 102, 153, 0.4);
}

.progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.49);
    margin: 0 10px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff6699, #ff66e6);
    box-shadow: 0 0 6px rgba(255, 102, 153, 0.5);
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.percent {
    min-width: 38px;
    text-align: right;
    font-size: 13px;
    font-weight: bold;
}

/* Адаптивность */
@media (max-width: 400px) {
    .hud-item { font-size: 12px; padding: 3px 6px; }
    .level-bar { flex-wrap: wrap; gap: 4px; }
}

.brd1 {border: 0;}
.brd2 {border: 0;}

/* Гонки */

#race-container {
    width: 100%;
    height: 200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: #222222;
}

#track {
    position: absolute;
    top: 0;
    left: 0;
    width: 4000px; /* длина трассы */
    height: 100%;
    background-image: url('pda/road_402.png');
}

.car {
    position: absolute;
    width: 200px;
    height: 80px;
    background-size: cover;
    background-repeat: no-repeat;
}

#car-player {
    bottom: 10px;
    left: 50px; /* фиксировано! */
    z-index: 5;
}

#car-opponent {
    bottom: 30px;
    left: 50px; /* фиксировано! */
    z-index: 4;
}