/* ============================================================
   NOVENTIS — Main Stylesheet
   ============================================================ */

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

/* DESIGN TOKENS — "Noventis" monochrome black/white theme */
:root {
  --bg:          #000000;
  --bg1:         #080808;
  --bg2:         #0f0f0f;
  --bg3:         #161616;
  --bg4:         #1f1f1f;
  --border:      #1c1c1c;
  --border2:     #2e2e2e;
  --text:        #f7f7f7;
  --text2:       #b0b0b0;
  --text3:       #6d6d6d;
  --mint:        #ffffff;
  --mint-dim:    #2a2a2a;
  --maroon:      #4a4a4a;
  --maroon-light:#e8e8e8;
  --honey:       #d4d4d4;
  --honey-dim:   #333333;
  --pink:        #ffffff;
  --pink2:       #d8d8d8;
  --love:        linear-gradient(135deg, #ffffff, #bdbdbd, #6f6f6f);
  --love2:       linear-gradient(135deg, #ededed, #9a9a9a);

  /* Glow accents */
  --glow:        rgba(255,255,255,0.35);
  --glow-soft:   rgba(255,255,255,0.16);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* Radii & motion */
  --r:          12px;
  --r2:          8px;
  --transition:  all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Alias for pure background (used in gradients/overlays) */
  --bg0: #070707;
}

/* BASE */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }

button { font-family: var(--font-body); }

/* SCROLLBAR */
::-webkit-scrollbar        { width: 4px; height: 4px; }
::-webkit-scrollbar-track  { background: var(--bg1); }
::-webkit-scrollbar-thumb  { background: var(--border2); border-radius: 2px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* PAGES */
.page {
  display: none;
  padding-top: 60px;
  min-height: 100vh;
}
.page.active { display: block; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1.5rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 100%; height: 100%; fill: white; display: block; }
.logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.22)); }
.auth-logo .logo-icon img { width: 100%; height: 100%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  background: none;
  border: none;
  color: var(--text2);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--r2);
  cursor: pointer;
  transition: var(--transition);
}
.nav-link:hover  { color: var(--text); background: var(--bg2); }
.nav-link.active { color: var(--mint); }

.nav-btn {
  background: var(--love2);
  border: none;
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 18px;
  border-radius: var(--r2);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1.5px solid var(--border2);
  cursor: pointer;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: 12px;
  transition: var(--transition);
  position: relative;
}
.nav-avatar:hover { border-color: var(--pink); }
.nav-avatar > img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.nav-avatar > i.fa-user { font-size: 11px; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r2);
  transition: var(--transition);
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.nav-hamburger:hover { color: var(--text); background: var(--bg2); }

.nav-mobile-overlay {
  display: none;
  position: fixed;
  top: 52px; left: 0; right: 0;
  background: rgba(8,8,8,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  padding: 0.75rem 1rem 1.25rem;
  z-index: 99;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
}
.nav-mobile-overlay.open {
  display: flex;
  animation: mobileNavIn 0.18s ease;
}
@keyframes mobileNavIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.nav-mobile-link {
  display: block;
  padding: 11px 14px;
  color: var(--text2);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border-radius: var(--r2);
  transition: var(--transition);
}
.nav-mobile-link:hover { color: var(--text); background: var(--bg2); }
.nav-mobile-link.active { color: var(--mint); }
.nav-mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--love2);
  color: white;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 12px 18px;
  border-radius: var(--r2);
  margin-top: 8px;
  transition: var(--transition);
}
.nav-mobile-btn:hover { opacity: 0.85; }
.nav-mobile-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* DM image attach button hover (replaces removed inline onmouseover/onmouseout) */
#dm-img-btn:hover { border-color: var(--pink) !important; color: var(--pink) !important; }

/* Chat / DM message images — preserve aspect ratio, never crop */
.dm-img-plain { max-width:320px;max-height:400px;border-radius:8px;display:block;cursor:pointer;object-fit:contain; }

/* Anchor resets — allow <a> elements to be used in place of <button> for navigation */
a.nav-logo { text-decoration: none; color: var(--text); }
a.nav-link  { text-decoration: none; }
a.nav-btn   { text-decoration: none; }
a.btn-primary, a.btn-ghost { text-decoration: none; }
/* Footer links: hover handled via CSS instead of inline onmouseover/onmouseout */
.footer-link { color: var(--text2); text-decoration: none; transition: color .2s; }
.footer-link:hover { color: var(--text) !important; }

/* ============================================================
   LANDING — HERO
   ============================================================ */
.hero {
  padding: 120px 2rem 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.75rem;
  color: var(--text2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.hero-eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--mint);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: var(--love);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tw-cursor {
  display: inline-block;
  color: #ffffff;
  font-weight: 500;
  margin-left: 2px;
  animation: tw-blink 0.9s step-end infinite;
}

@keyframes tw-blink {
  0%, 49%  { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero > p {
  font-size: 1.1rem;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--love2);
  border: none;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: var(--r);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,255,255,0.25);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 13px 28px;
  border-radius: var(--r);
  cursor: pointer;
  transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--text3); background: var(--bg2); }

/* HERO VISUAL CARDS */
.hero-visual {
  max-width: 900px;
  margin: 5rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  padding: 0 1rem;
}
.hv-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  text-align: left;
  transition: var(--transition);
}
.hv-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.hv-icon {
  width: 40px; height: 40px;
  border-radius: var(--r2);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.hv-icon.pink  { background: rgba(255,255,255,0.12); color: var(--pink); }
.hv-icon.mint  { background: rgba(255,255,255,0.10);  color: var(--mint); }
.hv-icon.honey { background: rgba(230,230,230,0.10);   color: var(--honey); }
.hv-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.hv-card p  { font-size: 0.8rem;  color: var(--text2); line-height: 1.6; }

/* ============================================================
   LANDING — SECTIONS
   ============================================================ */
.section {
  padding: 80px 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink);
  font-weight: 600;
  margin-bottom: 1rem;
}
.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
  max-width: 500px;
}
.section > p {
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 3rem;
}

/* FEATURES GRID */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
}
.feature-item {
  background: var(--bg);
  padding: 2rem;
  transition: var(--transition);
}
.feature-item:hover { background: var(--bg1); }
.feature-item i    { font-size: 1.3rem; color: var(--pink2); margin-bottom: 1rem; display: block; }
.feature-item h4   { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-item p    { font-size: 0.82rem; color: var(--text2); line-height: 1.65; }

/* DIVIDER */
.divider { height: 1px; background: var(--border); margin: 0 2rem; }

/* STEPS */
.steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}
.step { text-align: center; }
.step-num {
  width: 36px; height: 36px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--pink);
  margin: 0 auto 1rem;
}
.step h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; }
.step p  { font-size: 0.8rem; color: var(--text2); }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text3);
  font-size: 0.78rem;
}

