:root {
  color-scheme: dark;
  --bg: #0c1119;
  --bg-2: #101927;
  --surface: rgba(16, 23, 35, 0.88);
  --surface-2: rgba(10, 16, 26, 0.95);
  --surface-3: rgba(255, 255, 255, 0.05);
  --text: #ebf3ff;
  --muted: #9aa9c2;
  --accent: #3C8CE2;
  --accent-2: #52bfb2;
  --danger: #ff5d5d;
  --ok: #36d399;
  --warn: #f59e0b;
  --border: rgba(201, 221, 255, 0.12);
  --border-strong: rgba(201, 221, 255, 0.2);
  --shadow: 0 16px 44px rgba(2, 8, 20, 0.42);
  --shadow-soft: 0 8px 22px rgba(2, 8, 20, 0.34);
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font-sans: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: transparent;
  min-height: 100vh;
  padding: 18px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background: var(--bg-2);
}

.particle-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--size, 5px);
  height: var(--size, 5px);
  border-radius: 999px;
  opacity: var(--alpha, 0.5);
  background: var(--color, rgba(255, 255, 255, 0.6));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.14);
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  animation:
    particleMove var(--dur, 24s) linear infinite,
    particlePulse var(--pulse, 3.2s) ease-in-out infinite alternate;
}

@keyframes particleMove {
  from {
    transform: translate3d(var(--x, 0), var(--y, 0), 0);
  }
  to {
    transform: translate3d(calc(var(--x, 0) + var(--dx, 80px)), calc(var(--y, 0) + var(--dy, -80px)), 0);
  }
}

@keyframes particlePulse {
  from {
    opacity: calc(var(--alpha, 0.5) * 0.65);
  }
  to {
    opacity: var(--alpha, 0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .particle-dot {
    animation: none;
  }
}

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

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button,
.btn,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 52px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: #07131c;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(7, 19, 34, 0.38);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn::before {
  content: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(7, 19, 34, 0.42);
}

.btn:hover::before {
  transform: translateX(130%);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid rgba(60, 140, 226, 0.72);
  outline-offset: 2px;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  box-shadow: none;
}

.btn.danger {
  background: #ff5d5d;
  color: #2b0d0d;
  box-shadow: none;
}

.btn.secondary::before,
.btn.ghost::before,
.btn.danger::before {
  content: none;
}

.btn.secondary:hover,
.btn.ghost:hover,
.btn.danger:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: rgba(60, 140, 226, 0.62);
  box-shadow: 0 0 0 2px rgba(82, 191, 178, 0.16);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.pill {
  background: rgba(82, 191, 178, 0.14);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 12px;
}

@media (max-width: 720px) {
  body {
    padding: 14px;
  }

  .card {
    padding: 16px;
  }
}
