:root {
  --bg: #0b0f17;
  --bg-2: #111725;
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf4;
  --muted: #8b93a7;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --gray: #64748b;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #ffffff;
  --card: rgba(255, 255, 255, 0.75);
  --card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --muted: #64748b;
  --shadow: 0 10px 30px -15px rgba(15, 23, 42, 0.25);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a {
  color: inherit;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
body.booting #appShell,
body.locked #appShell {
  display: none;
}
.boot-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.boot-card {
  width: min(400px, 100%);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.boot-card h1 {
  margin: 0;
  font-size: 1.3rem;
}
.boot-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.boot-message,
.boot-error {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.boot-message {
  color: var(--muted);
}
.boot-error {
  color: var(--red);
}
.boot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.muted {
  color: var(--muted);
}
.grow {
  flex: 1;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      600px circle at 10% -10%,
      color-mix(in srgb, var(--accent) 18%, transparent),
      transparent 60%
    ),
    radial-gradient(
      500px circle at 100% 0%,
      rgba(34, 211, 238, 0.12),
      transparent 60%
    );
}
