/* ============================================================
   ПЕРЕМЕННЫЕ — СВЕТЛАЯ ТЕМА (fallback для браузера)
   В Telegram эти значения перезаписываются telegram-web-app.js
   ============================================================ */
:root {
  /* Telegram стандартные переменные (iOS Light) */
  --tg-theme-bg-color: #efeff4;
  --tg-theme-secondary-bg-color: #ffffff;
  --tg-theme-text-color: #000000;
  --tg-theme-hint-color: #8e8e93;
  --tg-theme-link-color: #007aff;
  --tg-theme-button-color: #007aff;
  --tg-theme-button-text-color: #ffffff;
  --tg-theme-header-bg-color: #f2f2f7;
  --tg-theme-accent-text-color: #007aff;
  --tg-theme-section-bg-color: #ffffff;
  --tg-theme-section-header-text-color: #6d6d72;
  --tg-theme-subtitle-text-color: #8e8e93;
  --tg-theme-destructive-text-color: #ff3b30;
  --tg-theme-bottom-bar-bg-color: #f2f2f7;
  --tg-viewport-stable-height: 100vh;
  --tg-safe-area-inset-top: 0px;
  --tg-safe-area-inset-bottom: 0px;
  --tg-content-safe-area-inset-top: 0px;
  --tg-content-safe-area-inset-bottom: 0px;

  /* Собственные переменные приложения */
  --app-radius-sm: 8px;
  --app-radius: 12px;
  --app-radius-lg: 18px;
  --app-radius-xl: 24px;
  --app-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  --app-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --app-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --app-top-bar-height: 56px;
  --app-bottom-bar-height: 60px;

  /* Цвета аватаров */
  --avatar-blue: #5865f2;
  --avatar-green: #3ba55c;
  --avatar-orange: #ed7b3a;
  --avatar-pink: #c74b88;
  --avatar-teal: #2b9aa2;
}

/* ============================================================
   ПЕРЕМЕННЫЕ — ТЁМНАЯ ТЕМА (fallback для браузера)
   ============================================================ */
:root[data-theme="dark"] {
  --tg-theme-bg-color: #1c1c1e;
  --tg-theme-secondary-bg-color: #2c2c2e;
  --tg-theme-text-color: #ffffff;
  --tg-theme-hint-color: #636366;
  --tg-theme-link-color: #0a84ff;
  --tg-theme-button-color: #0a84ff;
  --tg-theme-button-text-color: #ffffff;
  --tg-theme-header-bg-color: #1c1c1e;
  --tg-theme-accent-text-color: #0a84ff;
  --tg-theme-section-bg-color: #2c2c2e;
  --tg-theme-section-header-text-color: #636366;
  --tg-theme-subtitle-text-color: #636366;
  --tg-theme-destructive-text-color: #ff453a;
  --tg-theme-bottom-bar-bg-color: #1c1c1e;

  --app-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  --app-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   RESET И БАЗА
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--tg-theme-bg-color);
  color: var(--tg-theme-text-color);
  -webkit-font-smoothing: antialiased;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  resize: none;
  border: none;
  outline: none;
  background: none;
}

/* ============================================================
   APP — КОРНЕВОЙ КОНТЕЙНЕР
   ============================================================ */
.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--tg-theme-bg-color);
}

/* ============================================================
   SCREEN — ЭКРАНЫ
   Каждый экран абсолютно позиционирован.
   Переход: slide-in справа / slide-out влево.
   ============================================================ */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--tg-theme-bg-color);
  opacity: 0;
  transform: translateX(30px);
  pointer-events: none;
  transition:
    opacity var(--app-transition),
    transform var(--app-transition);
  /* Safe area */
  padding-top: var(--tg-safe-area-inset-top);
  padding-bottom: var(--tg-safe-area-inset-bottom);
}

.screen--active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
  z-index: 1;
}

.screen--leaving {
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   TOP-BAR — ХЕДЕР СТРАНИЦ
   ============================================================ */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--app-top-bar-height);
  padding: 0 16px;
  background: var(--tg-theme-header-bg-color);
  flex-shrink: 0;
  position: relative;
}

.top-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.5px;
  background: var(--tg-theme-hint-color);
  opacity: 0.2;
}

.top-bar--compact {
  height: 52px;
  padding: 0 12px;
}

.top-bar__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--tg-theme-text-color);
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   ICON-BTN — КНОПКИ-ИКОНКИ
   ============================================================ */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--tg-theme-accent-text-color);
  transition: background var(--app-transition);
}

