:root {
  --accent: #6366f1;
}

* { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #0a0d14; }
::-webkit-scrollbar-thumb { background: #1d2433; border-radius: 5px; }

.gradient-text {
  background: linear-gradient(120deg, #818cf8 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; }

.btn-primary {
  background: linear-gradient(120deg, #6366f1, #22d3ee);
  color: #07101f;
  font-weight: 700;
}
.btn-primary:hover { opacity: 0.92; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); }

.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 6px 11px; font-size: 13px; }

.nav-link {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: #fff; }

/* Forms */
.label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}
.input {
  width: 100%;
  background: #11161f;
  border: 1px solid #232b3a;
  border-radius: 10px;
  padding: 10px 13px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.input::placeholder { color: #5b6678; }
.input:focus { border-color: #4f5bd5; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: #161c27;
  border: 1px solid #2a3344;
  color: #e2e8f0;
  padding: 11px 16px;
  border-radius: 11px;
  font-size: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw;
  z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: #7f1d1d; color: #fecaca; }
.toast.success { border-color: #14532d; color: #bbf7d0; }

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* User menu (nav dropdown) */
.usermenu { position: relative; }
.usermenu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 5px 10px 5px 6px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
}
.usermenu[open] .usermenu-trigger { border-color: rgba(255, 255, 255, 0.25); }
.avatar {
  display: grid;
  place-items: center;
  height: 26px;
  width: 26px;
  border-radius: 7px;
  background: linear-gradient(120deg, #6366f1, #22d3ee);
  color: #07101f;
  font-weight: 800;
  font-size: 13px;
}
.caret { color: #94a3b8; font-size: 11px; }
.usermenu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #11161f;
  border: 1px solid #232b3a;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.usermenu-head {
  padding: 8px 10px;
  border-bottom: 1px solid #1d2433;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.usermenu-head strong { color: #fff; font-size: 14px; }
.usermenu-head span { color: #7c8597; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-panel a,
.usermenu-panel button {
  text-align: left;
  background: none;
  border: none;
  color: #cbd5e1;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.usermenu-panel a:hover,
.usermenu-panel button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.btn-discord { background: #5865f2; color: #fff; border: none; }
.btn-discord:hover { opacity: 0.92; }

/* Custom modal (replaces native confirm/prompt) */
.pf-modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: rgba(3, 6, 12, 0.6);
  backdrop-filter: blur(3px);
  animation: pf-fade 0.12s ease;
}
@keyframes pf-fade { from { opacity: 0; } to { opacity: 1; } }
.pf-modal {
  width: min(92vw, 420px);
  background: #11161f;
  border: 1px solid #232b3a;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: pf-pop 0.14s ease;
}
@keyframes pf-pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.pf-modal-title { font-size: 16px; font-weight: 800; color: #fff; }
.pf-modal-msg { margin-top: 6px; font-size: 14px; color: #94a3b8; }
.pf-modal-input { margin-top: 14px; }
.pf-modal-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.btn.pf-danger { background: #e0383e; color: #fff; }
.btn.pf-danger:hover { opacity: 0.92; }

.feature-card { transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.035); }

/* Launch promo banner — animated gradient edge */
.promo-banner {
  background: linear-gradient(120deg, #6366f1, #22d3ee, #a855f7, #6366f1);
  background-size: 300% 100%;
  animation: promo-shift 6s ease infinite;
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.18);
}
@keyframes promo-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .promo-banner { animation: none; }
}

/* Panel tabs */
.panel-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 14px;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
}
.panel-tab:hover { color: #e2e8f0; }
.panel-tab.is-active { color: #fff; border-bottom-color: #6366f1; }

/* Stat widgets */
.stat {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 16px 18px;
}
.stat-label { font-size: 12px; font-weight: 600; color: #8b95a7; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { margin-top: 6px; font-size: 26px; font-weight: 800; color: #fff; line-height: 1; }
.stat-sub { margin-top: 6px; font-size: 12px; color: #7c8597; }

