/* Shared design tokens — mirrors src/renderer/styles.css of the app. */

@font-face {
  font-family: 'Inter';
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@property --ang {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg: #07070b;
  --surface: rgba(20, 20, 30, 0.55);
  --surface-strong: rgba(14, 14, 22, 0.82);
  --hover: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f8;
  --muted: rgba(236, 236, 245, 0.62);
  --faint: rgba(236, 236, 245, 0.36);
  --cyan: #25f4ee;
  --violet: #8b5cf6;
  --pink: #fe2c55;
  --green: #34d399;
  --amber: #fbbf24;
  --grad: linear-gradient(120deg, var(--cyan), var(--violet) 52%, var(--pink));
  --grad-soft: linear-gradient(120deg, rgba(37, 244, 238, 0.16), rgba(139, 92, 246, 0.16) 52%, rgba(254, 44, 85, 0.16));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.35);
  --mono: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', ui-monospace, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
a {
  color: var(--cyan);
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.ico {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: content-box;
}

/* ── aurora background ── */
#bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  mix-blend-mode: screen;
}
.b1 {
  background: radial-gradient(circle, var(--cyan), transparent 62%);
  left: -18vmax;
  top: -24vmax;
  animation: drift1 26s ease-in-out infinite alternate;
}
.b2 {
  background: radial-gradient(circle, var(--violet), transparent 62%);
  right: -22vmax;
  top: -8vmax;
  animation: drift2 30s ease-in-out infinite alternate;
}
.b3 {
  background: radial-gradient(circle, var(--pink), transparent 62%);
  left: 18vmax;
  bottom: -38vmax;
  opacity: 0.22;
  animation: drift3 34s ease-in-out infinite alternate;
}
@keyframes drift1 {
  to {
    transform: translate(16vmax, 12vmax) scale(1.18);
  }
}
@keyframes drift2 {
  to {
    transform: translate(-14vmax, 16vmax) scale(0.88);
  }
}
@keyframes drift3 {
  to {
    transform: translate(-12vmax, -14vmax) scale(1.12);
  }
}
.grid {
  position: absolute;
  inset: -50% -10% 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(700px) rotateX(58deg) translateY(28%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 72%, #000 20%, transparent 75%);
  animation: gridmove 9s linear infinite;
}
@keyframes gridmove {
  to {
    background-position: 0 56px, 0 0;
  }
}

/* ── logo mark ── */
.mark {
  position: relative;
  border-radius: 30%;
  background: var(--grad);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
}
.mark::after {
  content: '';
  position: absolute;
  inset: 22%;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.4 1.6 4.2 13.1a.8.8 0 0 0 .6 1.3H11l-1.4 7.9 9.2-11.5a.8.8 0 0 0-.6-1.3H12z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.4 1.6 4.2 13.1a.8.8 0 0 0 .6 1.3H11l-1.4 7.9 9.2-11.5a.8.8 0 0 0-.6-1.3H12z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.mark.lg {
  width: 84px;
  height: 84px;
  border-radius: 26px;
  box-shadow: -6px -4px 0 -1px rgba(37, 244, 238, 0.85), 6px 4px 0 -1px rgba(254, 44, 85, 0.85), 0 24px 70px -10px rgba(139, 92, 246, 0.7);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  50% {
    transform: translateY(-8px) rotate(-2deg);
  }
}

/* ── controls ── */
.glass {
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.btn {
  position: relative;
  overflow: hidden;
  height: 42px;
  padding: 0 18px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 650;
  color: #fff;
  background: var(--grad);
  background-size: 160% 100%;
  box-shadow: 0 10px 30px -10px rgba(254, 44, 85, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s var(--spring), background-position 0.6s var(--ease), filter 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}
.btn.lg {
  height: 54px;
  padding: 0 28px;
  border-radius: 16px;
  font-size: 16px;
}
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.ghost:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--line-strong);
}
.ghost .ico {
  width: 16px;
  height: 16px;
}
.ghost.danger:hover {
  color: #fff;
  background: rgba(254, 44, 85, 0.22);
  border-color: rgba(254, 44, 85, 0.5);
}
.ghost.icon {
  width: 36px;
  padding: 0;
}
.field {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.field:focus {
  border-color: rgba(139, 92, 246, 0.7);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}
.field::placeholder {
  color: var(--faint);
}
.spin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin2 0.7s linear infinite;
}
@keyframes spin2 {
  to {
    transform: rotate(360deg);
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(6px);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
}

/* ── toasts ── */
#toasts {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(18, 18, 28, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 500;
  animation: pop-in 0.4s var(--spring) both;
}
.toast .ico {
  width: 17px;
  height: 17px;
  color: var(--cyan);
}
.toast.err .ico {
  color: var(--pink);
}
.toast.out {
  opacity: 0;
  transform: translateY(8px);
  transition: 0.3s var(--ease);
}
