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

:root {
  --bg: #0f0f13;
  --bg2: #17171f;
  --bg3: #1e1e28;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f5;
  --text2: #9090a8;
  --accent: #7c6ff7;
  --accent2: #5a53c0;
  --success: #22c97a;
  --danger: #f04f5a;
  --warning: #f5a623;
  --gold: #f9c74f;
  --radius: 12px;
  --radius-lg: 20px;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

.screen { display: none; flex: 1; flex-direction: column; }
.screen.active { display: flex; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius); border: none;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg3); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-xl { padding: 16px 48px; font-size: 18px; border-radius: var(--radius-lg); width: 100%; max-width: 360px; }

.hidden { display: none !important; }

.avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--accent);
}

.spinner {
  width: 48px; height: 48px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  color: var(--text2);
}

.center-box {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 32px; text-align: center;
  max-width: 480px; margin: 0 auto;
}
.error-icon { font-size: 48px; }

.level-badge {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
}

.category-badge {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--bg3); color: var(--text2); border: 1px solid var(--border);
}

@media (max-width: 600px) {
  .btn-xl { max-width: 100%; }
}
