/* ===== Sputnik Proxy — общие стили ===== */

:root {
  /* Космическая палитра */
  --bg-0: #070914;
  --bg-1: #0d1220;
  --bg-2: #141a2e;
  --bg-3: #1c2340;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text-0: #ffffff;
  --text-1: #e6e8f0;
  --text-2: #9aa0b4;
  --text-3: #5b6280;

  /* Бренд — фиолетово-голубой */
  --violet: #8b5cf6;
  --violet-2: #a78bfa;
  --blue: #60a5fa;
  --blue-2: #38bdf8;
  --cyan: #22d3ee;

  --grad-brand: linear-gradient(135deg, #8b5cf6 0%, #60a5fa 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(96, 165, 250, 0.15) 100%);

  /* Статусы */
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-0);
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

p { text-wrap: pretty; margin: 0; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.mono { font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace; }

/* ===== Фон с космосом ===== */
.cosmos-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(96, 165, 250, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 60%, rgba(34, 211, 238, 0.08), transparent 55%),
    var(--bg-0);
  pointer-events: none;
}
.cosmos-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 80% 20%, #fff 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(167, 139, 250, 0.8) 50%, transparent 100%),
    radial-gradient(1px 1px at 90% 50%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 15% 65%, rgba(96, 165, 250, 0.8) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 70% 40%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 35% 15%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 55% 55%, rgba(139, 92, 246, 0.7) 50%, transparent 100%);
  background-size: 100% 100%;
  opacity: 0.6;
  animation: stars-twinkle 8s ease-in-out infinite;
}
@keyframes stars-twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Сетка-оверлей */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black, transparent);
  pointer-events: none;
}

/* ===== Контейнер ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(139, 92, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  box-shadow: 0 10px 40px -6px rgba(139, 92, 246, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-0);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost {
  color: var(--text-2);
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--text-0); }

.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ===== Карточки ===== */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-1);
}
.pill-accent {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(96, 165, 250, 0.12));
  border-color: rgba(139, 92, 246, 0.35);
  color: var(--violet-2);
}
.pill-green { color: var(--green); background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
.pill-red { color: var(--red); background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.3); }
.pill-yellow { color: var(--yellow); background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); }

.label-caps {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
}

/* ===== Формы ===== */
.input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-0);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
  outline: none;
}
.input:focus {
  border-color: var(--violet);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}
.input::placeholder { color: var(--text-3); }

.field { margin-bottom: 16px; }
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

/* ===== Утилиты ===== */
.brand-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.text-muted { color: var(--text-2); }
.text-dim { color: var(--text-3); }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }

/* ===== Анимации ===== */
@keyframes fade-up {
  from { transform: translateY(20px); }
  to { transform: translateY(0); }
}
.fade-up {
  opacity: 1;
  animation: fade-up 0.6s ease forwards;
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; transform: none; }
}

@keyframes orbit-rotate {
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* ===== Скроллбар ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }
