:root {
    --neon-blue: #00ffff;
    --neon-pink: #ff00cc;
    --text-light: #ffffff;
  }

  /* ПК фон фиксированный */
body {
    margin: 0;
    padding: 20px;
    font-family: 'Russo One', sans-serif;
    background: url('/page.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Мобильные устройства — отдельный псевдоэлемент */
@media only screen and (max-width: 768px) {
    body::before {
        content: "";
        position: fixed;         /* фиксированная позиция */
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: url('/page-mobile.png') no-repeat center center;
        background-size: cover;
        z-index: -2;
        pointer-events: none;
    }

    body {
        background: none;        /* убираем основной фон */
    }
}

/* Дизайн заднего контейнера  */
  .container {
  position: relative;
  max-width: 450px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05); /* почти прозрачное стекло */
  padding: 20px 25px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 40px rgba(255,255,255,0.1); /* мягкая тень и свечение */
  backdrop-filter: blur(20px); /* размытие фона внутри контейнера */
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255,255,255,0.2); /* тонкая граница */
  z-index: 1;
}

/* Динамическая подсветка сзади контейнера */
.container::before {
  content: "";
  position: absolute;
  top: -25px;
  left: -25px;
  right: -25px;
  bottom: -25px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1); /* мягкий белый ореол */
  filter: blur(25px);
  opacity: 0.6;
  animation: glassPulse 4s ease-in-out infinite;
  z-index: -1;
}

@keyframes glassPulse {
  0%, 100% {
    filter: blur(25px);
    opacity: 0.6;
  }
  50% {
    filter: blur(30px);
    opacity: 0.8;
  }
}

/* =============================================== */
/* Заголовок */
  h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 20px;
  padding: 10px 20px;

  color: white;
  font-family: 'Russo One', sans-serif;

  /* стекло */
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.35);

  box-shadow:
    0 6px 18px rgba(0,0,0,0.25),
    0 0 22px rgba(255,255,255,0.35);

  text-shadow:
    0 1px 2px rgba(0,0,0,0.6);

  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}
/* =============================================== */

  form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: 'Russo One', sans-serif;
  }

  .form-group {
    display: flex;
    flex-direction: column;
  }

  label {
    font-size: 1rem;
    color: white;
    margin-bottom: 6px;
    font-family: 'Russo One', sans-serif;
  }
/* =============================================== */
/* Стиль строк */
input,
select {
  font-family: 'Russo One', sans-serif;
  font-size: 1.1rem;
  padding: 12px 16px;

  color: #ffffff;
  background: rgba(0, 0, 0, 0.65); /* ← темнее */

  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.08),
    0 4px 12px rgba(0,0,0,0.35);

  outline: none;
  appearance: none;
  transition: all 0.25s ease;
}

input:focus,
select:focus {
  background: rgba(0, 0, 0, 0.75); /* ещё чуть темнее */
  border-color: rgba(255,255,255,0.45);
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.12),
    0 0 16px rgba(255,255,255,0.35);
}

/* =============================================== */
/* Кнопки внизу из жидкого стекла */
  button {
  margin-top: 1px;
  padding: 16px 0;
  font-size: 1.4rem;

  /* стеклянный белый фон */
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  color: white;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 24px;

  cursor: pointer;
  font-family: 'Russo One', sans-serif;

  box-shadow:
    0 6px 18px rgba(0,0,0,0.25),
    0 0 22px rgba(255,255,255,0.35);

  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

button:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 28px rgba(0,0,0,0.35),
    0 0 32px rgba(255,255,255,0.55);
  transform: translateY(-2px);
}

button:active {
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.3),
    0 0 18px rgba(255,255,255,0.4);
  transform: translateY(0);
}
/* =============================================== */

.calculator-tab {
  display: none;
}

#neon-calculator {
  display: block; /* показываем по умолчанию только один */
}

.calculator-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

/* =============================================== */
/* Кнопки навигации сверху (выбора калькулятора) */

.tab-button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 12px; /* ещё меньше */
  border-radius: 12px; /* чуть меньше скругление */
  cursor: pointer;
  font-weight: 500;
  font-size: 13px; /* чуть меньше текста */
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.1),
    0 1px 4px rgba(0,0,0,0.12);
  margin: 5px; /* уменьшили расстояние между кнопками */
}

.tab-button:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.15),
    0 2px 6px rgba(0,0,0,0.15);
}