.icon-btn:active {
  background: var(--tg-theme-secondary-bg-color);
}

/* ============================================================
   TOKENS-CHIP — СЧЁТЧИК ТОКЕНОВ
   ============================================================ */
.tokens-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--tg-theme-secondary-bg-color);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tg-theme-text-color);
}

.tokens-chip__icon {
  font-size: 12px;
  line-height: 1;
}

.tokens-chip__value {
  color: var(--tg-theme-accent-text-color);
  font-weight: 600;
}

/* ============================================================
   TABS — ПЕРЕКЛЮЧАТЕЛЬ ВКЛАДОК
   ============================================================ */
.tabs {
  display: flex;
  background: var(--tg-theme-header-bg-color);
  border-bottom: 0.5px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

:root[data-theme="dark"] .tabs {
  border-bottom-color: rgba(255,255,255,0.08);
}

.tabs__btn {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--tg-theme-hint-color);
  border-bottom: 2px solid transparent;
  transition: color var(--app-transition), border-color var(--app-transition);
}

.tabs__btn--active {
  color: var(--tg-theme-accent-text-color);
  border-bottom-color: var(--tg-theme-accent-text-color);
}

/* ============================================================
   SESSIONS — СПИСОК СЕССИЙ
   ============================================================ */
.sessions-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sessions-list {
  padding: 8px 0;
}

/* ---- session-card ---- */
.session-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--tg-theme-secondary-bg-color);
  border-bottom: 0.5px solid var(--tg-theme-bg-color);
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-user-select: none;
  user-select: none;
}

.session-card:first-child {
  border-radius: var(--app-radius) var(--app-radius) 0 0;
  margin-top: 8px;
}

.session-card:last-child {
  border-radius: 0 0 var(--app-radius) var(--app-radius);
  border-bottom: none;
  margin-bottom: 8px;
}

.session-card:only-child {
  border-radius: var(--app-radius);
  margin: 8px 0;
}

.session-card:active {
  opacity: 0.65;
}

.session-card__avatar {
  flex-shrink: 0;
}

.session-card__body {
  flex: 1;
  min-width: 0;
}

.session-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--tg-theme-text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-card__preview {
  font-size: 13px;
  color: var(--tg-theme-subtitle-text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.session-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.session-card__time {
  font-size: 12px;
  color: var(--tg-theme-hint-color);
}

.session-card__badge {
  background: var(--tg-theme-button-color);
  color: var(--tg-theme-button-text-color);
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* empty state */
.sessions-empty {
  text-align: center;
  padding: 60px 32px;
  color: var(--tg-theme-hint-color);
}

.sessions-empty__icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.sessions-empty__text {
  font-size: 15px;
}

/* ============================================================
   AVATAR — АВАТАР
   ============================================================ */
.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #ffffff;
  flex-shrink: 0;
  font-size: 16px;
  width: 46px;
  height: 46px;
}

.avatar--sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

/* ============================================================
   FAB — ПЛАВАЮЩАЯ КНОПКА
   ============================================================ */
.fab {
  position: absolute;
  bottom: calc(20px + var(--tg-safe-area-inset-bottom));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tg-theme-button-color);
  color: var(--tg-theme-button-text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--app-shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 10;
}

.fab:active {
  transform: scale(0.92);
  box-shadow: var(--app-shadow);
}

/* ============================================================
   INTERLOCUTOR — ХЕДЕР ДИАЛОГА
   ============================================================ */
.interlocutor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.interlocutor__info {
  display: flex;
  flex-direction: column;
}

.interlocutor__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--tg-theme-text-color);
}

.interlocutor__sub {
  font-size: 12px;
  color: var(--tg-theme-hint-color);
}

/* ============================================================
   MESSAGES — ОБЛАСТЬ СООБЩЕНИЙ
   ============================================================ */
.messages-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.messages-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---- message ---- */
.message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.message--incoming {
  align-self: flex-start;
  align-items: flex-start;
}

.message--outgoing {
  align-self: flex-end;
  align-items: flex-end;
}

