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

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

header {
    height: 92px;
    background: #dd3737;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: absolute;
    z-index: 999;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.logo-img {
    height: 50px;
    width: auto;
}

.add-problem {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 10px 24px;
    border-radius: 40px;
    transition: all 0.3s;
}

.add-problem:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

#map {
    width: 100%;
    height: 100vh;
}

/* Шкала качества в левом нижнем углу */
.quality-panel {
    position: absolute;
    left: 20px;
    bottom: 20px;
    width: 280px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    z-index: 999;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
    transition: all 0.3s ease;
}

.quality-panel.collapsed {
    transform: translateX(-300px);
    opacity: 0;
    pointer-events: none;
}

/* Кнопка показа шкалы */
.show-quality-btn {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 1000;
    background: #dd3737;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 18px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.2s;
    display: none;
}

.show-quality-btn:hover {
    background: #bb2e2e;
    transform: scale(1.02);
}

.show-quality-btn.visible {
    display: block;
}

.title {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    margin-bottom: 5px;
}

.status {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quality-value-container {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 10px 0;
}

.quality-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    transition: color 0.3s;
}

.quality-percent {
    font-size: 24px;
    font-weight: 600;
    color: #666;
}

.quality-text {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.gradient-container {
    position: relative;
    margin: 15px 0;
}

.gradient {
    width: 100%;
    height: 20px;
    background: linear-gradient(to right, 
        #ed4543 0%,
        #ff8c00 25%,
        #ffd21e 40%,
        #7cb342 61%,
        #00a63f 81%,
        #00a63f 100%);
    border-radius: 10px;
    position: relative;
}

.gradient-marker {
    position: absolute;
    width: 6px;
    height: 26px;
    background: #333;
    border-radius: 3px;
    top: -3px;
    transform: translateX(-50%);
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    display: none;
}

.gradient-scale {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 500;
    color: #555;
    margin-top: 5px;
}

.gradient-scale span {
    position: relative;
}

.gradient-scale span::before {
    content: '↓';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
}

.gradient-scale span:nth-child(1)::before { color: #ed4543; }
.gradient-scale span:nth-child(2)::before { color: #ff8c00; }
.gradient-scale span:nth-child(3)::before { color: #ffd21e; }
.gradient-scale span:nth-child(4)::before { color: #7cb342; }
.gradient-scale span:nth-child(5)::before { color: #00a63f; }

.info-text {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Кнопка скрытия шкалы внутри панели */
.hide-quality-btn {
    width: 100%;
    background: #dd3737;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.2s;
}

.hide-quality-btn:hover {
    background: #bb2e2e;
    transform: scale(1.02);
}

/* Панель управления типом карты */
.map-controls-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: white;
    border-radius: 30px;
    padding: 8px 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    display: flex;
    gap: 8px;
}

.map-type-btn {
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    background: #f0f0f0;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.map-type-btn.active {
    background: #dd3737;
    color: white;
}

@media (max-width: 768px) {
    header { height: 60px; padding: 0 15px; }
    .logo-img { height: 35px; }
    .add-problem { font-size: 14px; padding: 6px 16px; }
    .quality-panel { width: 240px; padding: 15px; left: 10px; bottom: 10px; }
    .quality-value { font-size: 40px; }
    .quality-percent { font-size: 18px; }
    .map-controls-panel { bottom: 10px; right: 10px; padding: 6px 10px; }
    .map-type-btn { padding: 5px 12px; font-size: 11px; }
}