.tab-button.active {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.80); /* более заметная рамка */
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.50), /* мягкое свечение */
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    0 2px 6px rgba(0,0,0,0.15);
  color: #fff;
}

/* для маленьких надписей */
.tab-button small {
  display: block;
  font-size: 0.7em;              /* компактнее */
  color: rgba(255,255,255,0.6);   /* приглушённый, читаемый */
  margin-top: 2px;                 /* расстояние от основного текста */
  line-height: 1.1;
}

/* Фикс навигационных кнопок меню (чтобы не перебивались общими кнопками) */
#calculator-tabs .tab-button {
  display: inline-block !important;
  vertical-align: top !important;
  width: auto !important;
  padding: 8px 12px !important;
}

/* =============================================== */
/* Результат */
  #result {
  margin-top: 25px;
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff; /* белый текст */
  text-align: center;
  padding: 15px 10px;
  border-radius: 20px;

  /* стеклянный фон */
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);

  /* мягкая подсветка вокруг блока */
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.1),
    0 0 12px rgba(255,255,255,0.15);

  user-select: none;
  min-height: 50px;
  font-family: 'Russo One', sans-serif;
  position: relative;
  overflow: hidden;
}
/* =============================================== */
/* Расстояние между строками */
.form-group {
  margin-bottom: 2px;
}
/* =============================================== */
/* Чекбокс */
/* Основной контейнер на одной строке */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Надпись */
.checkbox-label {
  font-size: 1rem;
  color: #ffffff;
  margin: 0;
  line-height: 1;
  user-select: none;
}

/* Чекбокс — стекло */
.custom-checkbox {
  appearance: none;
  width: 22px;
  height: 22px;

  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.35);

  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.12),
    0 3px 8px rgba(0,0,0,0.35);

  cursor: pointer;
  position: relative;
  display: inline-block;
  vertical-align: middle;

  transition: all 0.25s ease;
}

.custom-checkbox:checked {
  background: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.8);

  box-shadow:
    0 0 0 2px rgba(255,255,255,0.25),
    0 0 14px rgba(255,255,255,0.55);
}

.custom-checkbox::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 13px;

  border: solid #111;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);

  opacity: 0;
  transition: opacity 0.2s ease;
}


.custom-checkbox:checked::after {
  opacity: 1;
}
/* =============================================== */

.hide-block {                               /* ПРОЗРАЧНАЯ РАМКА*/
    background: rgba(255, 255, 255, 0.15); /* чуть более непрозрачный фон */
    border-radius: 12px;                   /* скругление углов */
    padding: 10px 10px;                    /* внутренние отступы */
    margin-top: 0px;                        /* отступ сверху */
    border: 1px solid rgba(255, 255, 255, 0.25); /* лёгкая рамка */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* лёгкая тень */
    width: 100%;                            /* растягиваем на всю ширину родителя */
    box-sizing: border-box;                 /* padding учитывается внутри ширины */
  }

.disabled-soft {                    /* отображение блокировки строки */
  opacity: 0.35 !important;        /* делает строку блеклой */
  pointer-events: none !important; /* отключает клики */
  filter: grayscale(0.3);
}

#signType {
  width: 100%;
  max-width: 100%;
  white-space: nowrap;       /* текст в одну строку */
  overflow: hidden;          /* скрываем лишнее */
  text-overflow: ellipsis;   /* показываем "..." */
}



/*======= Стиль для меню выбора калькулятора ===========*/

/* =============================================== */
/* Стили кнопок табов меню */
/* Стили кнопок табов меню */
.calculator-tabs-menu {
  display: flex;
  flex-direction: column;
  width: 250px;
  margin: 0 auto;
}

.tab-button-menu {
  font-family: 'Russo One', sans-serif;
  font-size: 18px;
  font-weight: 500;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;

  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.15),
    0 4px 8px rgba(0,0,0,0.2);

  cursor: pointer;
  transition: all 0.25s ease;

  /* плотное расположение */
  margin-top: 15px; 
}

.tab-button-menu:first-child {
  margin-top: 0; /* первая кнопка без отрицательного отступа */
}

.tab-button-menu:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.2),
    0 4px 12px rgba(0,0,0,0.25);
}

.tab-button-menu.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255,255,255,0.5);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.25),
    0 4px 12px rgba(0,0,0,0.3);
}
/* =============================================== */

/* Остальные стили меню (например, скрытые вкладки) можно добавить сюда */
.calculator-tab {
  display: none;
}