.message__bubble {
  padding: 9px 13px;
  border-radius: var(--app-radius);
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

.message--incoming .message__bubble {
  background: var(--tg-theme-secondary-bg-color);
  color: var(--tg-theme-text-color);
  border-bottom-left-radius: 4px;
}

.message--outgoing .message__bubble {
  background: var(--tg-theme-button-color);
  color: var(--tg-theme-button-text-color);
  border-bottom-right-radius: 4px;
}

.message__time {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  margin-top: 3px;
  padding: 0 2px;
}

/* разделитель дата */
.message-date-divider {
  text-align: center;
  font-size: 12px;
  color: var(--tg-theme-hint-color);
  padding: 8px 0;
}

/* ============================================================
   COMPOSE — ПОЛЕ ВВОДА
   ============================================================ */
.compose {
  background: var(--tg-theme-secondary-bg-color);
  border-top: 0.5px solid var(--tg-theme-bg-color);
  padding: 8px 12px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compose__textarea {
  background: var(--tg-theme-bg-color);
  border-radius: var(--app-radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  min-height: 72px;
  max-height: 140px;
  overflow-y: auto;
  color: var(--tg-theme-text-color);
  width: 100%;
}

.compose__textarea::placeholder {
  color: var(--tg-theme-hint-color);
}

.compose__hint {
  font-size: 12px;
  color: var(--tg-theme-hint-color);
  padding: 0 2px;
}

/* ============================================================
   MAIN-BTN-FALLBACK — КНОПКА-ЗАМЕНА TELEGRAM MainButton
   Показывается только вне Telegram
   ============================================================ */
.main-btn-fallback {
  display: none; /* Управляется через JS */
  width: 100%;
  padding: 14px 20px;
  background: var(--tg-theme-button-color);
  color: var(--tg-theme-button-text-color);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border-top: 0.5px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
  transition: opacity 0.15s;
  padding-bottom: calc(14px + var(--tg-safe-area-inset-bottom));
}

.main-btn-fallback:active {
  opacity: 0.8;
}

/* ============================================================
   ANALYSIS — РЕЗУЛЬТАТ АНАЛИЗА
   ============================================================ */
.analysis-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.analysis {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- tone-card — карточка тона ---- */
.tone-card {
  background: var(--tg-theme-secondary-bg-color);
  border-radius: var(--app-radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--app-shadow);
}

.tone-card__emoji {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}

.tone-card__body {
  flex: 1;
}

.tone-card__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--tg-theme-text-color);
}

.tone-card__sublabel {
  font-size: 13px;
  color: var(--tg-theme-subtitle-text-color);
  margin-top: 2px;
}

.tone-card__risk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 6px;
}

.tone-card__risk--high {
  background: rgba(255, 59, 48, 0.12);
  color: var(--tg-theme-destructive-text-color);
}

.tone-card__risk--medium {
  background: rgba(255, 149, 0, 0.12);
  color: #ff9500;
}

.tone-card__risk--low {
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
}

/* ---- analysis-text ---- */
.analysis-text {
  background: var(--tg-theme-secondary-bg-color);
  border-radius: var(--app-radius-lg);
  padding: 16px;
  box-shadow: var(--app-shadow);
}

.analysis-text__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tg-theme-section-header-text-color);
  margin-bottom: 8px;
}

.analysis-text__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--tg-theme-text-color);
}

/* ---- suggestions ---- */
.suggestions-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tg-theme-section-header-text-color);
  padding: 4px 4px 8px;
}

.suggestion-card {
  background: var(--tg-theme-secondary-bg-color);
  border-radius: var(--app-radius-lg);
  padding: 14px 16px;
  box-shadow: var(--app-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestion-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.suggestion-card__style {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--tg-theme-bg-color);
  color: var(--tg-theme-accent-text-color);
}

.suggestion-card__number {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  margin-left: auto;
}

.suggestion-card__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--tg-theme-text-color);
}

.suggestion-card__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  border-radius: var(--app-radius-sm);
  background: var(--tg-theme-bg-color);
  font-size: 13px;
  font-weight: 500;
  color: var(--tg-theme-accent-text-color);
  transition: opacity 0.15s;
}

.suggestion-card__copy:active {
  opacity: 0.65;
}

/* ============================================================
   SETTINGS — НАСТРОЙКИ
   ============================================================ */
.settings-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.settings {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---- user-profile ---- */
.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 16px;
  gap: 10px;
}

.user-profile__avatar {
  width: 72px;
  height: 72px;
  font-size: 26px;
}

.user-profile__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--tg-theme-text-color);
}

.user-profile__plan {
  font-size: 13px;
  color: var(--tg-theme-hint-color);
}