/* ============================================================
   AUTH
   ============================================================ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 100px 1.5rem 60px;
  box-sizing: border-box;
  background: var(--bg);
}
.auth-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 480px;
  text-align: center;
}
.auth-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2rem;
}
.auth-logo .logo-icon { width: 68px; height: 68px; }
.auth-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.auth-card > p {
  color: var(--text2);
  font-size: 0.88rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.discord-btn {
  width: 100%;
  background: #1c1c1c;
  border: none;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px;
  border-radius: var(--r2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  margin-bottom: 1rem;
}
.discord-btn:hover { background: #2a2a2a; transform: translateY(-1px); }

/* FORMS */
.form-group  { text-align: left; margin-bottom: 1rem; }
.form-label  { display: block; font-size: 0.78rem; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-input  {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.form-input:focus        { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,255,255,0.1); }
.form-input::placeholder { color: var(--text3); }
.select-input {
  -webkit-appearance: none;
  appearance: none;
}
.textarea-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  resize: vertical;
  min-height: 100px;
}
.textarea-input:focus { border-color: var(--pink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-btn {
  width: 100%;
  background: var(--love2);
  border: none;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px;
  border-radius: var(--r2);
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}
.form-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 60px;
}

.sidebar {
  width: 220px;
  background: var(--bg1);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: fixed;
  top: 60px; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar-section  { padding: 0 1rem; margin-bottom: 0.5rem; }
.sidebar-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 600;
  padding: 0 8px;
  margin-bottom: 0.4rem;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r2);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text2);
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}
.sidebar-item:hover  { background: var(--bg2); color: var(--text); }
.sidebar-item.active { background: rgba(255,255,255,0.1); color: var(--pink); font-weight: 500; }
.sidebar-item i      { width: 18px; text-align: center; font-size: 0.85rem; }
@keyframes sb-shimmer { 0%,100% { opacity:.35 } 50% { opacity:.65 } }
.sidebar.loading .sidebar-label {
  color: transparent;
  background: var(--bg2);
  border-radius: 3px;
  width: 52%;
  animation: sb-shimmer 1.4s ease-in-out infinite;
}
.sidebar.loading .sidebar-item {
  color: transparent !important;
  background: var(--bg2) !important;
  pointer-events: none;
  animation: sb-shimmer 1.4s ease-in-out infinite;
}
.sidebar.loading .sidebar-item i,
.sidebar.loading .sidebar-item span { color: transparent !important; background: var(--border2); border-radius: 3px; }
.sidebar.loading #sb-ring,
.sidebar.loading #sb-badges,
.sidebar.loading #sb-premium-link,
.sidebar.loading #sb-booster-link { display: flex !important; }
.dash-content {
  margin-left: 220px;
  flex: 1;
  width: 100%;
  padding: 2rem;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.dash-header h2   { font-size: 1.4rem; font-weight: 700; }
.dash-subheader   { color: var(--text2); font-size: 0.85rem; margin-top: 4px; }

/* PROFILE CARD */
.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.profile-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  text-align: center;
}
.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 1rem; }
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--bg3);
  border: 3px solid var(--border2);
  object-fit: cover;
}
.profile-avatar-placeholder {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border: 3px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text3);
  margin: 0 auto;
}
.avatar-edit {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 26px; height: 26px;
  background: var(--love2);
  border-radius: 50%;
  border: 2px solid var(--bg1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.7rem;
  color: white;
  transition: var(--transition);
}
.avatar-edit:hover { transform: scale(1.1); }
.profile-name     { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 0.2rem; }
.profile-username { color: var(--text3); font-size: 0.8rem; margin-bottom: 1rem; font-family: var(--font-mono); }
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  color: var(--mint);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.pstat         { background: var(--bg2); border-radius: var(--r2); padding: 0.8rem; text-align: center; }
.pstat-val     { font-size: 1.3rem; font-weight: 700; font-family: var(--font-display); }
.pstat-label   { font-size: 0.72rem; color: var(--text3); }

.profile-edit-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
}
.profile-edit-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.save-btn {
  background: var(--love2);
  border: none;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 24px;
  border-radius: var(--r2);
  cursor: pointer;
  transition: var(--transition);
}
.save-btn:hover { opacity: 0.85; }

/* STATS CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.2rem;
  transition: var(--transition);
  min-width: 0;
  overflow: hidden;
}
.stat-card:hover { border-color: var(--border2); }
.stat-num       { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin-bottom: 2px; overflow-wrap: break-word; word-break: break-word; }
.stat-num.mint  { color: var(--mint); }
.stat-num.pink  { color: var(--pink); }
.stat-num.honey { color: var(--honey); }
.stat-label     { font-size: 0.78rem; color: var(--text3); }

/* ============================================================
   MATCHING
   ============================================================ */
.match-prefs {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  max-width: 460px;
  margin: 0 auto;
}
.match-prefs h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.4rem; }
.match-prefs p  { color: var(--text2); font-size: 0.85rem; margin-bottom: 2rem; }