#neon-calculator {
  display: block; /* по умолчанию показываем */
}


/* =============================================== */
/* Контейнер с деталями расчёта */
#detailsContainer {
  position: relative;
  margin-top: 10px;
  padding: 20px 25px;
  background: rgba(0, 0, 0, 0.60); /* затемнённый фон */
  backdrop-filter: blur(12px);
  border-radius: 14px;
  color: #fff; /* белый текст */
  display: none; /* по умолчанию скрыт */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  max-width: 600px;
  transition: all 0.3s ease;
}

/* Кнопка закрытия */
#closeDetailsBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.30); /* полупрозрачная белая */
  border: none;
  border-radius: 50%; /* круглая */
  font-size: 20px;
  font-weight: bold;
  color: #fff; /* белый крестик */
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#closeDetailsBtn:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: scale(1.2);
}

/* Текст внутри контейнера */
#detailsContainer p {
  margin: 5px 0;
  color: #fff; /* белый текст */
}

/* Горизонтальная линия */
#detailsContainer hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2); /* светлая линия */
  margin: 10px 0;
}

/* =============================================== */
/* ДЕТАЛИЗАЦИЯ ПО ФОРМУЛАМ */
/* Строка детализации */
/* Строка детализации */
.detail-row {
  margin: 6px 0;
  line-height: 1.4;
  color: #fff;
}

/* SVG иконка инфо */
.info-badge-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 5px;
  color: rgba(255, 255, 255, 0.7);
  cursor: help;
  position: relative;
  transition: color 0.2s ease;
}

.info-badge-svg:hover {
  color: #ffffff;
}

/* Подсказка (Tooltip) */
.info-badge-svg::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(15, 15, 20, 0.96);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: normal;
  
  /* Разрешаем переносы строк, а ширину делаем адаптивной под текст */
  white-space: pre-line;
  width: max-content;
  max-width: 380px;
  
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.info-badge-svg:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
/* =============================================== */
/* =============================================== */
/* Кнопка ИИ: Постоянная пульсация живого ядра */
#showAiAnalyticsBtn {
  position: relative;
  overflow: hidden;
  margin-top: 15px;
  width: 100%;
  z-index: 1;

  /* Базовый стеклянный стиль */
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.5s ease;
}

/* 1. ПОСТОЯННО ПУЛЬСИРУЮЩЕЕ ЯДРО СВЕТА ВНУТРИ */
#showAiAnalyticsBtn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 255, 213, 0.5) 0%,    /* Бирюзовый центр */
    rgba(122, 0, 255, 0.4) 35%,   /* Фиолетовая глубина */
    rgba(255, 0, 200, 0.25) 60%,  /* Мягкая маджента */
    transparent 80%
  );
  filter: blur(20px);
  opacity: 0.7; /* Видно сразу! */
  pointer-events: none;
  z-index: -1;
  /* Запускаем дыхание сразу при загрузке страницы */
  animation: internalPulse 3.5s ease-in-out infinite alternate;
  transition: opacity 0.5s ease, filter 0.5s ease;
}

/* 2. Сложившийся стеклянный блик (для ховера) */
#showAiAnalyticsBtn::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    135deg,
    transparent 45%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 55%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

/* 🔥 РЕАКЦИЯ ПРИ НАВЕДЕНИИ (Hover) */
#showAiAnalyticsBtn:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 213, 0.7);
  
  /* Усиливаем внешнюю неоновую ауру */
  box-shadow: 
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(0, 255, 213, 0.4),
    0 0 38px rgba(122, 0, 255, 0.3),
    inset 0 0 15px rgba(255, 255, 255, 0.25);
    
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.95);
}

/* При ховере ядро загорается еще сочнее */
#showAiAnalyticsBtn:hover::before {
  opacity: 1;
  filter: blur(16px);
}

/* Элегантный пролёт блика по стеклу при наведении */
#showAiAnalyticsBtn:hover::after {
  opacity: 1;
  transform: translate(35%, 35%);
}

/* ⚡ КЛИК (Active) */
#showAiAnalyticsBtn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(0, 255, 213, 0.6);
  transition: transform 0.1s ease;
}

/* 🫀 АНИМАЦИЯ ПОСТОЯННОЙ ПУЛЬСАЦИИ */
@keyframes internalPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.65;
  }
}
/* =============================================== */
/* Лоадер для ИИ окна */
.ai-loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  gap: 12px;
  color: #aaa;
}

