/* device1.css - тёмный контрастный дизайн с тёплыми тонами */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #121212; /* Глубокий тёмный фон */
  color: #e0e0e0; /* Светло-серый текст */
  min-height: 100vh;
  padding: 20px;
  line-height: 1.5;
}

/* Контейнер */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Шапка */
.header {
  background: #1a1a1a; /* Тёмно-серый */
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header h1 {
  font-size: 1.4em;
  margin-bottom: 15px;
  color: #ff9800; /* Тёплый оранжевый */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.header-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-back {
  background: #333;
  color: #ff9800;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9em;
  border: 1px solid #444;
  transition: all 0.2s;
}

.btn-back:hover {
  background: #444;
  border-color: #ff9800;
}

.btn-logout {
  background: #d32f2f; /* Тёплый красный */
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: #f44336;
}

/* Панель устройства */
.device-panel {
  background: #1e1e1e; /* Тёмно-серый */
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

.panel-header h2 {
  color: #ffb74d; /* Тёплый светло-оранжевый */
  font-size: 1.2em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Статус устройства */
.device-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.device-status.online {
  background: #4CAF50;
  box-shadow: 0 0 8px #4CAF50;
}

/* Информация */
.device-info {
  background: #252525;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #333;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #333;
  font-size: 0.9em;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item .label {
  color: #9e9e9e; /* Серый */
}

.info-item .value {
  color: #ffcc80; /* Тёплый жёлтый */
  font-weight: 500;
}

/* Температура */
.temperature-display {
  text-align: center;
  margin: 15px 0;
}

.temp-value {
  font-size: 2.8em;
  font-weight: 700;
  color: #ff9800; /* Тёплый оранжевый */
  text-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.temp-unit {
  font-size: 0.5em;
  color: #ffb74d;
  vertical-align: super;
}

.temp-info {
  color: #b0b0b0;
  font-size: 0.85em;
  text-align: center;
  margin-top: 5px;
}

/* Управление LED */
.led-control {
  text-align: center;
}

.btn-led {
  background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%); /* Оранжевый градиент */
  color: #121212; /* Тёмный текст */
  border: none;
  border-radius: 10px;
  padding: 16px 24px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 auto 15px;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-led:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.btn-led.active {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%); /* Зелёный градиент */
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-led:disabled {
  background: #424242;
  color: #757575;
  cursor: not-allowed;
  box-shadow: none;
}

.led-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9em;
  color: #e0e0e0;
  background: #252525;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #333;
}

/* Индикаторы */
.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.led-on {
  background: #4CAF50;
  box-shadow: 0 0 10px #4CAF50;
}

.led-off {
  background: #f44336;
  box-shadow: 0 0 10px #f44336;
}

/* Подсказка */
.hint {
  color: #9e9e9e;
  font-size: 0.85em;
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* Оверлей авторизации */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-overlay.visible {
  display: flex;
}

.auth-modal {
  background: #1e1e1e;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
}

.auth-modal h3 {
  color: #ff9800;
  margin-bottom: 10px;
  font-size: 1.3em;
}

.auth-modal p {
  color: #b0b0b0;
  margin-bottom: 20px;
  font-size: 0.95em;
}

.btn-login {
  background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
  color: #121212;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

/* Адаптивность */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  .header h1 {
    font-size: 1.2em;
  }
  
  .device-panel {
    padding: 15px;
  }
  
  .temp-value {
    font-size: 2.4em;
  }
  
  .btn-led, .btn-login {
    padding: 14px 20px;
  }
}