/* ---- settings-section ---- */
.settings-section {
  background: var(--tg-theme-secondary-bg-color);
  border-radius: var(--app-radius-lg);
  overflow: hidden;
  box-shadow: var(--app-shadow);
}

.settings-section__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tg-theme-section-header-text-color);
  padding: 0 16px 6px;
}

/* ---- settings-item ---- */
.settings-item {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--tg-theme-bg-color);
  gap: 12px;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item__icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.settings-item__body {
  flex: 1;
  min-width: 0;
}

.settings-item__label {
  font-size: 15px;
  color: var(--tg-theme-text-color);
}

.settings-item__sub {
  font-size: 12px;
  color: var(--tg-theme-hint-color);
  margin-top: 1px;
}

.settings-item__value {
  font-size: 13px;
  color: var(--tg-theme-hint-color);
  flex-shrink: 0;
}

.settings-item__arrow {
  color: var(--tg-theme-hint-color);
  font-size: 12px;
  flex-shrink: 0;
}

/* ---- toggle ---- */
.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle__track {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: var(--tg-theme-hint-color);
  transition: background var(--app-transition);
  cursor: pointer;
}

.toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform var(--app-transition);
  pointer-events: none;
}

.toggle__input:checked ~ .toggle__track {
  background: var(--tg-theme-button-color);
}

.toggle__input:checked ~ .toggle__thumb {
  transform: translateX(20px);
}

/* ---- progress-bar ---- */
.progress-bar {
  height: 6px;
  background: var(--tg-theme-bg-color);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--tg-theme-button-color);
  transition: width 0.6s ease;
}

.progress-bar__fill--warn {
  background: #ff9500;
}

.progress-bar__fill--danger {
  background: var(--tg-theme-destructive-text-color);
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.onboarding {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.onboarding__slides-track {
  flex: 1;
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.onboarding__slide {
  /* Ширина задаётся через JS в пикселях, flex-shrink:0 запрещает сжатие */
  flex-shrink: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
  gap: 24px;
}

.onboarding__visual {
  width: 120px;
  height: 120px;
  border-radius: 32px;
  background: var(--tg-theme-secondary-bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--app-shadow-md);
}

.onboarding__emoji {
  font-size: 56px;
  line-height: 1;
}

.onboarding__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onboarding__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--tg-theme-text-color);
}

.onboarding__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--tg-theme-subtitle-text-color);
  max-width: 280px;
}

.onboarding__footer {
  padding: 20px 24px;
  padding-bottom: calc(20px + var(--tg-safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--tg-theme-bg-color);
  flex-shrink: 0;
}

.onboarding__dots {
  display: flex;
  gap: 8px;
}

.onboarding__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tg-theme-hint-color);
  opacity: 0.35;
  transition: opacity var(--app-transition), width var(--app-transition);
}

.onboarding__dot--active {
  width: 22px;
  border-radius: 4px;
  background: var(--tg-theme-button-color);
  opacity: 1;
}

.onboarding__btn {
  width: 100%;
}

/* ============================================================
   BTN — КНОПКИ
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--app-radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
  cursor: pointer;
  padding: 12px 20px;
  white-space: nowrap;
}

.btn:active {
  opacity: 0.7;
  transform: scale(0.97);
}

.btn--primary {
  background: var(--tg-theme-button-color);
  color: var(--tg-theme-button-text-color);
  border-radius: var(--app-radius);
}

.btn--secondary {
  background: var(--tg-theme-secondary-bg-color);
  color: var(--tg-theme-accent-text-color);
}

.btn--ghost {
  background: transparent;
  color: var(--tg-theme-accent-text-color);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--app-radius-sm);
}

.btn--ghost:active {
  background: var(--tg-theme-secondary-bg-color);
}

.btn--xs {
  font-size: 13px;
  padding: 5px 10px;
}

/* ============================================================
   DEV-PANEL — ПАНЕЛЬ РАЗРАБОТЧИКА (вне Telegram)
   ============================================================ */
.dev-panel {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 1000;
  display: none; /* Управляется через JS */
}

.dev-panel__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tg-theme-secondary-bg-color);
  box-shadow: var(--app-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s;
}

.dev-panel__btn:active {
  transform: scale(0.9);
}

/* ============================================================
   SCROLLBAR — КАСТОМНЫЙ СКРОЛЛБАР (десктоп)
   ============================================================ */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--tg-theme-hint-color);
  border-radius: 2px;
  opacity: 0.4;
}