.ai-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #00ffd5;
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
}

@keyframes aiSpin {
  to { transform: rotate(360deg); }
}

/* Кнопка закрытия внизу окна */
#closeAiAnalyticsBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.30); /* полупрозрачная белая */
    border: none;
    border-radius: 50%; /* круглая */
    font-size: 20px;
    font-weight: bold;
    color: #fff; /* белый крестик */
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#closeAiAnalyticsBtn:hover{
  background: rgba(255, 255, 255, 0.55);
  transform: scale(1.2);
}
/* =============================================== */
/* =============================================== */
/* Спиннер и динамический текст загрузки ИИ */
.ai-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 255, 213, 0.2);
  border-top: 3px solid #00ffd5; /* Бирюзовый цвет под неоновый стиль кнопки */
  border-radius: 50%;
  animation: spinner-spin 1s linear infinite;
  margin: 0 auto 12px auto;
}

@keyframes spinner-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ai-loading-text {
  transition: opacity 0.4s ease-in-out;
  font-size: 0.9em;
  color: #ffffff;
  min-height: 24px;
  font-family: 'Russo One', sans-serif;
  text-shadow: 0 0 8px rgba(0, 255, 213, 0.4);
}
/* =============================================== */
/* ====================================================== */
/*  КНОПКА С ХАОТИЧНЫМ ВЗРЫВОМ ЧАСТИЦ (ORGANIC SCATTER)   */
/* ====================================================== */

#showAiAnalyticsBtn {
  position: relative;
}

#showAiAnalyticsBtn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 99; 

  /* Полный хаос: асимметричные координаты, разная глубина и размытие */
  box-shadow: 
    -62px -48px  4px #00ffd5,  /* Далеко влево-вверх, четкая */
     28px -68px 12px #a855f7,  /* Близко вправо-вверх, мягкая */
    -95px  12px  8px #ff00c8,  /* Сильно влево */
     48px  22px  3px #00ffd5,  /* Четкая точка у самого края кнопки */
    -18px  78px 10px #00ffd5,  /* Вниз, мягкое пятно */
     84px  58px  6px #a855f7,  /* Вправо-вниз */
    -125px 38px  7px #a855f7,  /* Далекий вылет влево */
     112px -18px 9px #00ffd5,  /* Далекий вылет вправо-вверх */
     -8px  42px  2px #ff00c8,  /* Маленькая четкая искринка прямо под центром */
    -42px -18px 11px #ff00c8,  /* Внутренняя туманность */
     72px -45px  5px #ff00c8,  /* Четкий спот вверху справа */
     15px  92px  8px #00ffd5;  /* Вылет прямо вниз */

  /* Общий неоновый шлейф */
  filter: drop-shadow(0 0 10px #00ffd5) drop-shadow(0 0 16px #ff00c8);
      
  transform: translate3d(-50%, -50%, 0) scale(0.2);
  will-change: transform, opacity;
}

/* Динамичный неравномерный разлёт */
#showAiAnalyticsBtn:active::after {
  animation: cssParticlesScatterChaos 0.85s cubic-bezier(0.12, 0.85, 0.25, 1) forwards;
}

@keyframes cssParticlesScatterChaos {
  0% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(0.3) rotate(0deg);
  }
  35% {
    opacity: 1;
    /* Небольшой поворот на старте придает хаотичное закручивание */
    transform: translate3d(-48%, -55%, 0) scale(1.6) rotate(-12deg);
  }
  100% {
    opacity: 0;
    /* Разлет с легким смещением оси */
    transform: translate3d(-52%, 60px, 0) scale(3.2) rotate(15deg);
  }
}
/* ====================================================== */
/*  АНИМАЦИЯ: ШЕЛКОВИСТАЯ СТЕКАЮЩАЯ КАПЛЯ (ОТКРЫТИЕ И ЗАКРЫТИЕ) */
/* ====================================================== */

#aiAnalyticsContainer {
  position: relative;
  background: rgba(18, 16, 38, 0.75) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border-radius: 18px;
  box-sizing: border-box;
  padding: 16px;
  color: #fff;
  border: none;
  
  /* Точка прикрепления капли — строго по центру верхнего края */
  transform-origin: top center;
  will-change: transform, opacity;
  
  /* Анимация ПОЯВЛЕНИЯ (стекание капли вниз) */
  animation: liquidFlowIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Анимация ЗАКРЫТИЯ (втягивание капли обратно в кнопку) */