.gender-opts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.gender-opt {
  background: var(--bg2);
  border: 1.5px solid var(--border2);
  border-radius: var(--r);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.gender-opt:hover          { border-color: var(--pink2); }
.gender-opt.selected       { border-color: var(--pink2); background: rgba(255,255,255,0.08); }
.gender-opt i              { font-size: 1.4rem; margin-bottom: 0.4rem; display: block; color: var(--text2); }
.gender-opt.selected i     { color: var(--pink2); }
.gender-opt span           { font-size: 0.8rem; font-weight: 600; }

.range-label { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; margin-bottom: 0.5rem; }
.range-val   { font-family: var(--font-mono); font-size: 0.82rem; color: var(--pink); font-weight: 500; }
.range-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  background: var(--love2);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}
.range-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--love2);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.start-match-btn {
  width: 100%;
  background: var(--love);
  border: none;
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  padding: 16px;
  border-radius: var(--r);
  cursor: pointer;
  margin-top: 1.5rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.start-match-btn:hover { opacity: 0.88; transform: translateY(-2px); }

/* SWIPE CARD */
.swipe-container { display: flex; flex-direction: column; align-items: center; padding: 2rem; }
.swipe-header        { text-align: center; margin-bottom: 1.5rem; }
.swipe-header h2     { font-size: 1.2rem; font-weight: 700; }
.swipe-header p      { color: var(--text2); font-size: 0.82rem; }

.swipe-deck {
  position: relative;
  width: 340px; height: 480px;
  margin: 0 auto 1.5rem;
}
.swipe-card {
  position: absolute;
  inset: 0;
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: 20px;
  overflow: hidden;
  cursor: grab;
  transform-origin: 50% 100%;
  transition: transform 0.15s ease;
  display: flex;
  flex-direction: column;
  user-select: none;
}
.swipe-card.behind { transform: scale(0.95) translateY(12px); z-index: 0; filter: brightness(0.6); }
.swipe-card.front  { z-index: 1; }
.swipe-card.dragging { transition: none; cursor: grabbing; }

.swipe-card-img {
  flex: 1;
  background: linear-gradient(180deg, var(--bg3) 60%, var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.roblox-avatar             { width: 180px; height: auto; opacity: 0.9; image-rendering: pixelated; }
.roblox-avatar-placeholder {
  width: 120px; height: 140px;
  background: var(--bg3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--bg4);
}

.swipe-like-label,
.swipe-nope-label {
  position: absolute;
  top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 6px 16px;
  border-radius: var(--r2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
}
.swipe-like-label {
  left: 1.5rem;
  background: rgba(255,255,255,0.15);
  border: 2px solid var(--mint);
  color: var(--mint);
  transform: rotate(-15deg);
}
.swipe-nope-label {
  right: 1.5rem;
  background: rgba(90,90,90,0.15);
  border: 2px solid var(--maroon-light);
  color: var(--maroon-light);
  transform: rotate(15deg);
}

.swipe-card-info { padding: 1.25rem; border-top: 1px solid var(--border); }
.swipe-user-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.swipe-user-meta { color: var(--text2); font-size: 0.82rem; margin-top: 4px; display: flex; gap: 12px; }
.swipe-user-meta span { display: flex; align-items: center; gap: 5px; }

.swipe-actions { display: flex; gap: 1rem; justify-content: center; }
.swipe-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  transition: var(--transition);
  background: var(--bg1);
}
.swipe-btn.nope, .swipe-btn.pass  { border-color: var(--maroon-light); color: var(--maroon-light); }
.swipe-btn.like  { border-color: var(--mint);         color: var(--mint); }
.swipe-btn.super { border-color: var(--honey);        color: var(--honey); }
.swipe-btn:hover          { transform: scale(1.1); }
.swipe-btn.nope:hover, .swipe-btn.pass:hover  { background: rgba(90,90,90,0.1); }
.swipe-btn.like:hover  { background: rgba(255,255,255,0.08); }
.swipe-btn.super:hover { background: rgba(230,230,230,0.08); }

/* MATCH MODAL */
.match-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.match-modal {
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  width: 380px;
  animation: matchIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes matchIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.match-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 0.4rem;
  background: var(--love);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.match-sub     { color: var(--text2); font-size: 0.88rem; margin-bottom: 2rem; }
.match-avatars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}
.match-av {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--bg3);
  border: 3px solid var(--bg1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.match-av:first-child { margin-right: -15px; z-index: 1; }
.match-av:last-child  { margin-left: -15px;  z-index: 0; }
.match-heart {
  width: 32px; height: 32px;
  background: var(--love2);
  border-radius: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: white;
  border: 3px solid var(--bg1);
}
.match-modal .btn-primary { width: 100%; justify-content: center; margin-bottom: 0.75rem; border-radius: var(--r2); }
.match-modal .btn-ghost   { width: 100%; justify-content: center; border-radius: var(--r2); font-size: 0.85rem; }

/* ============================================================
   CHAT
   ============================================================ */
.chat-layout   { display: flex; height: calc(100vh - 60px); overflow: hidden; }
/* When chat is inside dash-layout (with sidebar), offset it */
.dash-layout .chat-layout { margin-left: 220px; height: 100%; }
@media (max-width: 900px) {
  .dash-layout .chat-layout { margin-left: 0; }
}
.chat-list {
  width: 300px;
  background: var(--bg1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.chat-list-header {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-list-header h3 { font-size: 1rem; font-weight: 700; }

.chat-search { position: relative; padding: 0.75rem; }
.chat-search input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 8px 12px 8px 34px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
}
.chat-search input::placeholder { color: var(--text3); }
.chat-search i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 0.8rem;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
  flex-shrink: 0;
}
.img-load-wrap {
  display: inline-block;
  position: relative;
  overflow: hidden;
  min-width: 80px;
  min-height: 60px;
  border-radius: 8px;
  vertical-align: top;
}
.img-load-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
  z-index: 1;
}
.img-load-wrap.img-loaded::before {
  opacity: 0;
  animation: none;
}
.img-load-wrap > img {
  opacity: 0;
  transition: opacity 0.25s ease;
  display: block;
}
.img-load-wrap.img-loaded > img {
  opacity: 1;
}
.chat-rooms { flex: 1; overflow-y: auto; }
.chat-room-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.chat-room-item:hover,
.chat-room-item.active { background: var(--bg2); }

.chat-room-av {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text2);
  flex-shrink: 0;
  position: relative;
}
.chat-room-av.online::after {
  content: '';
  position: absolute;
  bottom: 1px; right: 1px;
  width: 9px; height: 9px;
  background: var(--mint);
  border-radius: 50%;
  border: 2px solid var(--bg1);
}

.chat-room-info   { flex: 1; min-width: 0; }
.chat-room-name   { font-size: 0.88rem; font-weight: 600; display: flex; justify-content: space-between; }
.chat-room-time   { font-size: 0.68rem; color: var(--text3); font-weight: 400; }
.chat-room-preview {
  font-size: 0.78rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.chat-room-badge {
  background: var(--pink2);
  color: white;
  border-radius: 100px;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 4px;
  font-family: var(--font-mono);
}

.chat-main { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.chat-top {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border2);
  box-shadow: 0 1px 8px rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
  flex-shrink: 0;
  min-height: 62px;
  z-index: 10;
}
.chat-top-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.chat-top-info    { flex: 1; }
.chat-top-name    { font-size: 0.95rem; font-weight: 700; }
.chat-top-status  { font-size: 0.75rem; display: flex; align-items: center; gap: 5px; }
.chat-top-actions { display: flex; gap: 4px; }
.chat-icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--r2);
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: var(--transition);
}
.chat-icon-btn:hover { background: var(--bg2); color: var(--text); }

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 0;
}
.message       { display: flex; flex-direction: column; gap: 0; border-radius: 6px; padding: 2px 8px; margin: 0 -8px; transition: background .08s; }
.message:hover { background: rgba(255,255,255,0.035); }
.message-row   { display: flex; gap: 14px; align-items: flex-start; }
.message-row > div { align-items: flex-start; display: flex; flex-direction: column; }
.message-av {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  color: var(--text2);
}
.message-bubble {
  max-width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}
.message-meta { font-size: 0.65rem; color: var(--text3); margin-top: 1px; padding: 0; }
.message-timestamp { font-size: 0.68rem; color: var(--text3); font-weight: 400; margin-left: 6px; }

.message.grouped { padding: 0 8px; margin-top: -15px; }
.message:not(.grouped) + .message.grouped { margin-top: -20px; }
.message.grouped .message-bubble { padding: 0; }
.msg-av-gap { width: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 2px; }
.grouped-time { font-size: 0.58rem; color: var(--text3); opacity: 0; transition: opacity 0.1s; white-space: nowrap; user-select: none; }
.message.grouped:hover .grouped-time { opacity: 1; }

.typing-indicator { display: flex; align-items: center; gap: 10px; padding: 0.5rem; }
.typing-dots      { display: flex; gap: 4px; }
.typing-dot {
  width: 7px; height: 7px;
  background: var(--text3);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-6px); }
}

