/* ══════════════════════════════════════════
   THEMES — переопределения CSS-переменных
   Подключается после base.css.
   Переключение: class на <body>.
══════════════════════════════════════════ */

/* ────────────────────────────────────────
   ТЁМНЫЙ ШТАБ (default — уже в :root)
   body без класса темы
──────────────────────────────────────────*/

/* ────────────────────────────────────────
   НОЧНОЙ СИНИЙ
   Глубокий космос, электро-синий акцент
──────────────────────────────────────────*/
body.theme-night-blue {
  --gold:      #3d7fff;
  --gold-hi:   #60a0ff;
  --gold-lo:   #1f4abf;

  --steel:     #161e38;
  --steel-hi:  #202e52;
  --steel-lo:  #0b1025;

  --teal:      #00c9e4;

  --bg:        #06080f;
  --bg2:       #0b1020;

  --txt:       #98b4d4;
  --txt-hi:    #cce0ff;
  --txt-lo:    #3d5578;

  --green:     #22cc88;
  --red:       #e04040;
  --orange:    #e8832a;

  --radius:    3px;
}

/* ────────────────────────────────────────
   КИНО
   Ультра-тёмный, красный акцент, янтарь
──────────────────────────────────────────*/
body.theme-cinema {
  --gold:      #c42020;
  --gold-hi:   #e83535;
  --gold-lo:   #881010;

  --steel:     #281414;
  --steel-hi:  #381c1c;
  --steel-lo:  #180a0a;

  --teal:      #b87820;

  --bg:        #0a0808;
  --bg2:       #140e0e;

  --txt:       #c8b0a0;
  --txt-hi:    #ecddd0;
  --txt-lo:    #7a5a50;

  --green:     #2fd67a;
  --red:       #ff4444;
  --orange:    #e0a020;

  --radius:    0;
}

/* Кино: бегущие строки — чуть теплее */
body.theme-cinema .scanlines {
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,.018) 3px, rgba(0,0,0,.018) 6px
  );
}

/* ────────────────────────────────────────
   ТЁПЛЫЙ КРАФТ
   Тёмно-коричневый, обожжённый апельсин
──────────────────────────────────────────*/
body.theme-warm-craft {
  --gold:      #d07830;
  --gold-hi:   #f09848;
  --gold-lo:   #8a4a10;

  --steel:     #362014;
  --steel-hi:  #4a2e1c;
  --steel-lo:  #20130a;

  --teal:      #5a8a60;

  --bg:        #180f08;
  --bg2:       #21160e;

  --txt:       #d0baa0;
  --txt-hi:    #ecd8bc;
  --txt-lo:    #8a7060;

  --green:     #5ac870;
  --red:       #e04040;
  --orange:    #e09020;

  --radius:    4px;
}

/* ────────────────────────────────────────
   СВЕТЛАЯ СТУДИЯ
   Тёплый белый, темно-синий акцент
──────────────────────────────────────────*/
body.theme-light {
  --gold:      #2244aa;
  --gold-hi:   #3360dd;
  --gold-lo:   #112266;

  --steel:     #c8c4bc;
  --steel-hi:  #b0aca4;
  --steel-lo:  #d8d6d0;

  --teal:      #1a7a9a;

  --bg:        #f0ede6;
  --bg2:       #e6e2db;

  --txt:       #28241e;
  --txt-hi:    #0a0806;
  --txt-lo:    #7a7870;

  --green:     #1aa85a;
  --red:       #cc2222;
  --orange:    #c86020;

  --radius:    6px;
}

/* Светлая: скрываем scanlines — на белом фоне не нужны */
body.theme-light .scanlines { display: none; }

/* Светлая: инвертируем тёмные оверлеи */
body.theme-light .tb-map-overlay { background: rgba(240,237,230,.6); }

/* Светлая: тёмный фон под иконки навбара */
body.theme-light .nav-bar {
  background: var(--bg2);
  border-top: 1px solid var(--steel);
}

/* Светлая: тёмный текст в инпутах */
body.theme-light input,
body.theme-light select,
body.theme-light textarea {
  background: #fff;
  color: var(--txt);
  border-color: var(--steel);
}
body.theme-light input::placeholder,
body.theme-light textarea::placeholder { color: var(--txt-lo); }

/* Светлая: оверлеи попапов более прозрачные */
body.theme-light .mt-modal-overlay,
body.theme-light .kb-modal-overlay,
body.theme-light .portal-root [class*="-overlay"] {
  background: rgba(0,0,0,.25) !important;
}

/* Светлая: фон карточек с чёткими границами */
body.theme-light [class*="-card"],
body.theme-light [class*="-panel"],
body.theme-light [class*="-section"] {
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* Светлая: статусные цвета — немного насыщеннее на светлом */
body.theme-light .mt-chat-text,
body.theme-light .ob-card-title,
body.theme-light .kb-task-title {
  color: var(--txt-hi);
}

/* Светлая: бар прокрутки */
body.theme-light ::-webkit-scrollbar-track { background: var(--steel-lo); }
body.theme-light ::-webkit-scrollbar-thumb { background: var(--steel); }
