/* style.css — фирменный стиль dripp.
   Тёмная палитра с пурпурно-розовыми градиентами, glassmorphism, мягкие тени.
   Tailwind CDN подключён в HTML, тут только кастомные классы и переменные. */

:root {
  --bg: #0a0612;
  --bg2: #120a1f;
  --fg: #f3eefc;
  --fg-dim: #a99fc4;
  --accent: #c026d3;
  --accent2: #e11d74;
  --card: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
}

:root {
  color-scheme: dark;
}
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
}

/* Aurora — фоновое свечение, создаёт атмосферу. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 800px 600px at 15% 10%, rgba(192,38,211,0.18), transparent 60%),
    radial-gradient(ellipse 700px 500px at 85% 80%, rgba(225,29,116,0.15), transparent 60%),
    radial-gradient(ellipse 600px 400px at 50% 50%, rgba(124,58,237,0.08), transparent 60%);
}

/* Glassmorphism — полупрозрачные карточки с blur. */
.glass {
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Gradient text — для логотипа и акцентов. */
.gradient-text {
  background: linear-gradient(135deg, #e11d74 0%, #c026d3 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Кнопки */
.btn-primary {
  background: linear-gradient(135deg, #e11d74 0%, #c026d3 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(192,38,211,0.3);
  font-family: 'Inter', sans-serif;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(192,38,211,0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--fg);
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent);
}

.btn-danger {
  background: rgba(244,63,94,0.15);
  color: #fb7185;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(244,63,94,0.2);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(244,63,94,0.25); }

/* Поля ввода */
.input-field {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.75rem 1rem;
  outline: none;
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  width: 100%;
}
.input-field:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(192,38,211,0.15);
}
.input-field::placeholder { color: var(--fg-dim); opacity: 0.6; }

/* Вкладки в админке */
.tab-btn {
  padding: 0.6rem 1.2rem;
  color: var(--fg-dim);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Inter', sans-serif;
}
.tab-btn:hover { color: var(--fg); }
.tab-active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

/* Скроллбар */
.scroll-area::-webkit-scrollbar { width: 6px; }
.scroll-area::-webkit-scrollbar-track { background: transparent; }
.scroll-area::-webkit-scrollbar-thumb {
  background: rgba(192,38,211,0.3);
  border-radius: 3px;
}
.scroll-area::-webkit-scrollbar-thumb:hover { background: rgba(192,38,211,0.5); }

/* Пузыри сообщений */
.bubble {
  animation: fade-in 0.25s cubic-bezier(0.16,1,0.3,1);
  max-width: 80%;
  padding: 0.7rem 1.1rem;
  border-radius: 1.1rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
}
.bubble-user {
  background: linear-gradient(135deg, #e11d74 0%, #c026d3 100%);
  color: #fff;
  border-bottom-right-radius: 0.3rem;
  box-shadow: 0 4px 14px rgba(225,29,116,0.25);
  margin-left: auto;
}
.bubble-assistant {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-bottom-left-radius: 0.3rem;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Бейдж провайдера */
.provider-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(192,38,211,0.15);
  color: #e899f5;
  margin-bottom: 0.4rem;
}

/* Fallback индикатор */
.fallback-note {
  font-size: 0.75rem;
  color: var(--fg-dim);
  font-style: italic;
  padding: 0.3rem 0.6rem;
  background: rgba(251,191,36,0.08);
  border-radius: 0.5rem;
  margin: 0.3rem 0;
}

/* Таблицы в админке */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  color: var(--fg-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Бейджи статусов */
.badge { padding: 0.15rem 0.6rem; border-radius: 0.4rem; font-size: 0.7rem; font-weight: 600; }
.badge-active { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-inactive { background: rgba(255,255,255,0.06); color: var(--fg-dim); }
.badge-free { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-premium { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-error { background: rgba(244,63,94,0.15); color: #fb7185; }

/* Карточка ключа в списке */
.key-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  transition: all 0.2s;
}
.key-card:hover { border-color: rgba(192,38,211,0.3); }
.key-card.inactive { opacity: 0.55; }

/* Стат-карточки на дашборде */
.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.2rem;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Sora', sans-serif;
  background: linear-gradient(135deg, #e11d74 0%, #c026d3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .stat-label {
  color: var(--fg-dim);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