.chat-input-area {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg1);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.chat-input-tools { display: flex; gap: 2px; margin-bottom: 0.5rem; }
.chat-tool-btn {
  width: 30px; height: 30px;
  border-radius: var(--r2);
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: var(--transition);
}
.chat-tool-btn:hover { background: var(--bg2); color: var(--text2); }
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  resize: none;
  max-height: 120px;
  transition: var(--transition);
  line-height: 1.5;
}
.chat-input:focus       { border-color: var(--pink); }
.chat-input::placeholder { color: var(--text3); }
.send-btn {
  width: 42px; height: 42px;
  background: var(--love2);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.send-btn:hover { opacity: 0.85; transform: scale(1.05); }

/* PUBLIC CHAT */
.public-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg1);
  flex-shrink: 0;
}
.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(90,90,90,0.2);
  border: 1px solid rgba(230,230,230,0.3);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--maroon-light);
}
.live-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--maroon-light);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
.rate-limit-banner {
  padding: 0.5rem 1.5rem;
  font-size: 0.72rem;
  color: var(--text3);
  background: rgba(230,230,230,0.05);
  border-top: 1px solid rgba(230,230,230,0.1);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.admin-table th {
  padding: 10px 14px;
  text-align: left;
  color: var(--text3);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg2); }
.table-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  margin-right: 8px;
  vertical-align: middle;
  color: var(--text2);
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}
.admin-badge.active  { background: rgba(255,255,255,0.1);  color: var(--mint);         border: 1px solid rgba(255,255,255,0.2); }
.admin-badge.banned  { background: rgba(90,90,90,0.2);   color: var(--maroon-light); border: 1px solid rgba(230,230,230,0.2); }
.admin-badge.warning { background: rgba(230,230,230,0.1);   color: var(--honey);        border: 1px solid rgba(230,230,230,0.2); }

.action-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 5px 12px;
  color: var(--text2);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.action-btn:hover { border-color: var(--border2); color: var(--text); }
.action-btn.danger { color: var(--maroon-light); border-color: rgba(230,230,230,0.3); }
.action-btn.danger:hover { background: rgba(90,90,90,0.1); }

