/* =========================================
   HIVE 2.0 — СТИЛИ ЛИЧНОГО КАБИНЕТА (style.css)
   Дизайн: чёрный + соты + стеклянные медовые кнопки
   ========================================= */

/* СБРОС СТИЛЕЙ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* ОСНОВНОЙ ФОН: ЧЁРНЫЙ (за пределами контейнера) */
body {
  background-color: #050505;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* КОНТЕЙНЕР ПРИЛОЖЕНИЯ (мобильный вид) + фоновая картинка */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding: 20px 16px 40px;
  /* === НАСТРОЙКИ ФОНОВОЙ КАРТИНКИ === */
  background-image: url('honeycomb-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  /* === КОНЕЦ НАСТРОЕК ФОНА === */
}

/* УПРАВЛЕНИЕ ЭКРАНАМИ */
.screen {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
.screen.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ЦЕНТРИРОВКА КОНТЕНТА */
.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 40px;
}

/* ШАПКА: лого слева, кнопки справа */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 10px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: #FFC107;
  letter-spacing: 1px;
}
/* Картинка логотипа (logo.png). Если файла нет — index.html покажет 🐝 */
.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Блок кнопок справа в шапке (🔔 / ⚙️) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Круглая стеклянная кнопка-иконка */
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(172, 170, 165, 0.25);
  background: rgba(225, 226, 215, 0.082);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.icon-btn:hover,
.icon-btn:active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 200, 50, 0.5);
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.25);
  transform: scale(1.08);
}

/* ВИДЖЕТЫ «БАЛАНС» И «ПОДПИСКА» */
.widgets-row {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}
.widget {
  flex: 1;
  min-height: 100px;
  color: #ffffff;
  background: rgba(225, 226, 215, 0.082);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  border: 1px solid rgba(172, 170, 165, 0.2);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}
/* Квадратный виджет (выбор типа устройства) */
.widget-square {
  aspect-ratio: 1 / 1;
  min-height: 0;
}
.widget-balance {
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}
.widget-balance-rub {
  font-size: 13px;
  color: #aaaaaa;
}
.widget-sub-title {
  font-size: 13px;
  color: #aaaaaa;
}
.widget-sub-status {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
}
.widget-sub-days {
  font-size: 13px;
  color: #aaaaaa;
}

