/* Общие стили и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* Поддержка iOS safe area */
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
}

/* Главный контейнер */
.container {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Контейнер для gauge */
.gauge-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* SVG Gauge */
.gauge {
    width: 100%;
    max-width: 350px;
    height: auto;
}

/* Метки на gauge */
.gauge-label {
    font-size: 12px;
    font-weight: bold;
    fill: #333;
    text-anchor: middle;
}

/* Анимация стрелки */
#needle {
    transform-origin: 100px 100px;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Иконки */
.toxicity-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

/* Скрытие иконок */
.toxicity-icon.hidden {
    display: none;
}

/* Цвета иконок для разных зон */
.icon-leaf {
    color: #4CAF50; /* Зелёный */
}

.icon-alert {
    color: #FFC107; /* Жёлтый */
}

.icon-radiation {
    color: #F44336; /* Красный */
}

/* Контейнер кнопок */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

/* Версия */
.version {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}

/* Кнопки */
.btn {
    width: 70px;
    height: 70px;
    font-size: 32px;
    font-weight: bold;
    border: 3px solid #333;
    border-radius: 10px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    background: #f5f5f5;
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    .toxicity-icon {
        width: 42px;
        height: 42px;
    }

    .btn {
        width: 65px;
        height: 65px;
        font-size: 28px;
    }
}

/* Адаптивность для смартфонов */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 25px 15px;
        gap: 20px;
    }

    .toxicity-icon {
        width: 38px;
        height: 38px;
    }

    .controls {
        gap: 10px;
    }

    .btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
        border-width: 2px;
    }

    .gauge-label {
        font-size: 10px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .toxicity-icon {
        width: 36px;
        height: 36px;
    }

    .btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .controls {
        gap: 8px;
    }
}