.admin-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg2);
  border-radius: var(--r2);
  padding: 3px;
  margin-bottom: 1.5rem;
  width: fit-content;
}
.admin-tab {
  background: none;
  border: none;
  color: var(--text2);
  font-family: var(--font-body);
  font-size: 0.83rem;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.admin-tab.active { background: var(--bg1); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* UPLOADS / GAMES */
.upload-form-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.uploads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.upload-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.2rem;
  transition: var(--transition);
}
.upload-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.upload-card-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--r2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--pink);
  margin-bottom: 0.8rem;
}
.upload-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; }
.upload-card p  { font-size: 0.78rem; color: var(--text2); margin-bottom: 0.8rem; line-height: 1.5; }
.upload-card-link {
  font-size: 0.75rem;
  color: var(--pink);
  font-family: var(--font-mono);
  display: block;
  margin-bottom: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-card-actions { display: flex; gap: 8px; }

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: calc(2rem + var(--safe-bottom, 0px)); right: 2rem;
  z-index: 500;
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 320px;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast.success .toast-icon { color: var(--mint); }
.toast.error   .toast-icon { color: var(--maroon-light); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }

/* ============================================================
   NOTIFICATION POPUP STACK (global, injected by nav.js)
   ============================================================ */
._notif-popup {
  position: fixed;
  bottom: calc(1.2rem + var(--safe-bottom, 0px) + var(--stack-offset, 0px));
  right: 1.2rem;
  z-index: 9000;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-left: 3px solid currentColor;
  border-radius: var(--r);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34,1.4,0.64,1), opacity 0.3s ease, bottom 0.3s ease;
  user-select: none;
}
._notif-popup-show { transform: translateX(0); opacity: 1; }
._notif-popup-out  { transform: translateX(calc(100% + 2rem)); opacity: 0; }
._notif-popup-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
._notif-popup-body { flex: 1; min-width: 0; }
._notif-popup-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
._notif-popup-sub {
  font-size: 0.74rem;
  color: var(--text2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
._notif-popup-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
._notif-popup-close:hover { color: var(--text2); }

/* ============================================================
   MISC HELPERS
   ============================================================ */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i  { font-size: 2.5rem; color: var(--text3); margin-bottom: 1rem; display: block; }
.empty-state h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.empty-state p  { color: var(--text2); font-size: 0.83rem; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 0.72rem;
  color: var(--text2);
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text3);
  font-size: 0.75rem;
  margin: 1.5rem 0;
}
.section-divider::before,
.section-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ROBLOX TAG */
.roblox-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--r2);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text2);
}
.roblox-dot { width: 8px; height: 8px; background: #bdbdbd; border-radius: 50%; }

/* SETTINGS TOGGLE */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.toggle-row-label-main { font-size: 0.88rem; font-weight: 500; }
.toggle-row-label-sub  { font-size: 0.78rem; color: var(--text2); }
.toggle {
  width: 40px; height: 22px;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle.on  { background: var(--love2); }
.toggle.off { background: var(--bg3); border: 1px solid var(--border2); }
.toggle-thumb {
  position: absolute;
  top: 2px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: left 0.2s;
}
.toggle.on  .toggle-thumb { right: 2px; left: auto; }
.toggle.off .toggle-thumb { left: 2px; background: var(--text3); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero h1     { font-size: 2.5rem; }
  .hero-visual { grid-template-columns: 1fr; }
  .steps       { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .form-row    { grid-template-columns: 1fr; }
  .dash-content { margin-left: 0; }
  .chat-list   { width: 100%; }
  .footer { flex-direction: column; gap: 0.75rem; text-align: center; }
}
/* ============================================================
   MOBILE & TABLET RESPONSIVE — v2
   ============================================================ */

/* Mobile bottom nav */
#mobile-back-bar { display: none; }
#chat-active { flex: 1; }
/* Single-panel mobile: mobile back bar replaces the in-chat header */
@media (max-width: 767px) {
  #chat-top { display: none !important; }
  #chat-active { padding-top: 54px; }
}
/* Account for mobile nav bar height on the chat page */
#chat-input-footer { padding-bottom: 60px; }
@media (max-width: 900px) {
  .chat-layout { height: calc(100% - 45px) !important; }
  #chat-input-footer { padding-bottom: 5px; }
}
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg1);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.mobile-nav-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; background: none; border: none;
  color: var(--text3); font-size: 0.6rem; cursor: pointer;
  padding: 6px 12px; border-radius: var(--r2);
  font-family: var(--font-body); transition: var(--transition);
}
.mobile-nav-btn i { font-size: 1.2rem; }
.mobile-nav-btn.active { color: var(--pink); }

/* Chat responsive */
.chat-panel-visible .chat-list { display: flex; }
.chat-panel-visible .chat-main { display: none; }
.chat-main-visible .chat-list  { display: none; }
.chat-main-visible .chat-main  { display: flex; }

/* Leaderboard */
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r2);
}
.lb-rank { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text3); width: 24px; text-align: center; }
.lb-rank.gold   { color: #f2f2f2; font-weight: 700; }
.lb-rank.silver { color: #c0c0c0; font-weight: 700; }
.lb-rank.bronze { color: #9a9a9a; font-weight: 700; }
.lb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  overflow: hidden; background: var(--bg3);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lb-avatar.lb-av-gold   { box-shadow: 0 0 0 2.5px #f2f2f2, 0 0 10px rgba(242,242,242,0.55); }
.lb-avatar.lb-av-silver { box-shadow: 0 0 0 2.5px #c0c0c0, 0 0 10px rgba(192,192,192,0.45); }
.lb-avatar.lb-av-bronze { box-shadow: 0 0 0 2.5px #9a9a9a, 0 0 10px rgba(154,154,154,0.45); }
.lb-name  { font-size: 0.9rem; font-weight: 600; }
.lb-meta  { font-size: 0.75rem; color: var(--text2); }
.lb-likes { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 0.85rem; color: var(--pink); font-weight: 600; }

/* Roblox verify modal */
.verify-step { display: none; }
.verify-step.active { display: block; }
.verify-code-box {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--r2); padding: 1rem;
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--mint); word-break: break-all;
  margin: 1rem 0; user-select: all;
}

/* Discord-style hover message toolbar */
.msg-actions-wrap {
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  display:flex;align-items:center;gap:2px;
  background:#161616;border:1px solid var(--border);
  border-radius:8px;padding:2px 4px;
  opacity:0;pointer-events:none;
  transition:opacity .12s;z-index:100;
}
.message { position:relative; }
.message:hover .msg-actions-wrap,
.message-wrap:hover .msg-actions-wrap,
.message-wrap.menu-open .msg-actions-wrap,
.message-wrap.reply-active .msg-actions-wrap { opacity:1;pointer-events:auto; }
.message-wrap.menu-open,
.message-wrap.reply-active { background: rgba(255,255,255,0.035); }
.message-wrap.reply-active .msg-actions-wrap { opacity:1;pointer-events:auto; }
.message-wrap.mentioned { background: rgba(230,230,230,0.07); border-left: 2px solid rgba(230,230,230,0.4); margin-left: -10px; padding-left: 10px; }
.message-wrap.mentioned:hover, .message-wrap.mentioned.menu-open { background: rgba(230,230,230,0.12); }
.msg-menu-wrap { position:relative;display:inline-flex; }
.msg-menu-btn {
  background:none;border:none;cursor:pointer;padding:3px 6px;
  font-size:.75rem;color:var(--text3);border-radius:5px;
}
.msg-menu-btn:hover { background:var(--bg2);color:var(--text); }
.msg-dropdown {
  position:absolute;right:0;top:100%;background:#161616;
  border:1px solid var(--border);border-radius:9px;padding:4px;
  z-index:200;min-width:140px;box-shadow:0 4px 16px rgba(0,0,0,.6);
}
.msg-dropdown button {
  display:flex;align-items:center;gap:7px;width:100%;
  background:none;border:none;padding:6px 10px;border-radius:6px;
  cursor:pointer;font-size:.8rem;color:var(--text);font-family:inherit;
  white-space:nowrap;
}
.msg-dropdown button:hover { background:var(--bg2); }
.msg-dropdown button.danger { color:#e6e6e6; }
.msg-dropdown.flip-up { top: auto; bottom: 100%; }
/* Reply preview inside a message — compact single line */
.reply-preview {
  display:flex;align-items:center;gap:5px;
  margin-bottom:4px;padding:2px 0;
  cursor:pointer;opacity:.82;transition:opacity .12s;
  width:100%;min-width:0;overflow:hidden;
}
.reply-preview:hover { opacity:1; }
.reply-bar-line { width:2px;height:14px;flex-shrink:0;border-radius:2px;background:var(--pink); }
.reply-av {
  width:16px;height:16px;border-radius:50%;
  background:rgba(255,255,255,.18);color:var(--pink);
  display:inline-flex;align-items:center;justify-content:center;
  font-size:7px;font-weight:700;flex-shrink:0;overflow:hidden;
}
.reply-av img { width:100%;height:100%;object-fit:cover;border-radius:50%; }
.reply-name { font-size:.71rem;font-weight:700;color:var(--pink);white-space:nowrap;flex-shrink:0; }
.reply-text { font-size:.71rem;color:var(--text3);overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
/* Reply bar above the chat input */
.reply-input-bar {
  display:none;align-items:center;gap:10px;padding:8px 14px;
  background:var(--bg2);border-top:1px solid var(--border);
  border-left:3px solid var(--pink);
}
.reply-input-bar.visible { display:flex; }
.reply-input-content { flex:1;min-width:0; }
.reply-input-who { font-size:.72rem;font-weight:600;color:var(--pink);display:flex;align-items:center;gap:5px;margin-bottom:2px; }
.reply-input-who strong { color:var(--text);font-weight:700; }
.reply-input-preview { font-size:.72rem;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.reply-input-close { background:none;border:none;color:var(--text3);cursor:pointer;font-size:.9rem;padding:4px 6px;border-radius:4px;flex-shrink:0;line-height:1; }
.reply-input-close:hover { color:var(--text);background:var(--bg3); }
/* Keep old selectors alive for any pages not yet updated */
.reply-input-label { color:var(--text3);flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.reply-input-label strong { color:var(--pink); }

/* Admin chat controls */
.msg-admin-actions { display: none; }
.message-wrap { border-radius: 6px; padding: 2px 8px; margin: 0 -8px; transition: background .08s; }
.message-wrap:hover { background: rgba(255,255,255,0.035); }
.message-wrap:hover .msg-admin-actions { display: flex; }
.msg-delete-btn {
  background: none; border: none; color: var(--maroon-light);
  cursor: pointer; font-size: 0.75rem; padding: 2px 6px;
  border-radius: 4px; opacity: 0.7;
}
.msg-delete-btn:hover { opacity: 1; background: rgba(90,90,90,0.15); }
.ticket-msg-row { border-radius: 6px; padding: 3px 8px; margin: 0 -8px; transition: background .08s; }
.ticket-msg-row:hover { background: rgba(255,255,255,0.035); }
.admin-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(230,230,230,0.12);
  color: var(--honey); border: 1px solid rgba(230,230,230,0.25);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.superadmin-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(255,255,255,0.12);
  color: var(--pink); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}

/* Roblox avatar img */
.roblox-thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

@media (max-width: 900px) {
  .dash-layout { flex-direction: column; padding-top: 0; }
  .page { padding-top: 52px; }
  .sidebar {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    min-height: unset;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 6px 8px;
    gap: 3px;
    position: sticky;
    top: 60px;
    z-index: 10;
    background: rgba(8,8,8,0.96);
    flex-shrink: 0;
  }
  #sb-profile-section { display: contents; }
  .sidebar .sidebar-section:not(#sb-profile-section) { display: none; }
  .sidebar-label { display: none !important; }
  .sidebar-item {
    padding: 7px 4px;
    font-size: 0.78rem;
    white-space: nowrap;
    border-radius: 8px;
    justify-content: center;
    gap: 6px;
  }
  .sidebar-item i { font-size: 0.78rem; width: auto; }
  .mobile-nav { display: flex; }
  .page { padding-bottom: 70px !important; }
  .dash-content { padding: 1rem; margin-left: 0 !important; }
}
@media (max-width: 768px) {
  .sidebar { top: 52px !important; }
}

/* Mobile sidebar overlay (admin/staff panels) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 149;
}
.sidebar-overlay.open { display: block; }
@media (max-width: 900px) {
  .sidebar.mobile-open {
    display: flex !important;
    z-index: 150;
    animation: slideInLeft .2s ease;
  }
  @keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: none; } }
  .adm-mobile-toggle {
    display: flex !important;
    background: none; border: none; color: var(--text2);
    font-size: 1.1rem; cursor: pointer; padding: 4px 8px;
    align-items: center; gap: 6px;
  }
}
.adm-mobile-toggle { display: none; }

@media (max-width: 768px) {
  .nav { padding: 0 1rem; height: 52px; }
  .nav-links { gap: 4px; }
  .nav-link { display: none; }
  .nav-btn { display: none; }
  .nav-avatar { display: flex; }
  .nav-hamburger { display: flex; }
  .nav-search-wrap { display: none !important; }
  #nav-premium-header-btn, #nav-boost-header-btn { display: none !important; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 4rem 1rem 3rem; }
  .steps { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; position: relative; margin-left: 0 !important; }
  .chat-list { width: 100%; border-right: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .swipe-container { padding: 1rem; }
  .swipe-card { max-width: 100%; }
  .match-prefs { padding: 1.5rem 1rem; }
  .footer-content { flex-direction: column; gap: 0.75rem; text-align: center; }
  .toast { bottom: calc(80px + var(--safe-bottom, 0px)); right: 1rem; left: 1rem; max-width: none; }
  ._notif-popup {
    bottom: auto;
    top: calc(1rem + var(--stack-offset, 0px));
    right: 1rem; left: 1rem;
    max-width: none;
    transition: transform 0.35s cubic-bezier(0.34,1.4,0.64,1), opacity 0.3s ease, top 0.3s ease;
  }
  ._notif-popup-show { transform: translateY(0); }
  ._notif-popup-out  { transform: translateY(calc(-100% - 2rem)); }
  ._notif-popup:not(._notif-popup-show):not(._notif-popup-out) { transform: translateY(calc(-100% - 2rem)); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .profile-card { padding: 1.5rem 1rem; }
}

/* ── Nav Avatar Dropdown ─────────────────────────────────────── */
.nav-menu-wrap { position: relative; }
.nav-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 200;
  overflow: hidden;
  animation: menuFadeIn .15s ease;
}
@keyframes menuFadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.nav-menu-header {
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.nav-menu-name { font-weight: 700; color: var(--text); }
.nav-menu-role { font-size: 0.7rem; color: var(--text3); margin-top: 2px; }
.nav-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--text2);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  transition: var(--transition);
  text-decoration: none;
  box-sizing: border-box;
}
.nav-menu-item:hover { background: var(--bg2); color: var(--text); }
.nav-menu-item.danger { color: var(--maroon-light); }
.nav-menu-item i { width: 16px; text-align: center; color: var(--text3); }
.nav-menu-item:hover i { color: inherit; }
.nav-menu-divider { height: 1px; background: var(--border); margin: 2px 0; }

/* ── Nav user search widget ──────────────────────────────────── */
.nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-search-btn {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-search-btn:hover { color: var(--text); background: var(--bg2); }
.nav-search-input {
  width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.83rem;
  outline: none;
  transition: width 0.2s ease, padding 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  border-radius: var(--r2);
  border: 1px solid transparent;
}
.nav-search-wrap.open .nav-search-input {
  width: 160px;
  padding: 5px 10px;
  background: var(--bg2);
  border-color: var(--border2);
}
.nav-search-input::placeholder { color: var(--text3); }
.nav-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 270px;
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
}
.nav-search-results.visible { display: block; }
.nav-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}
.nav-search-result:hover { background: var(--bg2); }
.nav-search-result-avatar {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--bg3);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
  font-size: 0.8rem;
}
.nav-search-result-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-search-result-info { min-width: 0; flex: 1; }
.nav-search-result-name {
  font-size: 0.85rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center;
}
.nav-search-result-sub { font-size: 0.72rem; color: var(--text3); margin-top: 1px; }
.nav-search-empty {
  padding: 14px 12px; text-align: center;
  color: var(--text3); font-size: 0.8rem;
}

/* ── Notification badge on nav ───────────────────────────────── */
.nav-notif-badge {
  position: absolute; top: -3px; right: -3px;
  width: 14px; height: 14px;
  background: var(--pink); color: #fff;
  border-radius: 50%; font-size: 0.55rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; border: 1.5px solid var(--bg0);
  pointer-events: none;
}

/* ── Markdown inline code ────────────────────────────────────── */
code.md-code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--mint);
  word-break: break-all;
}

/* ── New badge tags (v4) ─────────────────────────────────────── */
.staff-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(255,255,255,0.12);
  color: var(--mint); border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.verified-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(207,207,207,0.12);
  color: #cfcfcf; border: 1px solid rgba(207,207,207,0.3);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.lb-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(230,230,230,0.12);
  color: var(--honey); border: 1px solid rgba(230,230,230,0.25);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.gold-tag   { background: rgba(242,242,242,0.15);   color: #f2f2f2; border-color: rgba(242,242,242,0.3); }
.silver-tag { background: rgba(192,192,192,0.15); color: #c0c0c0; border-color: rgba(192,192,192,0.3); }
.bronze-tag { background: rgba(154,154,154,0.15);  color: #9a9a9a; border-color: rgba(154,154,154,0.3); }

/* ── Buyer / Premium badges ──────────────────────────────────── */
.buyer-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(214,214,214,0.12);
  color: #d6d6d6; border: 1px solid rgba(214,214,214,0.3);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.premium-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(255,255,255,0.15);
  color: #ffffff; border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.booster-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(255,255,255,0.12);
  color: #ffffff; border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.tester-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.65rem; background: rgba(255,255,255,0.12);
  color: #ffffff; border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.crown-overlay {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 1.1rem; pointer-events: none; z-index: 2;
}

/* ── Status indicator dot ────────────────────────────────────── */
.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid var(--bg0); flex-shrink: 0;
}
.status-dot.online  { background: var(--mint); }
.status-dot.away    { background: var(--honey); }
.status-dot.offline { background: var(--text3); }

/* ── Status text under username ──────────────────────────────── */
.status-text-line {
  font-size: 0.72rem; color: var(--text3); font-style: italic;
  margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Nav notif badge auto-width fix ─────────────────────────── */
.nav-notif-badge {
  min-width: 14px !important;
  width: auto !important;
  padding: 0 3px !important;
  border-radius: 8px !important;
}

/* ── Global chat gap fix ─────────────────────────────────────── */
.chat-layout .chat-main { border-left: 1px solid var(--border); }

/* ── Swipe card full avatar ──────────────────────────────────── */
.swipe-card-img { background: var(--bg0); }

/* ── Tag picker ──────────────────────────────────────────────── */
.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-btn {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 5px 13px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-body);
  transition: var(--transition);
}
.tag-btn:hover { border-color: var(--pink); color: var(--text); }
.tag-btn.equipped {
  background: rgba(255,255,255,.12);
  border-color: var(--pink);
  color: var(--pink);
  font-weight: 600;
}
.tag-counter { font-size: 0.75rem; color: var(--text3); margin-top: 6px; }

/* ── Premium page ────────────────────────────────────────────── */
.premium-gate {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 2rem; text-align: center;
  gap: 1rem;
}
.premium-gate i { font-size: 3rem; color: var(--honey); opacity: .8; }
.premium-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px,100%), 1fr));
  gap: 1.25rem;
  max-width: 900px;
}
.premium-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem;
}
.premium-card h3 { margin-bottom: .75rem; font-size: 1rem; }
.premium-upload-area {
  border: 2px dashed var(--border2); border-radius: var(--r);
  padding: 1.5rem; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--bg2);
}
.premium-upload-area:hover { border-color: var(--honey); }
.premium-preview {
  width: 100%; max-height: 160px; object-fit: cover;
  border-radius: var(--r2); margin-top: .75rem;
  display: none;
}
.premium-avatar-preview {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; margin: .75rem auto 0; display: none;
}

