/* ==========================================
   Стили главной страницы (index.html)
   ========================================== */

/* HEADER */
.app-header {
  padding: 12px 16px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app-header img {
  height: 28px;
  opacity: 0.7;
}

/* TRACK ТАБОВ */
.tabs-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.tabs-track {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.tab-pane {
  flex: 0 0 100%;
  overflow-y: auto;
  padding: 8px 16px 16px;
  -webkit-overflow-scrolling: touch;
}

/* СКРОЛЛБАР */
.tab-pane::-webkit-scrollbar {
  width: 3px;
}
.tab-pane::-webkit-scrollbar-track {
  background: transparent;
}
.tab-pane::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

/* ГЛАВНАЯ */
.home-logo {
  text-align: center;
  margin-bottom: 16px;
}
.home-logo img {
  max-width: 180px;
  height: auto;
}
.home-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}
.home-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.home-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}
.home-links a:active {
  background: rgba(255,255,255,0.12);
}
.home-links a i {
  width: 20px;
  text-align: center;
  color: var(--accent);
  font-size: 16px;
}
.home-links a span {
  flex: 1;
}
.home-links a .fa-external-link {
  color: var(--text-secondary);
  font-size: 12px;
}

/* ЧАТ И ИЗОБРАЖЕНИЯ */
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 14px;
}
.feature-icon.chat {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}
.feature-icon.image {
  background: linear-gradient(135deg, #00cec9, #55efc4);
}
.feature-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}
.feature-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 14px;
}
.btn-glass {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  color: #fff;
}
.btn-glass:active {
  transform: scale(0.97);
}
.btn-glass.chat {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  box-shadow: 0 4px 20px rgba(108,92,231,0.3);
}
.btn-glass.image {
  background: linear-gradient(135deg, #00cec9, #55efc4);
  box-shadow: 0 4px 20px rgba(0,206,201,0.3);
}

/* ПРОФИЛЬ */
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  margin: 0 auto 12px;
}
.profile-name {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2px;
}
.profile-id {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.profile-row:last-child {
  border-bottom: none;
}
.profile-row .label {
  font-size: 14px;
  color: var(--text-secondary);
}
.profile-row .value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.profile-row .value.balance {
  color: #55efc4;
}
.btn-glass.pay {
  margin-top: 16px;
  background: linear-gradient(135deg, #fdcb6e, #e17055);
  box-shadow: 0 4px 20px rgba(253,203,110,0.25);
  opacity: 0.6;
  cursor: default;
}

/* НИЖНЯЯ НАВИГАЦИЯ */
.bottom-nav {
  flex-shrink: 0;
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 0;
  height: var(--nav-height);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 10px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.nav-item i {
  font-size: 20px;
  transition: transform 0.2s;
}
.nav-item.active {
  color: #a29bfe;
}
.nav-item.active i {
  transform: scale(1.1);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

/* ФОРМАТ-БЕДЖИКИ */
.fmt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s, box-shadow 0.15s;
}
.fmt-badge:active {
  transform: scale(0.96);
}
.fmt-badge.doc {
  border-color: rgba(108,92,231,0.3);
  color: #c8bfff;
}
.fmt-badge.img {
  border-color: rgba(0,206,201,0.3);
  color: #81ecec;
}
.fmt-badge.audio {
  border-color: rgba(253,203,110,0.3);
  color: #ffeaa7;
}
.fmt-badge.out {
  border-color: rgba(85,239,196,0.25);
  color: #a8f0d4;
}
.cap-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(108,92,231,0.10);
  border: 1px solid rgba(108,92,231,0.15);
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cap-badge i {
  color: #a29bfe;
  font-size: 12px;
}

/* АНИМАЦИЯ ПОЯВЛЕНИЯ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-pane.active-pane {
  animation: fadeUp 0.35s ease;
}

/* ПАРАМЕТРЫ ИЗОБРАЖЕНИЙ */
.param-group {
  margin-bottom: 16px;
  text-align: left;
}
.param-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.size-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.size-btn, .q-btn, .count-btn {
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-bg);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.size-btn:active, .q-btn:active, .count-btn:active {
  background: rgba(255,255,255,0.1);
}
.size-btn.active, .q-btn.active {
  border-color: #00cec9;
  background: rgba(0,206,201,0.12);
}
.quality-row, .count-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.q-btn {
  flex: 1;
  max-width: 100px;
}
.count-btn {
  width: 44px;
  height: 44px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.count-val {
  font-size: 20px;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
  color: var(--text-primary);
}
.custom-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.size-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-bg);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.size-input::-webkit-inner-spin-button,
.size-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.size-input:focus {
  border-color: #6c5ce7;
}
.size-input.invalid {
  border-color: #e17055;
}
.size-sep {
  color: var(--text-secondary);
  font-size: 16px;
  flex-shrink: 0;
}
.size-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  min-height: 16px;
  text-align: left;
}
.size-hint.error {
  color: #e17055;
}
.size-hint.ok {
  color: #55efc4;
}

/* ПЕРЕКЛЮЧАТЕЛЬ FIT MODE */
.fit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-bg);
  margin-bottom: 8px;
}
.fit-row span {
  font-size: 13px;
  color: var(--text-primary);
}
.fit-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.fit-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.fit-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 24px;
  transition: background 0.3s;
}
.fit-switch .slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-primary);
  border-radius: 50%;
  transition: transform 0.3s;
}
.fit-switch input:checked + .slider {
  background: rgba(0,206,201,0.4);
}
.fit-switch input:checked + .slider::before {
  transform: translateX(20px);
  background: #00cec9;
}
.fit-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  min-height: 16px;
  text-align: left;
}
.size-grid.disabled, .custom-size-row.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ==========================================
   Утилитарные классы для бывших inline style
   ========================================== */

/* Центрированный контейнер контента */
.content-center {
  max-width: 340px;
  margin: 16px auto;
}

/* Центрированный контейнер контента (картинки) */
.content-center-img {
  max-width: 320px;
  margin: 24px auto;
}

/* Центрированный контейнер профиля */
.content-center-profile {
  max-width: 340px;
  margin: 20px auto;
}

/* Текст по центру внутри стеклянной карточки */
.glass-center {
  text-align: center;
}

/* Секция форматов: отступ сверху и уменьшенный padding */
.glass-section {
  margin-top: 8px;
  padding: 16px;
}

/* Секция форматов: отступ сверху 12px */
.glass-section-first {
  margin-top: 12px;
  padding: 16px;
}

/* Секция возможностей: отступ и padding */
.glass-section-caps {
  margin-top: 8px;
  padding: 14px 16px;
}

/* Заголовок секции форматов */
.fmt-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* Контейнер бейджиков форматов */
.fmt-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

/* Контейнер бейджиков возможностей */
.cap-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Кнопка чата: отступ сверху */
.btn-chat-mt {
  margin-top: 14px;
}
