/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c2461, #1e3799);
    color: white;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

/* Шапка */
header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 25px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: gray;
    animation: pulse 2s infinite;
}

.status-dot.connected { background: #4CAF50; animation: none; }
.status-dot.connecting { background: #FF9800; }
.status-dot.error { background: #F44336; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Карточки */
.card {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.card h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #E3F2FD;
}

.card-info {
    background: rgba(0, 0, 0, 0.2);
}

/* Температура */
.temp-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.temp-value {
    font-size: 4rem;
    font-weight: bold;
    color: #FF9800;
}

.temp-unit {
    font-size: 2rem;
    color: #BBDEFB;
}

.temp-label {
    text-align: center;
    color: #BBDEFB;
    margin-bottom: 20px;
}

/* Слайдер */
.slider-container {
    margin-top: 25px;
}

input[type="range"] {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: 3px solid white;
}

.slider-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #BBDEFB;
}

/* Кнопки */
.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.btn {
    padding: 15px;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-power {
    background: linear-gradient(135deg, #F44336, #E91E63);
}

.btn-boost {
    background: linear-gradient(135deg, #FF9800, #FF5722);
}

.btn-auto {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-top: 15px;
}

.btn-primary {
    background: #2196F3;
}

.btn-secondary {
    background: #757575;
}

.btn-icon {
    font-size: 1.8rem;
}

.btn-text {
    font-size: 0.9rem;
}

/* Параметры */
.params-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.param {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.param-label {
    font-size: 0.9rem;
    color: #BBDEFB;
    margin-bottom: 5px;
}

.param-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4CAF50;
}

.param-unit {
    font-size: 0.9rem;
    color: #BBDEFB;
    margin-top: 5px;
}

/* Информационные строки */
.info-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-line:last-child {
    border-bottom: none;
}

/* Подвал */
footer {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    color: #BBDEFB;
    font-size: 0.9rem;
}

.footer-info {
    display: flex;
    justify-content: space-between;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a237e, #283593);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
}

.modal h3 {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #E3F2FD;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #2196F3;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-buttons .btn {
    flex: 1;
    padding: 12px;
}

/* Кнопка настроек (FAB) */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2196F3;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.3);
    transition: all 0.3s;
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(33, 150, 243, 0.4);
}

/* Адаптивность */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .temp-value {
        font-size: 3rem;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
    
    .params-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
    }
}