/* ── Appearance page responsive ──────────────────────────────── */
.appr-outer       { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.appr-left        { flex: 1; min-width: min(100%, 320px); display: flex; flex-direction: column; gap: 1.25rem; }
.appr-top-row     { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: stretch; }
.appr-preview     { flex: 0 0 380px; min-width: min(100%, 320px); position: sticky; top: 80px; }
.appr-preview-lbl { font-size: .65rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
@media (max-width: 960px) {
  .appr-outer   { flex-direction: column; }
  .appr-preview { flex: none; width: 100%; min-width: 0; position: static; }
}
@media (max-width: 600px) {
  .appr-top-row .profile-edit-card { min-width: 0 !important; flex: 1 1 100% !important; }
  .appr-top-row { flex-direction: column; }
  .dash-header { flex-wrap: wrap; gap: .5rem; }
}

/* ============================================================
   "NOVENTIS" LAYER — monochrome black/white premium polish
   Additive only: no selectors above are removed or renamed.
   ============================================================ */

/* ── Animated aurora background ──────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 38% at 18% 14%, rgba(255,255,255,0.13), transparent 62%),
    radial-gradient(ellipse 38% 44% at 84% 28%, rgba(255,255,255,0.07), transparent 60%),
    radial-gradient(ellipse 52% 40% at 52% 96%, rgba(255,255,255,0.11), transparent 62%);
  animation: auroraDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(-2%, -1.5%, 0) scale(1); }
  50%  { transform: translate3d(1.5%, 2%, 0)  scale(1.06); }
  100% { transform: translate3d(3%, -2%, 0)   scale(1.02); }
}
/* Let the aurora show through full-bleed page wrappers */
.auth-page { background: transparent; }

/* ── Text selection & scrollbar ──────────────────────────────── */
::selection { background: rgba(255,255,255,0.35); color: var(--text); }
::-webkit-scrollbar-thumb       { background: #2a2a2a; }
::-webkit-scrollbar-thumb:hover { background: #404040; }

/* ── Typography polish ───────────────────────────────────────── */
h1, h2 { letter-spacing: -0.015em; }
.gradient-text { filter: drop-shadow(0 0 22px rgba(255,255,255,0.28)); }

/* ── Nav: active state + glass depth ─────────────────────────── */
.nav { box-shadow: 0 1px 20px rgba(0,0,0,0.35); }
.nav-link.active,
.nav-mobile-link.active { color: var(--pink); text-shadow: 0 0 14px rgba(255,255,255,0.55); }
.logo-icon { box-shadow: none; }

/* ── Glowing animated buttons ────────────────────────────────── */
.btn-primary, .nav-btn, .nav-mobile-btn, .form-btn,
.save-btn, .start-match-btn, .send-btn, .avatar-edit {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(255,255,255,0.30), inset 0 1px 0 rgba(255,255,255,0.14);
}
.btn-primary::after, .nav-btn::after, .nav-mobile-btn::after,
.form-btn::after, .save-btn::after, .start-match-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -160%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn-primary:hover::after, .nav-btn:hover::after, .nav-mobile-btn:hover::after,
.form-btn:hover::after, .save-btn:hover::after, .start-match-btn:hover::after { left: 160%; }
.btn-primary:hover { box-shadow: 0 8px 32px rgba(255,255,255,0.45), inset 0 1px 0 rgba(255,255,255,0.14); }
.nav-btn:hover, .form-btn:hover, .save-btn:hover {
  opacity: 1;
  box-shadow: 0 6px 26px rgba(255,255,255,0.42), inset 0 1px 0 rgba(255,255,255,0.14);
}
.start-match-btn:hover { opacity: 1; box-shadow: 0 10px 36px rgba(255,255,255,0.45); }
.send-btn:hover        { opacity: 1; box-shadow: 0 4px 22px rgba(255,255,255,0.5); }
.btn-primary:active, .nav-btn:active, .form-btn:active,
.save-btn:active, .start-match-btn:active { transform: translateY(0) scale(0.98); }
.btn-ghost:hover {
  border-color: var(--pink2);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 18px rgba(255,255,255,0.18);
}
.discord-btn { box-shadow: 0 4px 18px rgba(255,255,255,0.30); }
.toggle.on   { box-shadow: 0 0 12px rgba(255,255,255,0.45); }

/* ── Glowing focus states ────────────────────────────────────── */
.form-input:focus, .textarea-input:focus, .chat-input:focus {
  border-color: var(--pink2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.16), 0 0 20px rgba(255,255,255,0.12);
}
.chat-search input:focus { border-color: var(--pink2); box-shadow: 0 0 0 3px rgba(255,255,255,0.14); }

/* ── Card hover: lift + glow ─────────────────────────────────── */
.hv-card:hover, .stat-card:hover, .upload-card:hover, .premium-card:hover {
  border-color: rgba(255,255,255,0.45);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 24px rgba(255,255,255,0.12);
}
.gender-opt:hover, .gender-opt.selected { box-shadow: 0 0 16px rgba(255,255,255,0.15); }
.feature-item:hover { background: rgba(255,255,255,0.05); }
.feature-item i     { filter: drop-shadow(0 0 10px rgba(255,255,255,0.4)); }
.step-num           { box-shadow: 0 0 14px rgba(255,255,255,0.18); }

/* ── Hero ambience ───────────────────────────────────────────── */
.hero::before {
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,255,255,0.16), transparent);
}
.hero-eyebrow { box-shadow: 0 0 20px rgba(255,255,255,0.12); }

/* ── Surfaces: subtle top-edge highlight ─────────────────────── */
.auth-card, .match-modal, .profile-card, .profile-edit-card, .match-prefs {
  box-shadow: 0 18px 50px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}
.nav-menu, .msg-dropdown, .nav-search-results {
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
}

/* ── Reduced motion: run once & stop, never strobe ───────────── */
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after, .nav-btn::after, .nav-mobile-btn::after,
  .form-btn::after, .save-btn::after, .start-match-btn::after { display: none; }
  body::after { opacity: 0.4; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;   /* kill infinite loops -> no frame-rate strobe */
    scroll-behavior: auto !important;
  }
}

/* ── Gentle opacity-only ambience — always on, motion-safe ───── */
/* Slow fades (no travel/parallax). Re-asserted AFTER the reduced-  */
/* motion block so they win the cascade and stay smooth + slow.    */
.nav::after        { animation: nvNavGlow 8s ease-in-out infinite !important; }
.gradient-text     { animation: nvSheen 20s ease-in-out infinite !important; }

/* ============================================================
   "NOVENTIS" MOTION — monochrome kinetic layer (additive only)
   Pure black & white animations. Never alters box geometry.
   ============================================================ */

/* ── Drifting scanline / grid veil over the whole page ───────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.020) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 46px);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 92%);
  animation: nvScan 12s linear infinite;
  will-change: background-position;
}
@keyframes nvScan {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 0 3px, 46px 0; }
}

/* ── Shimmering monochrome headline text ─────────────────────── */
.gradient-text {
  background: linear-gradient(100deg,#ffffff 0%,#8a8a8a 28%,#ffffff 52%,#7d7d7d 74%,#ffffff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nvSheen 18s ease-in-out infinite;
}
@keyframes nvSheen {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* ── Logo: bare mark, gentle shape-hugging glow on hover ─────── */
.logo-icon { position: relative; }
.nav-logo:hover .logo-icon img { filter: drop-shadow(0 0 12px rgba(255,255,255,0.6)); }

/* ── Static glowing hairline under the fixed nav (breathes) ──── */
.nav::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.30) 28%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0.30) 72%, transparent);
  animation: nvNavGlow 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes nvNavGlow { 0%,100% { opacity: 0.35; } 50% { opacity: 0.85; } }

