@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(../vendor/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(../vendor/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(../vendor/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url(../vendor/fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-display: swap; src: url(../vendor/fonts/inter-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url(../vendor/fonts/sora-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url(../vendor/fonts/sora-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 800; font-display: swap; src: url(../vendor/fonts/sora-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(../vendor/fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-display: swap; src: url(../vendor/fonts/jetbrains-mono-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'VT323'; font-weight: 400; font-display: swap; src: url(../vendor/fonts/vt323-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Orbitron'; font-weight: 700; font-display: swap; src: url(../vendor/fonts/orbitron-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Orbitron'; font-weight: 900; font-display: swap; src: url(../vendor/fonts/orbitron-latin-900-normal.woff2) format('woff2'); }

:root {
  --bg: #050912;
  --bg2: #0a1120;
  --surface: rgba(14, 22, 38, .78);
  --surface-2: rgba(20, 31, 52, .86);
  --solid: #0e1627;
  --solid-2: #131e34;
  --line: rgba(148, 163, 184, .14);
  --line-2: rgba(148, 163, 184, .24);
  --text: #e7eef8;
  --muted: #8b9bb3;
  --dim: #5b6b84;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f43f5e;
  --brand: linear-gradient(135deg, #22d3ee 0%, #6366f1 52%, #a855f7 100%);
  --brand-soft: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(99, 102, 241, .14) 52%, rgba(168, 85, 247, .16));
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .75), 0 2px 8px rgba(0, 0, 0, .35);
  --glow: 0 0 0 1px rgba(34, 211, 238, .35), 0 0 24px -4px rgba(34, 211, 238, .45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Sora', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--cyan); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(34, 211, 238, .35); }
.mono { font-family: var(--mono); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, .32); background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s;
  white-space: nowrap; user-select: none;
}
.btn:hover { border-color: rgba(34, 211, 238, .5); background: rgba(30, 44, 72, .9); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -10px rgba(99, 102, 241, .8); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 10px 30px -8px rgba(99, 102, 241, .9); }
.btn.ok { background: linear-gradient(135deg, #10b981, #22c55e); border-color: transparent; color: #04130b; }
.btn.danger { background: rgba(244, 63, 94, .14); border-color: rgba(244, 63, 94, .45); color: #fecdd3; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(148, 163, 184, .1); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }

.input, .select, textarea.input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line-2);
  background: rgba(5, 10, 20, .6); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9bb3' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
label.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; letter-spacing: .02em; }

.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.card { border-radius: var(--r); box-shadow: var(--shadow); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line-2); background: rgba(148, 163, 184, .08); color: var(--muted); white-space: nowrap; }
.chip.ok { color: #a7f3d0; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .1); }
.chip.warn { color: #fde68a; border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .1); }
.chip.err { color: #fecdd3; border-color: rgba(244, 63, 94, .45); background: rgba(244, 63, 94, .12); }
.chip.info { color: #a5f3fc; border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .1); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

.toast-host { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; pointer-events: none; max-width: min(420px, calc(100vw - 36px)); }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(12, 19, 33, .95); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13px; animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2); }
.toast.ok { border-color: rgba(52, 211, 153, .45); }
.toast.err { border-color: rgba(244, 63, 94, .5); }
.toast.warn { border-color: rgba(251, 191, 36, .5); }
.toast .ti { width: 22px; height: 22px; flex: none; }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

.modal-back { position: fixed; inset: 0; background: rgba(2, 6, 14, .66); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 900; animation: fadeIn .2s ease; padding: 16px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 18px; background: linear-gradient(180deg, rgba(18, 28, 48, .98), rgba(11, 18, 32, .98)); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9); animation: popIn .28s cubic-bezier(.2, .9, .3, 1.15); }
.modal.wide { width: min(880px, 100%); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; font: 700 17px var(--font-head); flex: 1; }
.modal-b { padding: 20px 22px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.credits { font-size: 11.5px; color: var(--dim); text-align: center; line-height: 1.6; }
.credits b { color: var(--muted); font-weight: 600; }
.grad-text { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