#aiAnalyticsContainer.closing {
  animation: liquidFlowOut 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards !important;
}

/* 💧 ПОЯВЛЕНИЕ: МЯГКОЕ СТЕКАНИЕ ВНИЗ */
@keyframes liquidFlowIn {
  0% {
    opacity: 0;
    transform: scale(0.3, 0.08);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1, 1);
  }
}

/* 💧 ЗАКРЫТИЕ: ВТЯГИВАНИЕ ОБРАТНО В КНОПКУ */
@keyframes liquidFlowOut {
  0% {
    opacity: 1;
    transform: scale(1, 1);
  }
  60% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: scale(0.3, 0.08);
  }
}

/* Убираем жесткую каёмку */
#aiAnalyticsContainer::before {
  display: none;
}

/* Мягкое переливающееся свечение вокруг контейнера */
#aiAnalyticsContainer::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 21px;
  background: 
    radial-gradient(circle at 10% 20%, rgba(0, 255, 213, 0.55) 0%, transparent 50%),
    radial-gradient(circle at 90% 15%, rgba(168, 85, 247, 0.55) 0%, transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(255, 0, 200, 0.55) 0%, transparent 50%),
    radial-gradient(circle at 15% 80%, rgba(0, 150, 255, 0.55) 0%, transparent 50%);
  background-size: 200% 200%;
  filter: blur(12px);
  opacity: 0.7;
  z-index: -1;
  pointer-events: none;
  animation: pulsePlasma 6s ease-in-out infinite alternate;
}

@keyframes pulsePlasma {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 50% 100%; }
}
/* ====================================================== */
/*  ДЫШАЩЕЕ НЕЙРО-ЯДРО (ИДЕАЛЬНО ДЛЯ AI ЗАГРУЗКИ)        */
/* ====================================================== */

.ai-spinner {
  width: 20px;
  height: 20px;
  margin: 10px auto 16px auto;
  border-radius: 50%;
  
  /* Переливающийся неоновый градиент внутри ядра */
  background: radial-gradient(circle, #00ffd5 0%, #a855f7 100%);
  
  /* Убираем старую рамку */
  border: none;
  
  /* Мягкая объёмная неоновая аура */
  box-shadow: 0 0 12px rgba(0, 255, 213, 0.8), 0 0 24px rgba(168, 85, 247, 0.6);
  
  /* Плавная «дышащая» анимация */
  animation: aiPulseCore 1.5s ease-in-out infinite alternate;
}

@keyframes aiPulseCore {
  0% {
    transform: scale(0.75);
    opacity: 0.4;
    box-shadow: 0 0 6px rgba(0, 255, 213, 0.3), 0 0 12px rgba(168, 85, 247, 0.2);
  }
  50% {
    opacity: 0.85;
  }
  100% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 18px rgba(0, 255, 213, 0.95), 0 0 36px rgba(168, 85, 247, 0.85);
  }
}

/* ====================================================== */

/* ====================================================== */
/* AI PROVIDER TOGGLE SWITCH */
/* ====================================================== */
#aiProviderToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  margin-bottom: 0;
  box-sizing: border-box;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.ai-provider-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-switch-option {
  font-size: 0.78em;
  font-family: 'Russo One', sans-serif;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.ai-switch-option.active {
  color: #ffffff;
}

.ai-switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: rgba(0, 255, 213, 0.15);
  border: 1px solid rgba(0, 255, 213, 0.35);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 255, 213, 0.2);
  flex-shrink: 0;
}

.ai-switch-track.gemini-active {
  background: rgba(66, 133, 244, 0.15);
  border-color: rgba(66, 133, 244, 0.45);
  box-shadow: 0 0 8px rgba(66, 133, 244, 0.25);
}

.ai-switch-thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #00ffd5 0%, #00bfa5 100%);
  box-shadow: 0 0 8px rgba(0, 255, 213, 0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.ai-switch-thumb.gemini-active {
  transform: translateY(-50%) translateX(18px);
  background: radial-gradient(circle, #74b3ff 0%, #4285f4 100%);
  box-shadow: 0 0 8px rgba(66, 133, 244, 0.9);
}
/* ====================================================== */

#mountCountGroup input,
#pipeLengthGroup input {
  width: 100%;
  box-sizing: border-box;
}

/* ====================================================== */