/* ── Primary buttons: monochrome pulse ring on hover ─────────── */
.btn-primary:hover, .start-match-btn:hover {
  animation: nvPulse 1.6s ease-out infinite;
}
@keyframes nvPulse {
  0%   { box-shadow: 0 8px 32px rgba(255,255,255,0.30), 0 0 0 0 rgba(255,255,255,0.35), inset 0 1px 0 rgba(255,255,255,0.14); }
  70%  { box-shadow: 0 8px 32px rgba(255,255,255,0.30), 0 0 0 10px rgba(255,255,255,0), inset 0 1px 0 rgba(255,255,255,0.14); }
  100% { box-shadow: 0 8px 32px rgba(255,255,255,0.30), 0 0 0 0 rgba(255,255,255,0), inset 0 1px 0 rgba(255,255,255,0.14); }
}

/* ── Cards: cursor-agnostic top-light drift on hover ─────────── */
.hv-card, .stat-card, .upload-card, .premium-card, .perk-card {
  position: relative;
  overflow: hidden;
}
.hv-card::before, .stat-card::before, .upload-card::before,
.premium-card::before, .perk-card::before {
  content: '';
  position: absolute;
  top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.10), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 0;
}
.hv-card:hover::before, .stat-card:hover::before, .upload-card:hover::before,
.premium-card:hover::before, .perk-card:hover::before { left: 130%; }
.hv-card > *, .stat-card > *, .upload-card > *,
.premium-card > *, .perk-card > * { position: relative; z-index: 1; }

/* ── Monochrome aurora: gentle brightness pulse on the glow ──── */
body::before { animation: auroraDrift 28s ease-in-out infinite alternate, nvBreathe 11s ease-in-out infinite; }
@keyframes nvBreathe {
  0%,100% { opacity: 0.85; }
  50%     { opacity: 1; }
}
