/* ── Variables ───────────────────────────────────────── */
:root {
  --bg:           #07070f;
  --surface:      rgba(255,255,255,0.03);
  --border:       rgba(255,255,255,0.07);
  --border-focus: rgba(124,58,237,0.5);
  --shadow:       rgba(0,0,0,0.55);

  --purple:  #7c3aed;
  --purple2: #a855f7;
  --cyan:    #06b6d4;
  --pink:    #ec4899;

  --text:    #f1f5f9;
  --muted:   #64748b;
  --muted2:  #94a3b8;

  --r-xl:  24px;
  --r-lg:  16px;
  --r-md:  12px;
  --r-sm:   8px;
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Animated background ─────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0;
  animation: orb-in 1.2s var(--ease) forwards, drift 22s ease-in-out infinite;
}

.orb--purple {
  width: 700px; height: 700px;
  background: radial-gradient(circle at 40% 40%, #7c3aed 0%, transparent 70%);
  top: -220px; left: -220px;
  animation-delay: 0s, 0s;
  opacity: 0.13;
}
.orb--cyan {
  width: 550px; height: 550px;
  background: radial-gradient(circle at 60% 60%, #06b6d4 0%, transparent 70%);
  bottom: -180px; right: -180px;
  animation-delay: 0.3s, -8s;
  opacity: 0.11;
}
.orb--pink {
  width: 420px; height: 420px;
  background: radial-gradient(circle at 50% 50%, #ec4899 0%, transparent 70%);
  top: 55%; left: 55%;
  transform: translate(-50%, -50%);
  animation-delay: 0.6s, -16s;
  opacity: 0.07;
}

@keyframes orb-in {
  from { opacity: 0; } to { opacity: inherit; }
}

@keyframes drift {
  0%,100% { transform: translate(0px,  0px)  scale(1);    }
  25%      { transform: translate(28px,-24px) scale(1.04); }
  50%      { transform: translate(-18px,18px) scale(0.97); }
  75%      { transform: translate(22px, 26px) scale(1.02); }
}

/* Dot-grid overlay */
.grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* ── Header ──────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  animation: slide-down 0.7s var(--ease) both;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo */
.logo {
  text-decoration: none;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo__dual { color: var(--text); }
.logo__blox {
  background: linear-gradient(135deg, var(--purple2), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Language switcher */
.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slide-down 0.7s var(--ease) 0.1s both;
}
.lang__btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 100px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.lang__btn--on,
.lang__btn[aria-pressed="true"] { color: var(--text); }
.lang__btn:hover:not(.lang__btn--on):not([aria-pressed="true"]) { color: var(--purple2); }
.lang__bar {
  width: 1px; height: 14px;
  background: var(--border);
  display: block;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 72px;
  position: relative;
  z-index: 1;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.025),
    0 32px 72px var(--shadow);
  padding: 64px 56px;
  max-width: 580px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  animation: fade-up 0.9s var(--ease) 0.15s both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--purple2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge__dot {
  width: 7px; height: 7px;
  background: var(--purple);
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.5); opacity: 1; }
  50%      { box-shadow: 0 0 0 6px rgba(124,58,237,0); opacity: 0.6; }
}

/* Title */
.title {
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 45%, #67e8f9 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.cursor {
  display: inline-block;
  -webkit-text-fill-color: var(--purple2);
  animation: blink 1.1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink {
  0%,100% { opacity: 1; } 50% { opacity: 0; }
}

/* Subtitle */
.subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted2);
  line-height: 1.75;
  max-width: 360px;
}

/* CTA button */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border: none;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(124,58,237,0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  animation: btn-glow 3s ease-in-out infinite;
}
@keyframes btn-glow {
  0%,100% { box-shadow: 0 8px 30px rgba(124,58,237,0.35); }
  50%      { box-shadow: 0 8px 42px rgba(124,58,237,0.55), 0 0 24px rgba(6,182,212,0.25); }
}
.btn-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--purple2), #22d3ee);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.btn-cta:hover { transform: translateY(-3px); }
.btn-cta:hover::after { opacity: 1; }
.btn-cta:active { transform: translateY(-1px); }
.btn-cta svg, .btn-cta span { position: relative; z-index: 1; }
.btn-cta svg { width: 18px; height: 18px; }

/* ── Modal ───────────────────────────────────────────── */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-wrap[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: bd-in 0.25s var(--ease) both;
}
@keyframes bd-in {
  from { opacity: 0; } to { opacity: 1; }
}

.modal {
  position: relative;
  z-index: 1;
  background: rgba(14,14,26,0.96);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  padding: 40px;
  width: 100%;
  max-width: 460px;
  animation: modal-in 0.35s var(--spring) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.modal__title {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.modal__close {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.modal__close svg { width: 15px; height: 15px; }
.modal__close:hover { background: rgba(255,255,255,0.07); color: var(--text); }

/* Form */
.mform {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}
.field__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.field__input,
.field__area {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 0.93rem;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
  resize: none;
}
.field__area { min-height: 110px; line-height: 1.65; }
.field__input:focus,
.field__area:focus {
  border-color: var(--border-focus);
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.field__input::placeholder,
.field__area::placeholder { color: rgba(148,163,184,0.4); }

.field__count {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  margin-top: 2px;
}

/* Submit */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124,58,237,0.3);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), opacity 0.2s;
}
.btn-submit svg { width: 15px; height: 15px; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124,58,237,0.45); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Success */
.success {
  text-align: center;
  padding: 12px 0 4px;
  animation: fade-up 0.4s var(--ease) both;
}
.success__ring {
  width: 66px; height: 66px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.5s var(--spring) both;
}
@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success__ring svg { width: 28px; height: 28px; color: #fff; }
.success__ttl {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.success__sub { color: var(--muted2); font-size: 0.9rem; }

/* ── Suggestions view (shared styles) ───────────────── */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  padding: 100px 24px 60px;
}

.page-head {
  max-width: 900px;
  width: 100%;
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.count-pill {
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  color: var(--purple2);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--muted2);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-refresh svg { width: 14px; height: 14px; }
.btn-refresh:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-refresh.spin svg { animation: spin 0.6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Grid */
.sug-grid {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Suggestion card */
.sug-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  animation: fade-up 0.5s var(--ease) both;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.sug-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.sug-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sug-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sug-name { font-size: 0.92rem; font-weight: 600; }
.sug-time { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }

.sug-text {
  font-size: 0.87rem;
  color: var(--muted2);
  line-height: 1.7;
  word-break: break-word;
}

/* Empty state */
.empty {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}
.empty svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.35; }
.empty p { font-size: 0.95rem; }

/* ── Error banner ────────────────────────────────────── */
.error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #fca5a5;
  width: 100%;
  animation: fade-up 0.3s var(--ease) both;
}
.error-banner svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Roblox login button ─────────────────────────────── */
.btn-roblox {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  background: #1a1a28;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s var(--ease), border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.btn-roblox svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-roblox:hover {
  background: #22223a;
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}
.btn-roblox:active { transform: translateY(0); }

/* ── Ghost CTA variant ───────────────────────────────── */
.btn-cta--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted2);
  box-shadow: none;
  animation: none;
  font-size: 0.88rem;
  padding: 11px 26px;
}
.btn-cta--ghost::after { display: none; }
.btn-cta--ghost:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  color: var(--text);
  box-shadow: none;
}

/* ── Setup page ──────────────────────────────────────── */
.setup-card {
  max-width: 540px;
  gap: 20px;
  padding: 52px 48px;
  align-items: flex-start;
  text-align: left;
}

.setup-step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.setup-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(6,182,212,0.15));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple2);
  animation: fade-up 0.6s var(--ease) 0.1s both;
}
.setup-icon svg { width: 24px; height: 24px; }

