:root {
  --bg: #0c0c12;
  --card: #14141e;
  --border: #1e1e30;
  --border-hover: #2a2a44;
  --text: #c8c8d8;
  --text-dim: #707088;
  --text-bright: #eeeef4;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --success: #34d399;
  --success-bg: #0d2818;
  --error: #f87171;
  --error-bg: #2a0f0f;
  --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container { width: 100%; max-width: 480px; padding: 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
}
.icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.icon svg { width: 24px; height: 24px; }
.icon-accent   { background: linear-gradient(135deg, var(--accent), #a855f7); }
.icon-locked   { background: linear-gradient(135deg, #ef4444, #f97316); }
.icon-unlocked { background: linear-gradient(135deg, #10b981, #34d399); }
h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.subtitle {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Buttons — shared by <button> and <a class="btn"> */
.btn {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: #fff;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn + .btn { margin-top: 10px; }
.btn-connect, .btn-login { background: var(--accent); }
.btn-connect:hover:not(:disabled), .btn-login:hover { background: var(--accent-hover); }
.btn-sign { background: linear-gradient(135deg, var(--accent), #a855f7); }
.btn-sign:hover:not(:disabled) { background: linear-gradient(135deg, var(--accent-hover), #c084fc); }
.btn-logout { background: #333; color: var(--text); border: 1px solid var(--border); }
.btn-logout:hover { background: #3a3a3a; }

/* Message bar — always occupies its slot so showing/hiding never shifts layout */
.status-bar {
  display: block;
  visibility: hidden;
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 20px;
}
.status-bar.visible { visibility: visible; }
.status-bar.info    { background: var(--bg); border-color: var(--border); color: var(--text-dim); }
.status-bar.error   { background: var(--error-bg); border-color: #4a1a1a; color: var(--error); }
.status-bar.success { background: var(--success-bg); border-color: #1a4a2a; color: var(--success); }

/* Address pill — reserves its slot up front so connect→sign doesn't resize the card */
/* Sign-in wallet address: same full-width field layout as the status page,
   reserved up front (visibility) so revealing it doesn't reflow the card. */
.address-field {
  visibility: hidden;
  margin-bottom: 20px;
}
.address-field.visible { visibility: visible; }

/* Status page detail fields */
.field { margin-bottom: 16px; }
.field-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.field-value {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-bright);
  white-space: nowrap;
  overflow-x: auto;
  line-height: 1.4;
  min-height: 1.4em;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  top: -1px;
}
.dot-green { background: var(--success); }
.dot-red   { background: var(--error); }

.divider { height: 1px; background: var(--border); margin: 24px 0; }
.footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.hidden { display: none !important; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