/* ЦВЕТА СТАТУСОВ */
.status-green  { color: #4ADE80; }
.status-yellow { color: #FFC107; }
.status-red    { color: #EF4444; }
.status-gray   { color: #9CA3AF; }

/* МЕДОВАЯ КНОПКА: прозрачная, с бликами по краям */
.btn-honey {
  min-width: 120px;
  height: 50px;
  border-radius: 50px;
  border: none;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  background: linear-gradient(180deg,
    rgba(176, 110, 34, 0.3) 0%,
    rgba(230, 154, 62, 0.5) 50%,
    rgba(247, 194, 107, 0.7) 100%);
  box-shadow:
    inset -1px -1px 1px rgba(255, 255, 255, 0.9),
    inset 2px 2px 3px rgba(255, 190, 100, 0.9),
    0 0 10px rgba(220, 150, 50, 0.3);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-honey:hover {
  box-shadow:
    inset -1px -1px 1px rgba(255, 255, 255, 1),
    inset 2px 2px 3px rgba(255, 200, 120, 1),
    0 0 20px rgba(230, 160, 60, 0.7);
  transform: scale(1.05);
}
.btn-honey:active {
  box-shadow:
    inset -1px -1px 1px rgba(255, 255, 255, 1),
    inset 2px 2px 3px rgba(255, 200, 120, 1),
    0 0 20px rgba(230, 160, 60, 0.7);
  transform: scale(0.97);
}
.btn-honey:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-honey-wide {
  width: 100%;
  margin-top: 16px;
}

/* ДВЕ КНОПКИ В РЯД (Пополнить + История) */
.buttons-row {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}
.btn-honey-half {
  flex: 1;
  padding: 14px 20px;
  font-size: 14px;
}

/* КАРТОЧКИ БЕЗ ПОДЛОЖКИ */
.card {
  margin-bottom: 20px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.card-subtitle {
  font-size: 13px;
  color: #888888;
  margin-bottom: 16px;
}

/* СТЕКЛЯННАЯ ПОДЛОЖКА (панель триала и «Пригласи друга») */
.referral-card {
  background: rgba(225, 226, 215, 0.082);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  border: 1px solid rgba(172, 170, 165, 0.2);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
}
.referral-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}
.referral-desc {
  font-size: 12px;
  color: #888888;
  line-height: 1.4;
  margin-bottom: 16px;
}
.referral-bonus {
  color: #FFC107;
  font-weight: 700;
}

/* УСТРОЙСТВА */
.device-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
/* Кнопка «Добавить» — в стиле стеклянной карточки */
.btn-add-device {
  background: rgba(122, 121, 115, 0.212);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  border: 1px solid rgba(172, 170, 165, 0.3);
  border-radius: 18px;
  padding: 8px 16px;
  font-size: 13px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-add-device:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}
.btn-add-device:active {
  background: rgba(122, 121, 115, 0.35);
}
/* Карточка устройства (pill-shape) */
.device-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 200, 50, 0.15);
  border-radius: 50px;
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.device-item:active {
  background: rgba(0, 0, 0, 0.6);
}
.device-icon {
  font-size: 32px;
}
.device-info {
  flex-grow: 1;
  text-align: left;
}
.device-name {
  font-size: 15px;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 4px;
}
.device-date {
  font-size: 12px;
  color: #888888;
}
/* Значок устройства картинкой (android.png / apple.png) — пригодится в Фазе B */
.device-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* EMAIL */
.email-card {
  text-align: center;
}
.email-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}
.email-desc {
  font-size: 12px;
  color: #888888;
  line-height: 1.4;
  margin-bottom: 16px;
}

/* ЗАГОЛОВКИ И ПОДЗАГОЛОВКИ */
h2 {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 12px;
}
.subtitle {
  font-size: 14px;
  color: #aaaaaa;
  line-height: 1.5;
  margin-bottom: 24px;
}
.big-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

/* TOAST (всплывашка в ЦЕНТРЕ экрана) */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(255, 193, 7, 0.95);
  color: #000000;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  max-width: 90%;
  text-align: center;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 193, 7, 0.4);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ЭКРАН ЗАГРУЗКИ (КРУТИЛКА): чёрный фон без сот, центр окна */
#screen-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #050505;
  z-index: 999;
}
#screen-loader.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
#screen-loader .center-content {
  padding-top: 0;
}
.loader-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255, 193, 7, 0.2);
  border-top-color: #FFC107;
  animation: spin 0.9s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* АДАПТИВНОСТЬ */
@media (max-width: 480px) {
  .app-container { max-width: 100%; }
}
@media (max-width: 380px) {
  .widget-balance { font-size: 28px; }
  .widget-sub-status { font-size: 20px; }
}
/* =========================================
   ФАЗА B: МЕДОВЫЙ ЦВЕТ ДЛЯ ВИДЖЕТОВ-КНОПОК
   (форма виджета прежняя, цвет — как у медовых кнопок)
   ========================================= */
.widget-honey {
  background: linear-gradient(180deg,
    rgba(176, 110, 34, 0.3) 0%,
    rgba(230, 154, 62, 0.5) 50%,
    rgba(247, 194, 107, 0.7) 100%);
  box-shadow:
    inset -1px -1px 1px rgba(255, 255, 255, 0.9),
    inset 2px 2px 3px rgba(255, 190, 100, 0.9),
    0 0 10px rgba(220, 150, 50, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.widget-honey:hover,
.widget-honey:active {
  box-shadow:
    inset -1px -1px 1px rgba(255, 255, 255, 1),
    inset 2px 2px 3px rgba(255, 200, 120, 1),
    0 0 20px rgba(230, 160, 60, 0.7);
  transform: scale(1.03);
}