.setup-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.setup-sub {
  font-size: 0.9rem;
  color: var(--muted2);
  line-height: 1.7;
}
.setup-sub strong { color: var(--text); font-weight: 600; }

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  animation: fade-up 0.5s var(--ease) both;
}
.step:last-child { border-bottom: none; }
.step:nth-child(1) { animation-delay: 0.15s; }
.step:nth-child(2) { animation-delay: 0.25s; }
.step:nth-child(3) { animation-delay: 0.35s; }

.step__num {
  width: 26px; height: 26px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}

.step__body { flex: 1; }
.step__title { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.step__desc { font-size: 0.82rem; color: var(--muted2); line-height: 1.6; }

.scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.scope-tag {
  display: inline-block;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--r-sm);
  padding: 3px 10px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--purple2);
}

/* API key input wrapper */
.key-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.key-wrap .field__input {
  padding-right: 48px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  width: 100%;
}
.key-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.key-toggle:hover { color: var(--text); }
.key-toggle svg { width: 17px; height: 17px; }

/* Setup status message */
.setup-status {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  animation: fade-up 0.3s var(--ease) both;
}
.setup-status.error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
}
.setup-status.success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  color: #6ee7b7;
}

/* Link style */
.link {
  color: var(--purple2);
  text-decoration: none;
  border-bottom: 1px solid rgba(168,85,247,0.3);
  transition: border-color 0.2s, color 0.2s;
}
.link:hover { color: var(--cyan); border-color: rgba(6,182,212,0.5); }

/* ── Home — Navbar ───────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 36px;
  background: rgba(7,7,15,0.7);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: slide-down 0.6s var(--ease) both;
}

.nav__user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav__avatar-wrap {
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(124,58,237,0.4);
  flex-shrink: 0;
}

.nav__avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
}
.nav__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.nav__username {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav__logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--muted2);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav__logout svg { width: 14px; height: 14px; }
.nav__logout:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.25);
  color: #fca5a5;
}

/* ── Home — Main content ─────────────────────────────── */
.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 100px 24px 72px;
  position: relative;
  z-index: 1;
  max-width: 740px;
  margin: 0 auto;
  width: 100%;
}

/* Profile card */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.025),
    0 24px 60px var(--shadow);
  padding: 36px 40px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  animation: fade-up 0.8s var(--ease) 0.1s both;
}

.profile-card__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-card__avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, var(--purple), var(--cyan)) border-box;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  background-color: #1a1a2e;
  overflow: hidden;
}
.profile-card__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.profile-card__online-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 14px; height: 14px;
  background: #10b981;
  border: 2px solid var(--bg);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.profile-card__info {
  flex: 1;
  min-width: 0;
}

.profile-card__display {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.profile-card__username {
  font-size: 0.9rem;
  color: var(--muted2);
  margin-bottom: 14px;
}

.profile-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-weight: 600;
}
.profile-badge svg { width: 13px; height: 13px; }

.profile-badge--id {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.22);
  color: var(--purple2);
}
.profile-badge--member {
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.2);
  color: var(--cyan);
}

/* Coming soon section on home */
.home-soon {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 16px 48px var(--shadow);
  padding: 48px 40px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: fade-up 0.8s var(--ease) 0.25s both;
}

.home-soon__title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #67e8f9 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}

.home-soon__sub {
  font-size: 0.95rem;
  color: var(--muted2);
  font-weight: 300;
  line-height: 1.7;
  max-width: 400px;
}

/* ── Legal pages ─────────────────────────────────────── */
.legal-page {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 100px 24px 72px;
  position: relative;
  z-index: 1;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 24px 60px var(--shadow);
  padding: 52px 56px;
  max-width: 680px;
  width: 100%;
  animation: fade-up 0.8s var(--ease) both;
}

.legal-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.legal-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 36px;
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-body h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: -8px;
}

.legal-body p {
  font-size: 0.9rem;
  color: var(--muted2);
  line-height: 1.75;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
  .header { padding: 18px 20px; }
  .nav { padding: 14px 20px; }
  .card { padding: 44px 28px; gap: 22px; }
  .setup-card { padding: 40px 24px; }
  .modal { padding: 30px 22px; }
  .page { padding: 90px 16px 48px; }
  .profile-card { flex-direction: column; text-align: center; padding: 30px 24px; gap: 20px; }
  .profile-card__info { width: 100%; }
  .profile-card__badges { justify-content: center; }
  .home-soon { padding: 36px 24px; }
  .legal-card { padding: 36px 24px; }
  .nav__username { display: none; }
}

@media (max-width: 400px) {
  .card { padding: 36px 20px; }
  .title { font-size: 2.2rem; }
  .setup-title { font-size: 1.4rem; }
}
