/* ============================================================
   CYANET — Create. Collaborate. Launch.
   style.css
   ============================================================ */

/* Fonts loaded via <link rel="preconnect"> in index.html for non-blocking render */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Devit identity — dark ink, sharp amber, monospace soul */
  --bg-void:       #0a0a0b;
  --bg-base:       #0f0f10;
  --bg-surface:    #141415;
  --bg-elevated:   #1a1a1c;
  --bg-float:      #222225;

  /* Borders */
  --border:        rgba(255,255,255,0.07);
  --border-mid:    rgba(255,255,255,0.11);
  --border-active: rgba(255,45,110,0.4);

  /* Devit accent palette — amber-gold primary, slate-blue secondary */
  --cyan:          #ff2d6e;
  --cyan-dim:      rgba(255,45,110,0.10);
  --cyan-glow:     rgba(255,45,110,0.22);
  --violet:        #ff6b35;
  --violet-dim:    rgba(255,107,53,0.10);
  --rose:          #ff6b6b;
  --emerald:       #3ecf8e;
  --amber:         #ff6b35;
  --sky:           #7b8fff;

  --text-primary:  #f5f5f0;
  --text-secondary:#9999a8;
  --text-muted:    #555560;
  --text-code:     #ffcb6b;

  --font-display:  'Bricolage Grotesque', sans-serif;
  --font-body:     'Plus Jakarta Sans', sans-serif;
  --font-mono:     'Space Mono', monospace;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --radius-xl:     24px;
  --radius-full:   9999px;

  /* Spacing scale — 8px base grid */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  40px;
  --space-xl:  64px;
  --space-2xl: 96px;

  /* Layout — slightly wider sidebar/rightbar, taller topbar */
  --sidebar-w:     256px;
  --rightbar-w:    304px;
  --topbar-h:      60px;

  --transition:    0.18s cubic-bezier(0.4,0,0.2,1);
  --spring:        0.35s cubic-bezier(0.34,1.56,0.64,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-float); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Auth Screen ───────────────────────────────────────────── */
#auth-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg-void);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  overflow: hidden;
}

.auth-bg {
  position: absolute; inset: 0; overflow: hidden;
}
.auth-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,45,110,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,45,110,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridPan 30s linear infinite;
}
@keyframes gridPan {
  0% { transform: translate(0,0); }
  100% { transform: translate(48px, 48px); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-bg-grid, .auth-bg-orb { animation: none !important; }
}
.auth-bg-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.12;
  animation: orbFloat 8s ease-in-out infinite;
}
.auth-bg-orb.orb-1 {
  width: 600px; height: 600px;
  background: var(--cyan);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.auth-bg-orb.orb-2 {
  width: 400px; height: 400px;
  background: var(--violet);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
opacity: 0.09;
}
.auth-bg-orb.orb-3 {
  width: 250px; height: 250px;
  background: var(--rose);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation-delay: -2s; opacity: 0.06;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.auth-bg-orb.orb-2 { animation-name: orbFloat2; }
@keyframes orbFloat2 {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(30px) scale(1.05); }
}

/* ── Auth two-panel layout ───────────────────────────────────── */
.auth-panel-left {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--space-2xl) var(--space-xl);
  border-right: 1px solid var(--border-mid);
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,45,110,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(255,107,53,0.05) 0%, transparent 50%),
    var(--bg-void);
}
.auth-panel-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: var(--space-xl);
}
.auth-panel-logo {
  width: 48px; height: 48px; border-radius: 14px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--border-mid), 0 8px 32px rgba(93,212,244,0.15);
}
.auth-panel-name {
  font-family: var(--font-display);
  font-weight: 900; font-size: 28px;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ff2d6e, #ff6b35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}
.auth-panel-headline {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 42px); font-weight: 900; line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}
.auth-panel-desc {
  font-size: 15.5px; color: var(--text-secondary);
  line-height: 1.75; margin-bottom: var(--space-lg); max-width: 360px;
  opacity: 0.85;
}
.auth-features {
  display: flex; flex-direction: column; gap: 0;
  list-style: none; padding: 0; margin: 0;
}
.auth-features li {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.auth-features li:last-child { border-bottom: none; }
.auth-features li i {
  width: 36px; height: 36px;
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan); font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Auth card ─────────────────────────────────────────────── */
.auth-card {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--space-2xl) var(--space-xl);
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(255,107,53,0.06) 0%, transparent 50%),
    var(--bg-base);
  animation: cardIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Tab switcher ──────────────────────────────────────────── */
.auth-tabs {
  display: flex; gap: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  border-radius: 14px; padding: 5px;
  margin-bottom: var(--space-lg);
}
.auth-tab {
  flex: 1; padding: 11px;
  font-size: 14px; font-weight: 600;
  border-radius: 10px; color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}
.auth-tab.active {
  background: var(--bg-float);
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── OAuth buttons ─────────────────────────────────────────── */
.auth-oauth-group {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: var(--space-md);
}
.auth-btn-github {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px;
  background: var(--text-primary); color: var(--bg-void);
  border-radius: 12px; font-size: 14px; font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}
.auth-btn-github:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.auth-btn-github i { font-size: 19px; }

.auth-btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px;
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  color: var(--text-primary);
  border-radius: 12px; font-size: 14px; font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}
.auth-btn-google:hover { background: var(--bg-float); border-color: var(--border-active); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.google-icon { width: 18px; height: 18px; }

/* ── Divider ───────────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 12px;
  letter-spacing: 0.05em; margin: var(--space-xs) 0 var(--space-md);
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-mid);
}

/* ── Input group ───────────────────────────────────────────── */
.auth-input-group { margin-bottom: var(--space-sm); }
.auth-input-group label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; color: var(--text-secondary);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.07em;
}
.auth-input-group label i { font-size: 11px; color: var(--text-muted); }
.auth-input-wrap { position: relative; }
.auth-input {
  width: 100%; padding: 13px 16px;
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  border-radius: 12px; color: var(--text-primary); font-size: 14px;
  transition: all 0.2s ease;
}
.auth-input-wrap .auth-input { padding-right: 42px; }
.auth-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); background: var(--bg-float); }
.auth-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.auth-toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px; padding: 2px 4px;
  transition: color 0.15s;
}
.auth-toggle-pw:hover { color: var(--text-primary); }

/* ── Password strength ─────────────────────────────────────── */
.pw-strength {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
}
.pw-strength-bar {
  flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.pw-strength-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}
.pw-strength-label { font-size: 11px; font-weight: 600; min-width: 40px; }

/* ── Forgot password link ─────────────────────────────────── */
.auth-link-btn {
  font-size: 12px; color: var(--cyan);
  background: none; border: none; cursor: pointer; padding: 0;
  transition: opacity 0.15s; letter-spacing: 0.02em;
}
.auth-link-btn:hover { opacity: 0.75; text-decoration: underline; }

/* ── Primary & magic buttons ──────────────────────────────── */
.auth-btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px;
  background: linear-gradient(130deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); border-radius: 12px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
  transition: all 0.2s ease; margin-top: var(--space-xs); margin-bottom: var(--space-xs);
  box-shadow: 0 4px 20px rgba(93,212,244,0.2);
}
.auth-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(93,212,244,0.3); }
.auth-btn-primary:disabled { opacity: 0.65; transform: none; box-shadow: none; }

.auth-btn-magic {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px;
  background: var(--violet-dim); color: var(--violet);
  border: 1px solid rgba(255,107,53,0.25);
  border-radius: 12px; font-size: 13px; font-weight: 600;
  transition: all 0.2s ease;
}
.auth-btn-magic:hover { background: rgba(255,107,53,0.18); transform: translateY(-2px); border-color: rgba(255,107,53,0.4); }
.auth-btn-magic:disabled { opacity: 0.7; transform: none; }

.auth-footer { margin-top: var(--space-md); text-align: center; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }
.auth-footer a { color: var(--cyan); }
.auth-footer a:hover { text-decoration: underline; }

/* responsive handled in mobile section below */



/* ── App Shell ─────────────────────────────────────────────── */
#app {
  display: none;
  min-height: 100vh;
  padding-top: var(--topbar-h); /* offset for fixed topbar */
}
#app.visible { display: flex; flex-direction: column; }

/* ── Top Bar ────────────────────────────────────────────────── */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 400;
  height: var(--topbar-h);
  background: rgba(10,11,16,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-mid);
  display: flex; align-items: center;
  padding: 0 var(--space-md); gap: 14px;
  /* Never hide — no transform, no opacity animation on scroll */
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.topbar-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 800; font-size: 18px; flex-shrink: 0;
  background: linear-gradient(90deg, #ff2d6e, #ff6b35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.topbar-logo-mark {
  width: 30px; height: 30px;
  background: var(--cyan);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: var(--bg-void);
}

.topbar-search {
  flex: 1; max-width: 480px; position: relative;
}
.topbar-search input {
  width: 100%; padding: 8px 14px 8px 38px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-primary);
  font-size: 13px; transition: var(--transition);
}
.topbar-search input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

.topbar-actions {
  display: flex; align-items: center; gap: 6px; margin-left: auto;
}
.topbar-action-btn {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); background: transparent;
  transition: var(--transition); position: relative; font-size: 17px;
}
.topbar-action-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.topbar-action-btn .badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; background: var(--rose);
  border-radius: 50%; border: 2px solid var(--bg-base);
}

.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--bg-void);
  cursor: pointer; flex-shrink: 0;
  border: 2px solid transparent;
  transition: var(--transition);
}
.topbar-avatar:hover { border-color: var(--cyan); }

/* ── Layout ─────────────────────────────────────────────────── */
.app-body {
  display: flex; flex: 1;
}

/* ── Left Sidebar ───────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky; top: 0;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: var(--space-sm) 10px;
  border-right: 1px solid var(--border-mid);
  display: flex; flex-direction: column; gap: 2px;
}


/* ── Sidebar Hamburger Toggle (desktop) ─────────────────────── */
.sidebar-ham-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  margin: 4px 6px 8px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 15px;
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
}
.sidebar-ham-btn:hover {
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* Collapsed sidebar state */
#sidebar.sidebar-collapsed {
  width: 64px;
}
#sidebar.sidebar-collapsed .sidebar-link span:not(.icon):not(.badge-count),
#sidebar.sidebar-collapsed .sidebar-section-label,
#sidebar.sidebar-collapsed .sidebar-communities-header span,
#sidebar.sidebar-collapsed .sidebar-community-name,
#sidebar.sidebar-collapsed .sidebar-community-dot,
#sidebar.sidebar-collapsed .sidebar-bottom .sidebar-link span:not(.icon) {
  display: none;
}
#sidebar.sidebar-collapsed .sidebar-link {
  justify-content: center;
}
#sidebar.sidebar-collapsed .sidebar-communities-header {
  justify-content: center;
}
#sidebar.sidebar-collapsed .sidebar-community {
  justify-content: center;
}

.sidebar-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 12px 12px 6px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: var(--transition); cursor: pointer;
  position: relative; margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--bg-surface); color: var(--text-primary); }
.sidebar-link.active {
  background: var(--cyan-dim); color: var(--cyan);
  font-weight: 600;
}
.sidebar-link.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--cyan); border-radius: 0 3px 3px 0;
}
.sidebar-link .icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-link .badge-count {
  margin-left: auto; background: var(--rose);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: var(--radius-full); min-width: 20px; text-align: center;
}

.sidebar-divider { height: 1px; background: var(--border); margin: 8px 6px; }

.sidebar-communities-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 4px;
}
.sidebar-communities-header span {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
}
.sidebar-communities-header button {
  font-size: 16px; color: var(--text-muted); line-height: 1;
  transition: var(--transition);
}
.sidebar-communities-header button:hover { color: var(--cyan); }

.sidebar-community {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius-md);
  cursor: pointer; transition: var(--transition);
}
.sidebar-community:hover { background: var(--bg-surface); }
.sidebar-community-icon {
  width: 30px; height: 30px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  font-weight: 700;
}
.sidebar-community-name { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.sidebar-community:hover .sidebar-community-name { color: var(--text-primary); }
.sidebar-community-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); margin-left: auto; flex-shrink: 0; }

.sidebar-bottom {
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border);
}

/* ── Main Content ───────────────────────────────────────────── */
#main {
  flex: 1; min-width: 0;
  overflow-y: auto;
}

/* ── Right Sidebar ──────────────────────────────────────────── */
#rightbar {
  width: var(--rightbar-w);
  flex-shrink: 0;
  position: sticky; top: 0;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: var(--space-md) 14px;
  border-left: 1px solid var(--border-mid);
  display: flex; flex-direction: column; gap: var(--space-sm);
}

/* ── Tabs ───────────────────────────────────────────────────── */
.view-tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 12px var(--space-md); border-bottom: 1px solid var(--border-mid);
  position: sticky; top: 0; background: var(--bg-void); z-index: 10;
}
.view-tab {
  padding: 9px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  transition: var(--transition); cursor: pointer;
}
.view-tab:hover { color: var(--text-secondary); background: var(--bg-surface); }
.view-tab.active { color: var(--cyan); background: var(--cyan-dim); }

/* ── Post Composer ──────────────────────────────────────────── */
.composer {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-mid);
}
.composer-inner {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  padding: 16px;
  transition: var(--transition);
}
.composer-inner:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}
.composer-row { display: flex; gap: 12px; align-items: flex-start; }
.composer-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--bg-void);
}
.composer-textarea {
  flex: 1; background: none; border: none; color: var(--text-primary);
  font-size: 15px; resize: none; min-height: 60px; line-height: 1.5;
}
.composer-textarea:focus { outline: none; }
.composer-textarea::placeholder { color: var(--text-muted); }

.composer-code-block {
  background: var(--bg-void); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-code);
  display: none; margin-top: 10px; line-height: 1.6;
}
.composer-code-block.visible { display: block; }

.composer-toolbar {
  display: flex; align-items: center; gap: 4px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.composer-tool {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 15px; transition: var(--transition);
}
.composer-tool:hover { background: var(--bg-elevated); color: var(--cyan); }
.composer-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.char-count { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.post-btn {
  padding: 7px 18px;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; transition: var(--transition);
}
.post-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,45,110,0.3); }
.post-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Feed ───────────────────────────────────────────────────── */
#feed { padding: 8px 0; }

.post-card {
  padding: 20px var(--space-md) 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, rgba(255,45,110,0.12), transparent);
  transition: var(--transition);
}
.post-card:hover { background: rgba(255,255,255,0.015); }
.post-card:hover::before { width: 3px; }

.post-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.post-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--bg-void);
}
.post-meta { flex: 1; }
.post-author {
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
}
.post-author-handle { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.post-time { font-size: 12px; color: var(--text-muted); }
.post-badge {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: var(--radius-full); letter-spacing: 0.03em;
}
.badge-dev { background: var(--cyan-dim); color: var(--cyan); }
.badge-mod { background: rgba(255,107,53,0.15); color: var(--violet); }
.badge-op  { background: rgba(251,113,133,0.15); color: var(--rose); }

.post-content { font-size: 14.5px; line-height: 1.7; color: var(--text-primary); margin-bottom: 12px; }
.post-content .mention { color: var(--cyan); font-weight: 600; }
.post-content .hashtag { color: var(--violet); font-weight: 600; }

.post-code {
  background: var(--bg-void); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-code);
  margin-bottom: 10px; overflow-x: auto; line-height: 1.6;
  position: relative;
}
.post-code-lang {
  position: absolute; top: 8px; right: 10px;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.post-code .kw  { color: #c792ea; }
.post-code .fn  { color: #82aaff; }
.post-code .str { color: #c3e88d; }
.post-code .cm  { color: #546e7a; font-style: italic; }
.post-code .num { color: var(--amber); }

.post-image {
  border-radius: var(--radius-md); overflow: hidden;
  background: var(--bg-elevated); margin-bottom: 10px;
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 24px;
}

.post-repo-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px 14px; margin-bottom: 10px;
  background: var(--bg-surface);
  display: flex; flex-direction: column; gap: 6px;
  transition: var(--transition);
}
.post-repo-card:hover { border-color: var(--border-active); background: var(--bg-elevated); }
.post-repo-header { display: flex; align-items: center; gap: 8px; }
.post-repo-icon { color: var(--text-muted); font-size: 15px; }
.post-repo-name { font-size: 14px; font-weight: 700; color: var(--cyan); }
.post-repo-desc { font-size: 12px; color: var(--text-secondary); }
.post-repo-meta { display: flex; align-items: center; gap: 14px; }
.post-repo-stat { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.post-repo-lang-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.post-actions {
  display: flex; align-items: center; gap: 2px; margin-top: 4px;
}
.post-action {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: var(--radius-md);
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  transition: var(--transition); cursor: pointer;
}
.post-action:hover { background: var(--bg-elevated); }
.post-action.liked    { color: var(--rose); }
.post-action.reposted { color: var(--emerald); }
.post-action.bookmarked { color: var(--amber); }
.post-action svg, .post-action .icon { font-size: 15px; }

.post-card.is-repost > .post-header { margin-bottom: 0; }
.repost-label {
  font-size: 11px; color: var(--emerald); font-weight: 600;
  display: flex; align-items: center; gap: 4px; margin-bottom: 8px;
}

/* ── Stories/Highlights ─────────────────────────────────────── */
.stories-bar {
  display: flex; gap: 12px; padding: 14px 16px;
  overflow-x: auto; border-bottom: 1px solid var(--border);
}
.stories-bar::-webkit-scrollbar { height: 0; }
.story-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; flex-shrink: 0;
}
.story-ring {
  padding: 2px;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  border-radius: 50%;
  transition: var(--transition);
}
.story-ring:hover { transform: scale(1.05); }
.story-ring.seen { background: var(--bg-float); }
.story-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg-elevated); border: 2px solid var(--bg-void);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--bg-void);
}
.story-label { font-size: 11px; color: var(--text-secondary); text-align: center; max-width: 60px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.story-add-btn {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px dashed var(--border); background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-muted);
  transition: var(--transition);
}
.story-add-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Profile View ───────────────────────────────────────────── */
.profile-cover {
  height: 200px; background: linear-gradient(135deg, #0d1b2e, #0a0f1e);
  position: relative; overflow: hidden;
}
.profile-cover-art {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255,45,110,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(255,107,53,0.12) 0%, transparent 60%);
}
.profile-cover canvas { position: absolute; inset: 0; }

.profile-info-section {
  padding: 0 20px 0;
  position: relative;
}
.profile-avatar-wrap {
  position: relative; display: inline-block;
  margin-top: -36px; margin-bottom: 10px;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  border: 4px solid var(--bg-void);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: var(--bg-void);
}
.profile-online-dot {
  position: absolute; bottom: 6px; right: 2px;
  width: 16px; height: 16px; background: var(--emerald);
  border-radius: 50%; border: 3px solid var(--bg-void);
}

.profile-actions {
  position: absolute; top: -50px; right: 20px;
  display: flex; gap: 8px;
}
.profile-action-btn {
  padding: 7px 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; transition: var(--transition);
}
.profile-action-btn.primary {
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void);
}
.profile-action-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,45,110,0.3); }
.profile-action-btn.secondary {
  border: 1px solid var(--border); color: var(--text-primary); background: var(--bg-surface);
}
.profile-action-btn.secondary:hover { border-color: var(--cyan); color: var(--cyan); }

.profile-name { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.profile-handle { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.profile-bio { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 10px; }
.profile-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.profile-meta-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }
.profile-meta-item span { color: var(--text-secondary); }
.profile-stats { display: flex; gap: 20px; margin-bottom: 14px; }
.profile-stat { font-size: 13px; }
.profile-stat strong { font-weight: 700; color: var(--text-primary); }
.profile-stat span  { color: var(--text-muted); }

.tech-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tech-badge {
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; background: var(--bg-float);
  border: 1px solid var(--border); color: var(--text-secondary);
  font-family: var(--font-mono);
}

.profile-tabs { border-top: 1px solid var(--border); }
.profile-tab-list { display: flex; }
.profile-tab {
  flex: 1; padding: 12px; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; cursor: pointer; transition: var(--transition);
}
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ── Right Sidebar Widgets ──────────────────────────────────── */
.widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  overflow: hidden;
}
.widget-header {
  padding: 14px 16px 12px;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.widget-header a { font-size: 12px; font-weight: 600; color: var(--cyan); }
.widget-header a:hover { text-decoration: underline; }

.trending-item {
  padding: 12px 16px; transition: var(--transition); cursor: pointer;
}
.trending-item:hover { background: var(--bg-elevated); }
.trending-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.05em; }
.trending-tag { font-size: 14px; font-weight: 700; color: var(--text-primary); margin: 1px 0; }
.trending-count { font-size: 11px; color: var(--text-muted); }

.who-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; transition: var(--transition); cursor: pointer;
}
.who-item:hover { background: var(--bg-elevated); }
.who-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--bg-void);
}
.who-info { flex: 1; min-width: 0; }
.who-name { font-size: 13px; font-weight: 700; }
.who-handle { font-size: 11px; color: var(--text-muted); }
.follow-btn {
  padding: 5px 14px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700;
  border: 1px solid var(--cyan); color: var(--cyan);
  background: transparent; transition: var(--transition);
}
.follow-btn:hover { background: var(--cyan); color: var(--bg-void); }
.follow-btn.following { background: var(--bg-float); border-color: var(--border); color: var(--text-secondary); }

/* ── GitHub Activity Widget ─────────────────────────────────── */
.contrib-graph { padding: 10px 14px 12px; }
.contrib-weeks { display: flex; gap: 2px; }
.contrib-day {
  width: 10px; height: 10px; border-radius: 2px; background: var(--bg-float);
  transition: var(--transition);
}
.contrib-day[data-level="1"] { background: rgba(255,45,110,0.2); }
.contrib-day[data-level="2"] { background: rgba(255,45,110,0.45); }
.contrib-day[data-level="3"] { background: rgba(255,45,110,0.7); }
.contrib-day[data-level="4"] { background: var(--cyan); }
.contrib-day:hover { transform: scale(1.3); border-radius: 2px; }

/* ── Communities / Servers ──────────────────────────────────── */
.communities-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: var(--space-md);
}
.community-card {
  background: var(--bg-surface); border: 1px solid var(--border-mid);
  border-radius: 16px; padding: var(--space-sm);
  transition: var(--transition); cursor: pointer; overflow: hidden;
  position: relative;
}
.community-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--c1, var(--cyan-dim)), transparent);
  opacity: 0; transition: var(--transition);
}
.community-card:hover { border-color: var(--border-active); transform: translateY(-2px); }
.community-card:hover::before { opacity: 1; }

.community-card-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 10px;
}
.community-card-name { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.community-card-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.community-card-meta { display: flex; align-items: center; gap: 10px; }
.community-card-members { font-size: 11px; color: var(--text-muted); }
.community-card-online { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--emerald); }
.community-card-online::before { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
.join-btn {
  margin-top: 10px; width: 100%; padding: 7px;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  background: var(--bg-elevated); transition: var(--transition);
}
.join-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.join-btn.joined { background: var(--cyan-dim); border-color: var(--border-active); color: var(--cyan); }

/* ── Community / Channel View ───────────────────────────────── */
.community-view {
  display: flex; height: calc(100vh - var(--topbar-h)); overflow: hidden;
}
.community-sidebar {
  width: 200px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto; padding: 10px 6px;
}
.community-header {
  padding: 10px 8px 14px;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.community-header-name { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.community-header-members { font-size: 11px; color: var(--text-muted); }

.channel-category { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 8px 8px 3px; }
.channel-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-muted); cursor: pointer; transition: var(--transition);
}
.channel-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.channel-item.active { background: var(--bg-float); color: var(--text-primary); font-weight: 600; }
.channel-icon { font-size: 14px; }
.channel-unread { margin-left: auto; width: 6px; height: 6px; background: var(--rose); border-radius: 50%; }

.community-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.community-chat-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.community-chat-header h3 { font-size: 15px; font-weight: 700; }
.community-chat-header span { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

.chat-messages { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 1px; }

.msg {
  display: flex; gap: 10px; padding: 5px 0;
  border-radius: var(--radius-md); transition: var(--transition);
}
.msg:hover { background: var(--bg-surface); padding-left: 6px; padding-right: 6px; margin: 0 -6px; }
.msg.is-continuation .msg-avatar { visibility: hidden; }
.msg-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--bg-void);
  align-self: flex-start; margin-top: 2px;
}
.msg-body { flex: 1; min-width: 0; }
.msg-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg-author { font-size: 14px; font-weight: 700; }
.msg-time { font-size: 11px; color: var(--text-muted); }
.msg-text { font-size: 14px; line-height: 1.55; color: var(--text-primary); word-break: break-word; }
.msg-text code { font-family: var(--font-mono); font-size: 12px; background: var(--bg-void); color: var(--text-code); padding: 1px 5px; border-radius: 4px; }

.chat-input-area {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
}
.chat-input-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 8px 12px;
  transition: var(--transition);
}
.chat-input-wrap:focus-within { border-color: var(--border-active); }
.chat-input {
  flex: 1; background: none; border: none; color: var(--text-primary);
  font-size: 14px;
}
.chat-input:focus { outline: none; }
.chat-input::placeholder { color: var(--text-muted); }
.chat-send-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.chat-send-btn:hover { transform: scale(1.05); }

.community-members-panel {
  width: 200px; flex-shrink: 0; border-left: 1px solid var(--border);
  overflow-y: auto; padding: 10px 8px;
}
.members-section-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 6px 6px 3px; }
.member-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.member-item:hover { background: var(--bg-elevated); }
.member-avatar-wrap { position: relative; }
.member-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--bg-void);
}
.member-status {
  position: absolute; bottom: -1px; right: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--bg-void);
}
.member-status.online  { background: var(--emerald); }
.member-status.idle    { background: var(--amber); }
.member-status.dnd     { background: var(--rose); }
.member-status.offline { background: var(--text-muted); }
.member-name { font-size: 13px; color: var(--text-secondary); }

/* ── Notifications ──────────────────────────────────────────── */
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition);
  position: relative;
}
.notif-item:hover { background: var(--bg-surface); }
.notif-item.unread::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cyan);
}
.notif-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--bg-void);
}
.notif-icon {
  position: absolute; bottom: -2px; right: -2px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--bg-void);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
}
.notif-like    { background: var(--rose); }
.notif-follow  { background: var(--violet); }
.notif-comment { background: var(--sky); }
.notif-repo    { background: var(--emerald); }
.notif-text { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.notif-text strong { color: var(--text-primary); font-weight: 700; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-preview {
  margin-top: 6px; padding: 8px 10px;
  background: var(--bg-elevated); border-radius: var(--radius-md);
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
}

/* ── Explore View ───────────────────────────────────────────── */
.explore-header { padding: 20px 16px 0; }
.explore-header h2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.explore-header p  { font-size: 13px; color: var(--text-muted); }

.explore-categories {
  display: flex; gap: 8px; padding: 14px 16px;
  overflow-x: auto; border-bottom: 1px solid var(--border);
}
.explore-categories::-webkit-scrollbar { height: 0; }
.explore-cat {
  padding: 7px 16px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); color: var(--text-secondary);
  background: var(--bg-surface); white-space: nowrap; transition: var(--transition);
}
.explore-cat:hover { border-color: var(--cyan); color: var(--cyan); }
.explore-cat.active { background: var(--cyan-dim); border-color: var(--border-active); color: var(--cyan); }

.projects-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 16px;
}
.project-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition); cursor: pointer;
}
.project-card:hover { border-color: var(--border-active); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.project-card-preview {
  height: 120px; display: flex; align-items: center; justify-content: center;
  font-size: 36px; position: relative; overflow: hidden;
}
.project-card-body { padding: 12px; }
.project-card-name { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.project-card-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.project-card-author { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.project-card-author-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--bg-void);
}

/* ── Messages ───────────────────────────────────────────────── */
.messages-layout { display: flex; height: calc(100vh - var(--topbar-h)); overflow: hidden; }
.conversations-list { width: 260px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; }
.conversations-header { padding: 14px 14px 10px; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.conversation-item {
  display: flex; gap: 10px; padding: 12px 14px;
  cursor: pointer; transition: var(--transition); align-items: flex-start;
}
.conversation-item:hover { background: var(--bg-surface); }
.conversation-item.active { background: var(--bg-elevated); }
.conv-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: var(--bg-void);
  position: relative;
}
.conv-online { position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; background: var(--emerald); border-radius: 50%; border: 2px solid var(--bg-void); }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; display: flex; align-items: center; justify-content: space-between; }
.conv-time { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.conv-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-unread { font-weight: 700; }
.conv-badge { background: var(--cyan); color: var(--bg-void); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); }

.dm-view { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.dm-back-btn { display: none; background: none; border: none; color: var(--text-primary); font-size: 18px; cursor: pointer; padding: 4px 8px 4px 0; flex-shrink: 0; }
.dm-messages { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.dm-own { flex-direction: row-reverse; }
.dm-own .msg-avatar { display: none; }
.dm-own .msg-body { align-items: flex-end; display: flex; flex-direction: column; }
.dm-own .msg-text {
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); padding: 8px 12px; border-radius: 16px 16px 4px 16px;
  font-weight: 500;
}
.dm-other .msg-text {
  background: var(--bg-elevated); padding: 8px 12px;
  border-radius: 16px 16px 16px 4px;
}
.typing-indicator {
  display: flex; align-items: center; gap: 4px; padding: 4px 0;
}
.typing-dot {
  width: 7px; height: 7px; background: var(--text-muted); border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out 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); }
}

/* ── Toasts ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--bg-float); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: flex; align-items: center; gap: 10px; min-width: 220px;
  animation: toastIn 0.3s var(--spring) forwards;
  pointer-events: all;
}
.toast.exit { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 16px; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 560px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(0.97); transition: var(--spring);
}
.modal-overlay.open .modal { transform: none; }
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.modal-close { font-size: 20px; color: var(--text-muted); transition: var(--transition); line-height: 1; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px; }

/* ── Misc Utilities ─────────────────────────────────────────── */
.text-cyan    { color: var(--cyan); }
.text-violet  { color: var(--violet); }
.text-rose    { color: var(--rose); }
.text-emerald { color: var(--emerald); }
.text-amber   { color: var(--amber); }
.text-muted   { color: var(--text-muted); }
.font-mono    { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-float) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.presence-bar {
  height: 2px; position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: linear-gradient(90deg, #ff2d6e, #ff6b35, #ff2d6e);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.presence-bar.loading { transform: scaleX(0.7); animation: presenceAnim 1.5s ease-in-out infinite; }
.presence-bar.done    { transform: scaleX(1); }
@keyframes presenceAnim { 0%,100% { transform: scaleX(0.3); } 50% { transform: scaleX(0.7); } }

/* ── Voice Channel UI ───────────────────────────────────────── */
.voice-channel-view {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1;
  gap: 24px; padding: 32px;
  background: radial-gradient(ellipse at center, rgba(255,45,110,0.04) 0%, transparent 70%);
}
.voice-room-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.voice-participants {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
}
.voice-participant {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
}
.voice-avatar-ring {
  padding: 3px; border-radius: 50%;
  background: var(--bg-float); transition: var(--transition);
}
.voice-avatar-ring.speaking {
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
  animation: voicePulse 1s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,45,110,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(255,45,110,0); }
}
.voice-avatar {
  width: 70px; height: 70px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: var(--bg-void);
  border: 3px solid var(--bg-void);
}
.voice-participant-name { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.voice-participant-mic {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 3px;
}
.voice-controls {
  display: flex; gap: 12px; align-items: center;
}
.voice-ctrl-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; transition: var(--transition);
  background: var(--bg-elevated); border: 1px solid var(--border);
}
.voice-ctrl-btn:hover { background: var(--bg-float); transform: scale(1.05); }
.voice-ctrl-btn.active { background: var(--cyan-dim); border-color: var(--border-active); }
.voice-ctrl-btn.danger { background: rgba(251,113,133,0.15); border-color: rgba(251,113,133,0.3); color: var(--rose); }
.voice-ctrl-btn.danger:hover { background: var(--rose); color: #fff; }

/* ── Thread / Post Detail View ──────────────────────────────── */
.thread-view { padding: 0; }
.thread-back-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; font-size: 14px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.thread-back-btn:hover { color: var(--cyan); }
.thread-main-post {
  padding: 16px; border-bottom: 1px solid var(--border);
}
.thread-main-post .post-content { font-size: 18px; line-height: 1.65; }
.thread-main-post .post-stats {
  display: flex; gap: 16px; padding: 12px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin: 10px 0;
}
.thread-stat { font-size: 14px; }
.thread-stat strong { font-weight: 700; }
.thread-stat span { color: var(--text-muted); }

.thread-replies { }
.thread-reply { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.thread-reply-line {
  position: absolute; left: 35px; top: 52px; bottom: 0;
  width: 2px; background: var(--border);
}

/* ── Stories Modal ──────────────────────────────────────────── */
.story-modal-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.story-modal-overlay.open { opacity: 1; pointer-events: all; }
.story-modal {
  width: 380px; max-height: 680px; border-radius: var(--radius-xl);
  overflow: hidden; position: relative;
  background: var(--bg-surface); border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  transform: scale(0.95); transition: var(--spring);
}
.story-modal-overlay.open .story-modal { transform: scale(1); }
.story-progress-bars {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2;
  display: flex; gap: 4px;
}
.story-progress-bar {
  flex: 1; height: 3px; background: rgba(255,255,255,0.3); border-radius: 3px; overflow: hidden;
}
.story-progress-fill {
  height: 100%; background: #fff; width: 0%;
  transition: width 0.1s linear;
}
.story-progress-fill.active { transition: width 5s linear; }
.story-header-overlay {
  position: absolute; top: 20px; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
}
.story-user-avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--bg-void);
}
.story-user-info .story-user-name { font-size: 13px; font-weight: 700; color: #fff; }
.story-user-info .story-user-time { font-size: 11px; color: rgba(255,255,255,0.7); }
.story-close-btn {
  margin-left: auto; color: #fff; font-size: 22px; line-height: 1;
  opacity: 0.8; transition: var(--transition);
}
.story-close-btn:hover { opacity: 1; }
.story-content {
  width: 100%; aspect-ratio: 9/16;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; position: relative;
}
.story-text-overlay {
  position: absolute; bottom: 70px; left: 16px; right: 16px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  border-radius: var(--radius-md); padding: 12px;
  font-size: 14px; line-height: 1.5; color: #fff;
}
.story-reactions {
  position: absolute; bottom: 14px; left: 14px; right: 14px;
  display: flex; gap: 8px; align-items: center;
}
.story-reply-input {
  flex: 1; padding: 8px 14px; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-full);
  color: #fff; font-size: 13px;
}
.story-reply-input::placeholder { color: rgba(255,255,255,0.5); }
.story-emoji-btn { font-size: 22px; cursor: pointer; transition: var(--transition); }
.story-emoji-btn:hover { transform: scale(1.2); }

/* ── Search Overlay ─────────────────────────────────────────── */
.search-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-panel {
  width: 600px; max-width: 95vw;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transform: translateY(-10px); transition: var(--spring);
}
.search-overlay.open .search-panel { transform: translateY(0); }
.search-panel-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.search-panel-input {
  flex: 1; background: none; border: none; color: var(--text-primary);
  font-size: 16px; font-family: var(--font-body);
}
.search-panel-input:focus { outline: none; }
.search-panel-input::placeholder { color: var(--text-muted); }
.search-results-section { padding: 10px 0; }
.search-section-label { padding: 4px 16px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer; transition: var(--transition);
}
.search-result-item:hover { background: var(--bg-elevated); }
.search-result-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--bg-void);
}
.search-result-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-float); font-size: 16px;
}
.search-result-main { font-size: 14px; font-weight: 600; }
.search-result-sub  { font-size: 12px; color: var(--text-muted); }
.search-shortcut {
  margin-left: auto; padding: 2px 7px; background: var(--bg-float);
  border-radius: 4px; font-size: 11px; color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Collaboration Request Card ─────────────────────────────── */
.collab-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  transition: var(--transition);
}
.collab-card:hover { border-color: var(--border-active); }
.collab-card-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.collab-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.collab-card-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.collab-card-author { font-size: 12px; color: var(--text-muted); }
.collab-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.collab-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.collab-tag {
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; background: var(--bg-float);
  border: 1px solid var(--border); color: var(--text-secondary);
  font-family: var(--font-mono);
}
.collab-footer { display: flex; align-items: center; gap: 10px; }
.collab-avatars { display: flex; }
.collab-avatar-small {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--bg-void);
  margin-left: -6px;
}
.collab-avatar-small:first-child { margin-left: 0; }
.collab-member-count { font-size: 12px; color: var(--text-muted); }
.collab-apply-btn {
  margin-left: auto; padding: 7px 16px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); transition: var(--transition);
}
.collab-apply-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,45,110,0.3); }
.collab-apply-btn.applied { background: var(--bg-float); color: var(--text-secondary); }

/* ── Stats / Analytics Widget ───────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.stat-cell {
  background: var(--bg-surface); padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-cell-value { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.stat-cell-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-cell-delta { font-size: 11px; font-weight: 600; }
.stat-cell-delta.up   { color: var(--emerald); }
.stat-cell-delta.down { color: var(--rose); }

/* ── Mini Sparkline ─────────────────────────────────────────── */
.sparkline { display: flex; align-items: flex-end; gap: 2px; height: 32px; }
.spark-bar {
  flex: 1; border-radius: 2px 2px 0 0;
  background: var(--cyan-dim); transition: var(--transition); min-height: 4px;
}
.spark-bar:hover { background: var(--cyan); }

/* ── Profile Edit Modal ─────────────────────────────────────── */
.edit-avatar-section {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.edit-avatar-preview {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: linear-gradient(135deg, #ff2d6e, #ff6b35);
}
.edit-avatar-actions { display: flex; flex-direction: column; gap: 6px; }
.edit-avatar-btn {
  padding: 6px 14px; border-radius: var(--radius-md); font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-primary); background: var(--bg-elevated);
  cursor: pointer; transition: var(--transition);
}
.edit-avatar-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.edit-form-group { margin-bottom: 14px; }
.edit-form-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.edit-form-input, .edit-form-textarea {
  width: 100%; padding: 10px 12px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px;
  font-family: var(--font-body); transition: var(--transition);
}
.edit-form-input:focus, .edit-form-textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim);
}
.edit-form-textarea { resize: vertical; min-height: 80px; }
.edit-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-form-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 14px; border-top: 1px solid var(--border); margin-top: 4px;
}
.edit-cancel-btn {
  padding: 9px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-secondary); background: transparent;
  cursor: pointer; transition: var(--transition);
}
.edit-cancel-btn:hover { border-color: var(--text-primary); color: var(--text-primary); }
.edit-save-btn {
  padding: 9px 24px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); cursor: pointer; transition: var(--transition);
}
.edit-save-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,45,110,0.3); }

/* ── Onboarding Tooltip ─────────────────────────────────────── */
.onboard-tip {
  position: fixed; z-index: 700;
  background: var(--bg-float); border: 1px solid var(--border-active);
  border-radius: var(--radius-lg); padding: 14px 16px;
  max-width: 260px; box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  animation: tipIn 0.4s var(--spring) forwards;
}
@keyframes tipIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.onboard-tip-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; color: var(--cyan); }
.onboard-tip-body  { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.onboard-tip-footer { display: flex; justify-content: flex-end; margin-top: 10px; }
.onboard-tip-btn {
  padding: 5px 14px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; background: var(--cyan);
  color: var(--bg-void); cursor: pointer; transition: var(--transition);
}

/* ── Presence / Live Indicator ──────────────────────────────── */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: var(--radius-full);
  background: rgba(251,113,133,0.15); border: 1px solid rgba(251,113,133,0.3);
  font-size: 11px; font-weight: 700; color: var(--rose);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--rose);
  animation: livePulse 1.2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

/* ── Drag & Drop Upload ─────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 32px; text-align: center; cursor: pointer;
  transition: var(--transition);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--cyan); background: var(--cyan-dim);
}
.drop-zone-icon { font-size: 32px; margin-bottom: 8px; }
.drop-zone-text { font-size: 14px; color: var(--text-secondary); }
.drop-zone-text strong { color: var(--cyan); }
.drop-zone-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Collabs View ───────────────────────────────────────────── */
.collabs-header {
  padding: 20px 16px 0;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.collabs-header h2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.new-collab-btn {
  padding: 8px 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); transition: var(--transition);
}
.new-collab-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,45,110,0.3); }
.collabs-grid { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }

/* ── GitHub Repo Card (expanded) ────────────────────────────── */
.repo-card-full {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; transition: var(--transition);
}
.repo-card-full:hover { border-color: var(--border-active); }
.repo-card-full-name { font-size: 16px; font-weight: 700; color: var(--cyan); margin-bottom: 4px; }
.repo-card-full-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.repo-card-full-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-muted); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) { #rightbar { display: none; } }
@media (max-width: 780px)  {
  .communities-grid, .projects-grid { grid-template-columns: 1fr; }
  .voice-participants { gap: 10px; }
  .voice-avatar { width: 54px; height: 54px; font-size: 22px; }
}

/* ══════════════════════════════════════════════════════════════
   CYANET v2 — Supabase integration additions
   ══════════════════════════════════════════════════════════════ */

/* ── Profile Avatar Circle ──────────────────────────────────── */
.profile-avatar-circle {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  vertical-align: middle;
}

/* ── Rightbar ───────────────────────────────────────────────── */
.rightbar-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 14px;
}
.rightbar-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
}
.follow-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.follow-suggestion:last-child { margin-bottom: 0; }
.follow-suggestion-info { flex: 1; min-width: 0; }
.follow-suggestion-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.follow-suggestion-handle { font-size: 12px; color: var(--text-muted); }
.follow-btn {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700;
  background: var(--cyan-dim);
  border: 1px solid var(--border-active);
  color: var(--cyan);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.follow-btn:hover { background: var(--cyan); color: var(--bg-void); }

.trending-item {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; }
.trending-tag { font-weight: 700; font-size: 13px; color: var(--cyan); }
.trending-count { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* ── Community Card ─────────────────────────────────────────── */
.communities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}
.community-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.community-card:hover { border-color: var(--border-active); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.community-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.community-card-name { font-weight: 700; font-size: 14px; }
.community-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; flex: 1; }
.community-card-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-muted); }
.join-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void);
  transition: var(--transition);
  border: none;
}
.join-btn.joined {
  background: var(--bg-float);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.join-btn:hover:not(.joined) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,45,110,0.25); }

/* ── Settings Rows ──────────────────────────────────────────── */
.settings-row {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--bg-elevated); }

/* ── Post delete button hover ───────────────────────────────── */
.post-delete-btn:hover { color: var(--rose) !important; }

/* ── Search result item hover ───────────────────────────────── */
.search-result-item:hover { background: var(--bg-elevated); }

/* ── Explore person card hover ──────────────────────────────── */
.explore-person-card:hover { background: var(--bg-elevated) !important; border-color: var(--border-active) !important; }
.dm-own-text {
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void);
  padding: 8px 12px;
  border-radius: 16px 16px 4px 16px;
  font-weight: 500;
}

/* ── Conversations header flex ──────────────────────────────── */
.conversations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Profile online dot states ──────────────────────────────── */
.profile-online-dot.online { background: var(--emerald); }
.profile-online-dot:not(.online) { background: var(--text-muted); }

/* ── Presence uid dots ──────────────────────────────────────── */
[data-presence-uid].online  { background: var(--emerald) !important; }
[data-presence-uid].offline { background: var(--text-muted) !important; }

/* ── Modal body no padding override ────────────────────────── */
.modal-body { padding: 0; }

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE + DARK MODE + MOBILE + ANIMATIONS v3
   ══════════════════════════════════════════════════════════════ */

/* ── Light mode variables ──────────────────────────────────── */
[data-theme="light"] {
  --bg-void:        #f0f2f8;
  --bg-base:        #f5f7fc;
  --bg-surface:     #ffffff;
  --bg-elevated:    #eef0f8;
  --bg-float:       #e4e7f2;
  --border:         rgba(0,0,0,0.09);
  --border-active:  rgba(14,116,190,0.4);

  --cyan:           #0e74be;
  --cyan-dim:       rgba(14,116,190,0.1);
  --cyan-glow:      rgba(14,116,190,0.2);
  --violet:         #ff6b35;
  --violet-dim:     rgba(255,107,53,0.1);
  --rose:           #e11d48;
  --emerald:        #059669;
  --amber:          #d97706;
  --sky:            #0284c7;

  --text-primary:   #0f1117;
  --text-secondary: #4b5572;
  --text-muted:     #8892b0;
  --text-code:      #0e5a8a;

  color-scheme: light;
}

[data-theme="light"] body {
  background: var(--bg-void);
  color: var(--text-primary);
}

[data-theme="light"] #topbar {
  background: rgba(245,247,252,0.92);
  border-bottom-color: var(--border);
}

[data-theme="light"] .auth-panel-left {
  background: linear-gradient(135deg, #eef5ff 0%, #f5f0ff 100%);
}

[data-theme="light"] .auth-bg-grid {
  background-image:
    linear-gradient(rgba(255,45,110,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,45,110,0.06) 1px, transparent 1px);
}

[data-theme="light"] .auth-bg-orb { opacity: 0.12; }

[data-theme="light"] .auth-btn-github {
  background: #24292e; color: #fff;
}
[data-theme="light"] .auth-btn-github:hover { background: #1a1e22; }

[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--bg-float); }

/* ── Theme toggle button ───────────────────────────────────── */
#theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-md);
  color: var(--text-secondary); font-size: 15px;
  transition: var(--transition);
  flex-shrink: 0;
}
#theme-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ── Bottom nav (mobile only) ──────────────────────────────── */
#bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: 60px;
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* Never hide on scroll */
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}
#bottom-nav-inner {
  display: flex; align-items: stretch; justify-content: space-around;
  height: 60px;
  padding: 0 4px;
}
.bnav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--text-muted); font-size: 17px;
  transition: color 0.18s, transform 0.2s var(--spring);
  position: relative; min-width: 0;
  -webkit-tap-highlight-color: transparent;
}
.bnav-btn.active { color: var(--cyan); }
.bnav-btn:active { transform: scale(0.88); }
.bnav-label { font-size: 9.5px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.bnav-badge {
  position: absolute; top: 4px; right: calc(50% - 14px);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rose); border: 2px solid var(--bg-base);
  display: none;
}
.bnav-badge.visible { display: block; }

/* ── Centre post button in bottom nav ───────────────────────── */
.bnav-post-btn {
  position: relative;
}
.bnav-post-icon {
  width: 46px; height: 32px; border-radius: 16px;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: #fff; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 14px rgba(255,45,110,0.45);
  transition: transform 0.2s var(--spring), box-shadow 0.2s;
  margin-bottom: 1px;
}
.bnav-post-btn:active .bnav-post-icon {
  transform: scale(0.91);
  box-shadow: 0 1px 6px rgba(255,45,110,0.2);
}
.bnav-post-btn .bnav-label { color: var(--cyan); font-weight: 700; }

/* ── 6-button bottom nav (leaderboard added) ────────────────── */
@media (max-width: 640px) {
  #bottom-nav-inner .bnav-btn {
    font-size: 15px;
  }
}


/* ── Smoother page transitions ─────────────────────────────── */
#main { position: relative; }
.page-enter {
  animation: pageSlideIn 0.32s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}
@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Enhanced toast ────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 80px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--bg-float); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.05) inset;
  display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 320px;
  animation: toastIn 0.38s var(--spring) forwards;
  pointer-events: all;
  backdrop-filter: blur(12px);
}
.toast.exit { animation: toastOut 0.28s cubic-bezier(0.4,0,1,1) forwards; }
.toast-icon { font-size: 15px; color: var(--cyan); flex-shrink: 0; }
@keyframes toastIn  {
  from { opacity: 0; transform: translateX(28px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(28px) scale(0.92); }
}

/* ── Enhanced modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 560px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.32s cubic-bezier(0.34,1.4,0.64,1),
              opacity 0.22s cubic-bezier(0.4,0,0.2,1);
  opacity: 0;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ── Sidebar link animation ────────────────────────────────── */
.sidebar-link {
  transition: background 0.18s, color 0.18s, transform 0.18s var(--spring);
}
.sidebar-link:active { transform: scale(0.97); }

/* ── Post card hover ───────────────────────────────────────── */
.post-card {
  transition: background 0.18s, border-color 0.18s, transform 0.2s var(--spring),
              box-shadow 0.2s;
}
.post-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* ── Follow/Join button pulse ──────────────────────────────── */
.follow-btn, .join-btn {
  transition: background 0.18s, color 0.18s, transform 0.2s var(--spring),
              box-shadow 0.18s;
}
.follow-btn:active, .join-btn:active { transform: scale(0.93); }

/* ── Like button bounce ────────────────────────────────────── */
.like-btn.liked { animation: likePop 0.35s var(--spring); }
@keyframes likePop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.4); }
  70%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}

/* ── Skeleton shimmer ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-float) 40%,
    var(--bg-elevated) 80%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Presence bar ──────────────────────────────────────────── */
.presence-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999;
  background: linear-gradient(90deg, #ff2d6e, #ff6b35);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
  opacity: 0;
}
.presence-bar.loading { transform: scaleX(0.7); opacity: 1; }
.presence-bar.done    { transform: scaleX(1); opacity: 0; transition: transform 0.2s, opacity 0.5s 0.2s; }

/* ── Mobile-specific overrides ─────────────────────────────── */
@media (max-width: 640px) {
  /* Show bottom nav, hide desktop sidebar */
  #bottom-nav { display: flex; flex-direction: column; }
  #sidebar { display: none !important; }
  #rightbar { display: none !important; }

  /* Push main content above bottom nav */
  #app { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  /* Topbar: hide search bar text, tighten up */
  .topbar-logo span { display: none; }
  .topbar-search { max-width: 180px; }

  /* Move toast above bottom nav */
  #toast-container { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); right: 12px; }

  /* Full-width modal */
  .modal {
    width: 100%; max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: 0; margin-top: auto;
    max-height: 92vh;
  }
  .modal-overlay { align-items: flex-end; }
  .modal-overlay.open .modal { transform: translateY(0) scale(1); }
  .modal {
    transform: translateY(100%);
    transition: transform 0.36s cubic-bezier(0.34,1.2,0.64,1),
                opacity 0.22s;
  }

  /* Feed card padding */
  .post-card { border-radius: var(--radius-md); }

  /* Auth screen: full width card */
  .auth-card { padding: 36px 20px; }

  /* Community/messages layouts */
  .community-sidebar { display: none; }
  /* Mobile DM: full-width list; dm-view slides in as an overlay panel */
  .messages-layout .conversations-list { width: 100%; flex-shrink: 0; }
  .messages-layout .dm-view {
    position: fixed; inset: 0; top: var(--topbar-h);
    background: var(--bg-base); z-index: 300;
    transform: translateX(100%); transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
  }
  .messages-layout .dm-view.dm-view-open { transform: translateX(0); }
  /* Back button shown only on mobile */
  .dm-back-btn { display: flex !important; }
  /* Hide bottom nav when DM is open so keyboard doesn't fight it */
  body.dm-open #bottom-nav { display: none; }
}

/* ── Tablet adjustments ────────────────────────────────────── */
@media (min-width: 641px) and (max-width: 1024px) {
  #sidebar { width: 64px; }
  .sidebar-link span,
  .sidebar-section-label,
  .sidebar-communities-header span,
  .sidebar-community-name,
  .sidebar-bottom .sidebar-link span { display: none; }
  .sidebar-link { justify-content: center; }
  .sidebar-communities-header { justify-content: center; }
  .sidebar-community { justify-content: center; }
  .sidebar-community-name, .sidebar-community-dot { display: none; }
  #rightbar { display: none; }
}

/* ── Remove old conflicting media queries ──────────────────── */
/* (Overridden by specificity above) */

/* ── Auth screen responsive ────────────────────────────────── */
@media (max-width: 860px) {
  .auth-panel-left { display: none; }
  .auth-card {
    max-width: 100%; padding: 48px 32px;
  }
  #auth-screen { justify-content: center; }
}
@media (max-width: 480px) {
  .auth-card { padding: 40px 20px; }
}

/* ── Ripple on tap ─────────────────────────────────────────── */
.ripple-host { overflow: hidden; position: relative; }
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transform: scale(0); pointer-events: none;
  animation: rippleAnim 0.5s linear forwards;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Smooth focus rings ────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Auth screen light mode ────────────────────────────────── */
[data-theme="light"] .auth-card {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 24px 64px rgba(0,0,0,0.12);
}
[data-theme="light"] .auth-tabs {
  background: var(--bg-elevated);
}
[data-theme="light"] .auth-tab.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
[data-theme="light"] .auth-input {
  background: var(--bg-elevated);
  border-color: var(--border);
}

/* ── Topbar theme toggle position ──────────────────────────── */
.topbar-actions { display: flex; align-items: center; gap: 4px; }

/* ── Snippets Feed ──────────────────────────────────────────── */
.snippets-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.snippet-card {
  position: relative;
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #000;
  cursor: pointer;
}

.snippet-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 65vh;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.snippet-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.snippet-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%, transparent 80%, rgba(0,0,0,0.3) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  pointer-events: none;
}

.snippet-actions-side {
  position: absolute;
  right: 12px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: all;
  align-items: center;
}

.snippet-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #fff; font-size: 22px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transition: transform 0.2s var(--spring);
  background: none; border: none; cursor: pointer;
}
.snippet-action-btn:hover { transform: scale(1.15); }
.snippet-heart-count { font-size: 12px; font-weight: 700; color: #fff; }

.snippet-info {
  pointer-events: all;
  padding-right: 60px;
}

.snippet-author {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; cursor: pointer;
}

.snippet-caption {
  font-size: 13px; color: #fff; line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.snippet-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px; color: rgba(255,255,255,0.8);
  transition: opacity 0.3s;
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* ── Links Page ─────────────────────────────────────────────── */
.link-person-row { }

/* ── Profile Quick View ─────────────────────────────────────── */
#profile-quick-overlay {
  animation: fadeIn 0.2s ease forwards;
}
#profile-quick-card {
  animation: scaleIn 0.3s var(--spring) forwards;
}
@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Snippets SQL note ──────────────────────────────────────── */
/* Add these tables in Supabase:
snippets(id, author_id, video_url, caption, hearts_count, duration, created_at)
snippet_hearts(id, snippet_id, user_id, created_at)
snippet_bookmarks(id, snippet_id, user_id, created_at)
links(id, requester_id, target_id, status['pending'|'accepted'], created_at)
profiles: add banner_color text, banner_url text
*/


/* ============================================================
   UI SMOOTHING & RESPONSIVE LAYOUT UPGRADE
   ============================================================ */

/* Global Variable Smoothness Adjustments */
:root {
  --topbar-h: 56px;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --glass-bg: rgba(10, 11, 16, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
}

/* Base Tweaks for Tactile Mobile Scrolling */
body {
  -webkit-overflow-scrolling: touch;
  text-rendering: optimizeLegibility;
}

/* Smoother interactive element animations */
button, .sidebar-link, .post-action, .auth-tab, .view-tab {
  transition: all var(--transition-smooth) !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Glassmorphism Topbar Overlay Enhancement */
#topbar {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 400;
  /* Fixed position — always visible, never hides */
  position: fixed !important;
  top: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Desktop utility classes */
.desktop-only { display: block; }
.mobile-toggle-btn { display: none !important; }

/* Global Blur Overlay For Drawer Actions */
#layout-blur-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 6, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 290;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}
#layout-blur-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Smooth Interactive States for Cards */
.post-card {
  transition: transform var(--transition-smooth), background var(--transition-smooth);
}
.post-card:active {
  transform: scale(0.998);
}

/* Smooth Input Focus Rings */
.auth-input, .composer-inner, .topbar-search input {
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

/* Mobile sidebar hamburger button inside topbar */
.topbar-mobile-sidebar-btn {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  flex-shrink: 0;
  transition: var(--transition);
}
.topbar-mobile-sidebar-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ============================================================
   MEDIA QUERIES FOR SEAMLESS RESPONSIVENESS
   ============================================================ */

/* 1. Large Screen Layout Optimization */
@media (max-width: 1200px) {
  :root { --rightbar-w: 280px; }
}

/* 2. Medium Screen / Tablet Layout Collapse */
@media (max-width: 1024px) {
  #rightbar {
    position: fixed !important;
    top: var(--topbar-h) !important;
    right: 0 !important;
    bottom: 0 !important;
    width: var(--rightbar-w) !important;
    height: calc(100vh - var(--topbar-h)) !important;
    background: var(--bg-surface) !important;
    border-left: 1px solid var(--border) !important;
    z-index: 300 !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(100%) !important;
    transition: transform var(--transition-smooth) !important;
    overflow-y: auto !important;
  }
  #rightbar.open {
    transform: translateX(0) !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5) !important;
  }
  /* Show the rightbar toggle btn at tablet+ */
  .topbar-rightbar-toggle { display: flex !important; }
}

/* 3. Smartphone / Compact Mobile Layout */
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .topbar-mobile-sidebar-btn { display: flex !important; }

  /* Push content above bottom nav */
  .app-body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  #topbar {
    justify-content: space-between;
    padding: 0 10px;
  }

  .topbar-search {
    max-width: 170px;
    margin: 0 6px;
  }

  /* Sidebar becomes a left slide drawer */
  #sidebar {
    position: fixed !important;
    top: var(--topbar-h) !important;
    left: 0 !important;
    bottom: 0 !important;
    width: var(--sidebar-w) !important;
    height: calc(100vh - var(--topbar-h)) !important;
    background: var(--bg-surface) !important;
    border-right: 1px solid var(--border) !important;
    z-index: 300 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    transform: translateX(-100%) !important;
    transition: transform var(--transition-smooth) !important;
  }
  #sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5) !important;
  }

  /* Auth responsive */
  #auth-screen { flex-direction: column; overflow-y: auto; }
  .auth-panel-left { display: none; }
  .auth-card { max-width: 100%; padding: 32px 20px; justify-content: flex-start; }

  /* Composer */
  .composer { padding: 12px; }
}

/* ── Pull-to-Refresh Indicator ──────────────────────────────── */
.ptr-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  height: 0;
  opacity: 0;
  transition: height 0.15s ease, opacity 0.15s ease;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
}
.ptr-icon {
  color: var(--cyan);
  font-size: 16px;
  transition: transform 0.2s ease;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Snippets Swipe Hint Animations ────────────────────────── */
@keyframes swipeHintFade {
  0%   { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}
@keyframes bounceUp {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}

/* ── Focus management: main gets focus on nav, no visible ring ─ */
#main:focus { outline: none; }

/* ── Accessibility: improved contrast on muted text ─────────── */
/* --text-muted was #4a5070 (~3.4:1 on dark bg) — nudge up to pass AA */
:root {
  --text-muted: #606880; /* improved from #4a5070 — better contrast on bg-void */
}
[data-theme="light"] {
  --text-muted: #6b7280; /* keeps existing light-mode value */
}

/* Skip-to-content link (screen reader / keyboard users) */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 10px 20px;
  background: var(--cyan);
  color: var(--bg-void);
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ── ARIA tab keyboard focus styles ─────────────────────────── */
.view-tab:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Bottom nav button focus ────────────────────────────────── */
.bnav-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

/* ── Auth input better focus ring ───────────────────────────── */
.auth-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

/* ── Topbar rightbar toggle — hidden by default on desktop */
.topbar-rightbar-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 16px;
  transition: var(--transition);
}
.topbar-rightbar-toggle:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}



/* ============================================================
   DEVIT — Design System v3
   Consolidated, intentional, no dead overrides.
   Fonts: Syne (display) · DM Sans (body) · JetBrains Mono (code)
   ============================================================ */

/* ── Design tokens ───────────────────────────────────────────── */
:root {
  --ease-expo:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:  cubic-bezier(0.4, 0, 0.2, 1);
  --transition:   0.2s var(--ease-expo);

  --border-soft:       rgba(255,255,255,0.055);
  --glow-cyan:         0 0 28px rgba(93,212,244,0.18);
  --glow-violet:       0 0 28px rgba(255,107,53,0.16);

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   26px;

  --shadow-xs:  0 1px 3px rgba(0,0,0,0.2);
  --shadow-sm:  0 2px 10px rgba(0,0,0,0.22);
  --shadow-md:  0 6px 22px rgba(0,0,0,0.28);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.36);
  --shadow-xl:  0 24px 72px rgba(0,0,0,0.48);

  /* topbar height unification */
  --topbar-h: 56px;
}

/* ── Global rendering ────────────────────────────────────────── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
* { -webkit-tap-highlight-color: transparent; }
#main:focus { outline: none; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Topbar ──────────────────────────────────────────────────── */
#topbar {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  z-index: 400 !important;
  transform: none !important; opacity: 1 !important; visibility: visible !important;
  height: var(--topbar-h) !important;
  background: rgba(6, 7, 12, 0.86) !important;
  backdrop-filter: blur(24px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
  border-bottom: 1px solid var(--border-soft) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.025), 0 6px 32px rgba(0,0,0,0.25) !important;
}

.topbar-search input {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 10px !important;
  transition: var(--transition) !important;
}
.topbar-search input:focus {
  background: rgba(255,255,255,0.065) !important;
  border-color: rgba(93,212,244,0.32) !important;
  box-shadow: 0 0 0 3px rgba(93,212,244,0.09) !important;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebar {
  background: rgba(6, 7, 12, 0.82) !important;
  border-right: 1px solid var(--border-soft) !important;
}

.sidebar-link {
  border-radius: var(--radius-md) !important;
  transition: background var(--transition), color var(--transition), transform 0.15s var(--ease-expo) !important;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.045) !important;
  transform: translateX(2px) !important;
}
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(93,212,244,0.11) 0%, rgba(255,107,53,0.06) 100%) !important;
  border-left: 2px solid rgba(93,212,244,0.55) !important;
  box-shadow: inset 0 1px 0 rgba(93,212,244,0.05) !important;
}
.sidebar-link.active .icon,
.sidebar-link.active i { color: var(--cyan) !important; }
.sidebar-link:active { transform: scale(0.97) !important; }

/* ── Right sidebar ───────────────────────────────────────────── */
#rightbar {
  background: rgba(6, 7, 12, 0.84) !important;
  border-left: 1px solid var(--border-soft) !important;
}

.widget {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-soft) !important;
  background: rgba(16, 18, 26, 0.88) !important;
  backdrop-filter: blur(8px) !important;
  overflow: hidden;
  transition: border-color var(--transition) !important;
}
.widget:hover { border-color: rgba(255,255,255,0.09) !important; }
.widget-title {
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: var(--text-muted) !important;
}

/* ── Post cards ──────────────────────────────────────────────── */
.post-card {
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--border-soft) !important;
  box-shadow: none !important;
  transition:
    background var(--transition),
    border-color var(--transition) !important;
  overflow: visible !important;
  will-change: auto;
}
.post-card:hover {
  background: rgba(255,255,255,0.018) !important;
  transform: none !important;
  box-shadow: none !important;
}
.post-card:active { background: rgba(255,255,255,0.008) !important; }
/* Left accent on hover */
.post-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(to bottom, #ff2d6e, #ff6b35);
  transition: width 0.18s var(--ease-expo);
  border-radius: 0 2px 2px 0;
}
.post-card:hover::before { width: 2px; }

/* ── Post actions ────────────────────────────────────────────── */
.post-action {
  border-radius: 8px !important;
  transition: background var(--transition), color var(--transition), transform 0.15s var(--ease-spring) !important;
}
.post-action:hover {
  background: rgba(255,255,255,0.05) !important;
  transform: scale(1.07) !important;
}
.post-action:active { transform: scale(0.93) !important; }
.like-btn.liked { animation: likePop 0.38s var(--ease-spring); }
@keyframes likePop {
  0%   { transform: scale(1); }
  42%  { transform: scale(1.38); }
  70%  { transform: scale(0.91); }
  100% { transform: scale(1); }
}

/* ── Composer ────────────────────────────────────────────────── */
.composer {
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--border-soft) !important;
  box-shadow: none !important;
  transition: background var(--transition) !important;
}
.composer-inner {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-soft) !important;
  background: rgba(255,255,255,0.025) !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
}
.composer-inner:focus-within {
  border-color: rgba(93,212,244,0.28) !important;
  box-shadow: 0 0 0 3px rgba(93,212,244,0.07) !important;
}
textarea.composer-textarea,
.composer textarea {
  border-radius: var(--radius-md) !important;
  resize: none;
  line-height: 1.65;
}

/* ── Code blocks ─────────────────────────────────────────────── */
.post-code, pre {
  border-radius: var(--radius-md) !important;
  background: rgba(93,212,244,0.035) !important;
  border: 1px solid rgba(93,212,244,0.1) !important;
  font-size: 12.5px !important;
}

/* ── Auth screen ─────────────────────────────────────────────── */
.auth-card {
  background: rgba(8, 9, 16, 0.88) !important;
  backdrop-filter: blur(28px) saturate(1.7) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.7) !important;
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--border-soft) !important;
  box-shadow: var(--shadow-xl) !important;
}

.auth-tabs {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-md) !important;
  padding: 4px !important;
}
.auth-tab {
  border-radius: 11px !important;
  transition: var(--transition) !important;
}
.auth-tab.active {
  background: rgba(255,255,255,0.075) !important;
  box-shadow: var(--shadow-xs) !important;
}

.auth-input {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  transition: var(--transition) !important;
}
.auth-input:focus {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(93,212,244,0.4) !important;
  box-shadow: 0 0 0 3px rgba(93,212,244,0.09) !important;
}

.auth-btn-primary {
  border-radius: var(--radius-md) !important;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 120%) !important;
  color: var(--bg-void) !important;
  font-weight: 700 !important;
  transition: transform 0.2s var(--ease-spring), box-shadow var(--transition) !important;
}
.auth-btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 32px rgba(93,212,244,0.32) !important;
}
.auth-btn-primary:active { transform: scale(0.97) !important; }

.auth-btn-github {
  border-radius: var(--radius-md) !important;
  transition: transform 0.2s var(--ease-spring), box-shadow var(--transition) !important;
}
.auth-btn-github:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45) !important;
}

.auth-btn-google {
  border-radius: var(--radius-md) !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--border-soft) !important;
  transition: transform 0.2s var(--ease-spring), box-shadow var(--transition) !important;
}
.auth-btn-google:hover {
  background: rgba(255,255,255,0.07) !important;
  transform: translateY(-2px) !important;
}

.auth-btn-magic {
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255,107,53,0.22) !important;
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  backdrop-filter: blur(18px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.4) !important;
  background: rgba(3,4,8,0.72) !important;
}
.modal {
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  background: var(--bg-surface) !important;
}
.modal-header {
  border-bottom: 1px solid var(--border-soft) !important;
  background: rgba(255,255,255,0.015) !important;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.view-tabs {
  border-radius: 0 !important;
  padding: 10px 16px 0 !important;
  background: var(--bg-void) !important;
  border: none !important;
  border-bottom: 1px solid var(--border-soft) !important;
  gap: 0 !important;
}
.view-tab {
  border-radius: 0 !important;
  padding: 9px 18px !important;
  position: relative;
  transition: color var(--transition) !important;
  background: none !important;
}
.view-tab::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--cyan);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 2px 2px 0 0;
}
.view-tab.active {
  color: var(--text-primary) !important;
  background: none !important;
  box-shadow: none !important;
}
.view-tab.active::after { transform: scaleX(1); }

/* ── Bottom nav ──────────────────────────────────────────────── */
#bottom-nav {
  background: rgba(6, 7, 12, 0.92) !important;
  border-top: 1px solid var(--border-soft) !important;
  backdrop-filter: blur(24px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
  box-shadow: 0 -4px 28px rgba(0,0,0,0.28) !important;
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}
.bnav-btn {
  border-radius: 0 !important;
  transition: color 0.16s, transform 0.2s var(--ease-spring) !important;
}
.bnav-btn.active { color: var(--cyan) !important; }
.bnav-btn:active { transform: scale(0.9) !important; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  background: rgba(22,25,38,0.95) !important;
}

/* ── Follow / Join buttons ───────────────────────────────────── */
.follow-btn, .join-btn {
  transition: background var(--transition), color var(--transition),
              transform 0.2s var(--ease-spring), box-shadow var(--transition) !important;
}
.follow-btn:hover, .join-btn:hover { transform: translateY(-1px) !important; }
.follow-btn:active, .join-btn:active { transform: scale(0.94) !important; }

/* ── Profile avatar ──────────────────────────────────────────── */
.profile-avatar-circle {
  transition: box-shadow 0.2s var(--ease-expo) !important;
}
.profile-avatar-circle:hover {
  box-shadow: 0 0 0 3px rgba(93,212,244,0.3) !important;
}

/* ── Ripple ──────────────────────────────────────────────────── */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(93,212,244,0.1);
  transform: scale(0);
  animation: rippleOut 0.48s var(--ease-expo);
  pointer-events: none;
}
@keyframes rippleOut { to { transform: scale(2.8); opacity: 0; } }

/* ── Presence bar ────────────────────────────────────────────── */
.presence-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999;
  background: linear-gradient(90deg, #ff2d6e, #ff6b35);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease-expo), opacity 0.3s;
  opacity: 0;
}
.presence-bar.loading { transform: scaleX(0.72); opacity: 1; }
.presence-bar.done    { transform: scaleX(1); opacity: 0; transition: transform 0.2s, opacity 0.5s 0.2s; }

/* ── Page transition ─────────────────────────────────────────── */
.page-enter { animation: pageIn 0.28s var(--ease-expo) forwards; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Notification items ──────────────────────────────────────── */
.notif-item {
  border-radius: 0 !important;
  transition: background var(--transition) !important;
}
.notif-item:hover { background: rgba(255,255,255,0.025) !important; }

/* ── Leaderboard ─────────────────────────────────────────────── */
.leaderboard-full-row {
  border-radius: var(--radius-md) !important;
  transition: transform var(--transition), border-color var(--transition) !important;
}
.leaderboard-full-row:hover {
  transform: translateX(4px) !important;
  border-color: rgba(93,212,244,0.2) !important;
}

/* ── Mobile sidebar drawer ───────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar {
    position: fixed !important;
    top: var(--topbar-h) !important;
    left: 0 !important; bottom: 0 !important;
    width: var(--sidebar-w) !important;
    height: calc(100vh - var(--topbar-h)) !important;
    background: rgba(6, 7, 12, 0.97) !important;
    border-right: 1px solid var(--border-soft) !important;
    z-index: 300 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    transform: translateX(-100%) !important;
    transition: transform var(--transition) !important;
  }
  #sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 12px 0 36px rgba(0,0,0,0.55) !important;
  }
  #rightbar {
    position: fixed !important;
    top: var(--topbar-h) !important;
    right: 0 !important; bottom: 0 !important;
    width: var(--rightbar-w) !important;
    height: calc(100vh - var(--topbar-h)) !important;
    background: rgba(6, 7, 12, 0.97) !important;
    border-left: 1px solid var(--border-soft) !important;
    z-index: 300 !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(100%) !important;
    transition: transform var(--transition) !important;
    overflow-y: auto !important;
  }
  #rightbar.open {
    transform: translateX(0) !important;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5) !important;
  }
  .topbar-mobile-sidebar-btn { display: flex !important; }
  .desktop-only { display: none !important; }
  #auth-screen { flex-direction: column; overflow-y: auto; }
  .auth-panel-left { display: none; }
  .auth-card { max-width: 100%; padding: 32px 20px; justify-content: flex-start; }
  .app-body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  #topbar { justify-content: space-between; padding: 0 10px; }
  .topbar-search { max-width: 170px; margin: 0 6px; }
  .composer { padding: 12px; }
  .messages-layout .conversations-list { width: 100%; }
  .messages-layout .dm-view {
    position: fixed; inset: 0; top: var(--topbar-h);
    background: var(--bg-base); z-index: 300;
    transform: translateX(100%); transition: transform 0.26s var(--ease-expo);
    display: flex; flex-direction: column;
  }
  .messages-layout .dm-view.dm-view-open { transform: translateX(0); }
  .dm-back-btn { display: flex !important; }
  body.dm-open #bottom-nav { display: none; }
  #bottom-nav { display: flex; flex-direction: column; }
  #toast-container { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); right: 12px; }
  .modal { width: 100%; max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin: 0; margin-top: auto; max-height: 92vh; }
  .modal-overlay { align-items: flex-end; }
  .modal { transform: translateY(100%); transition: transform 0.34s var(--ease-spring), opacity 0.22s; }
  .modal-overlay.open .modal { transform: translateY(0); }
}

@media (min-width: 769px) and (max-width: 1024px) {
  #sidebar { width: 64px; }
  .sidebar-link span, .sidebar-section-label,
  .sidebar-communities-header span, .sidebar-community-name,
  .sidebar-bottom .sidebar-link span { display: none; }
  .sidebar-link { justify-content: center; }
  .sidebar-link.active { border-left: none !important; }
  .sidebar-link .badge-count { display: none; }
}

/* ── Desktop helpers ─────────────────────────────────────────── */
.desktop-only { display: block; }
.topbar-mobile-sidebar-btn { display: none; }
#layout-blur-overlay {
  position: fixed; inset: 0;
  background: rgba(3,4,6,0.6);
  backdrop-filter: blur(4px);
  z-index: 290; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
#layout-blur-overlay.active { opacity: 1; pointer-events: auto; }

/* ── Engagement nudge ────────────────────────────────────────── */
.nudge-card {
  position: relative;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  margin-bottom: 20px; overflow: hidden;
  animation: nudgeIn 0.5s var(--ease-spring) forwards;
}
@keyframes nudgeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.nudge-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, #ff2d6e, #ff6b35);
}
.nudge-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--cyan-dim); border: 1px solid rgba(93,212,244,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; color: var(--cyan);
}
.nudge-body { flex: 1; min-width: 0; }
.nudge-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.nudge-text  { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 12px; }
.nudge-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nudge-btn-primary {
  padding: 8px 16px;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700;
  transition: var(--transition);
}
.nudge-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(93,212,244,0.3); }
.nudge-btn-ghost {
  padding: 8px 14px;
  color: var(--text-muted); border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  transition: color var(--transition);
}
.nudge-btn-ghost:hover { color: var(--text-secondary); }
.nudge-dismiss {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 12px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  transition: all 0.2s;
}
.nudge-dismiss:hover { color: var(--text-primary); background: var(--bg-float); }

/* ── Feedback / rating popups ────────────────────────────────── */
.exp-popup-overlay, .rate-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(16px);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeBackdrop 0.3s ease forwards;
}
@keyframes fadeBackdrop { from { opacity: 0; } to { opacity: 1; } }
.exp-popup, .rate-popup {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  width: 440px; max-width: 100%;
  padding: 40px 36px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(93,212,244,0.07);
  position: relative;
  animation: popIn 0.5s var(--ease-spring) forwards;
  overflow: hidden;
}
.rate-popup { width: 400px; text-align: center; }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.87) translateY(18px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.exp-popup::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(93,212,244,0.11) 0%, transparent 70%);
  pointer-events: none;
}
.exp-popup-wave { font-size: 44px; text-align: center; margin-bottom: 20px; display: block; animation: wavePop 0.8s ease 0.4s both; }
@keyframes wavePop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
.exp-popup-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 900; text-align: center;
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.exp-popup-sub { font-size: 14px; text-align: center; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.6; }
.exp-emoji-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.exp-emoji-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 12px; border-radius: var(--radius-md);
  border: 2px solid var(--border); background: var(--bg-elevated);
  transition: all 0.2s; cursor: pointer; min-width: 60px;
}
.exp-emoji-btn:hover { border-color: var(--border-mid); transform: translateY(-2px); }
.exp-emoji-btn.selected { border-color: var(--cyan); background: var(--cyan-dim); transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 20px rgba(93,212,244,0.2); }
.exp-emoji-btn span:first-child { font-size: 22px; }
.exp-emoji-btn span:last-child { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.exp-textarea {
  width: 100%; padding: 14px 16px;
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-family: var(--font-body); font-size: 14px; line-height: 1.6;
  resize: none; min-height: 80px; margin-bottom: 20px;
  transition: border-color 0.2s;
}
.exp-textarea:focus { outline: none; border-color: rgba(93,212,244,0.35); box-shadow: 0 0 0 3px rgba(93,212,244,0.08); }
.exp-submit-btn {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  color: var(--bg-void); border-radius: var(--radius-md);
  font-size: 15px; font-weight: 800; letter-spacing: 0.01em;
  transition: all 0.2s; margin-bottom: 10px;
}
.exp-submit-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(93,212,244,0.35); }
.exp-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.exp-skip-btn { width: 100%; padding: 10px; color: var(--text-muted); font-size: 13px; font-weight: 600; transition: color 0.2s; }
.exp-skip-btn:hover { color: var(--text-secondary); }
.exp-popup-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 13px; transition: all 0.2s;
}
.exp-popup-close:hover { color: var(--text-primary); background: var(--bg-float); }
.rate-stars { display: flex; justify-content: center; gap: 8px; margin: 20px 0; }
.rate-star { font-size: 32px; cursor: pointer; transition: all 0.15s; color: var(--border-mid); filter: grayscale(1); }
.rate-star.active { color: #fbbf24; filter: grayscale(0); transform: scale(1.15); }

/* ── Dev points badge ────────────────────────────────────────── */
.dev-points-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.06));
  border: 1px solid rgba(251,191,36,0.25);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #fbbf24;
}
.dev-points-badge i { font-size: 9px; }

/* ── First post nudge ────────────────────────────────────────── */
.first-post-banner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 48px 32px; background: var(--bg-surface);
  border: 1px dashed var(--border-mid); border-radius: var(--radius-lg);
  margin-bottom: 24px; gap: 16px; animation: nudgeIn 0.5s ease forwards;
}
.first-post-banner-icon {
  font-size: 40px; width: 80px; height: 80px; border-radius: 24px;
  background: var(--cyan-dim); border: 1px solid rgba(93,212,244,0.2);
  display: flex; align-items: center; justify-content: center; color: var(--cyan);
}
.first-post-banner h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.first-post-banner p  { font-size: 14px; color: var(--text-secondary); max-width: 360px; line-height: 1.65; }

/* ── Leaderboard ─────────────────────────────────────────────── */
.leaderboard-page-title {
  font-family: var(--font-display); font-size: 28px; font-weight: 900; letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ff2d6e, #ff6b35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.leaderboard-page-sub { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.leaderboard-page-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.leaderboard-page-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-surface); border: 1px solid var(--border);
  transition: all 0.2s; cursor: pointer;
}
.leaderboard-page-tab.active { color: var(--cyan); background: var(--cyan-dim); border-color: rgba(93,212,244,0.3); }
.leaderboard-page-tab i { font-size: 12px; }
.leaderboard-full-list { display: flex; flex-direction: column; gap: 8px; }
.leaderboard-full-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: all 0.2s; cursor: pointer;
}
.leaderboard-full-row:hover { border-color: rgba(93,212,244,0.2); transform: translateX(3px); }
.leaderboard-full-row.top-three { border-color: rgba(251,191,36,0.15); background: linear-gradient(135deg, var(--bg-surface), rgba(251,191,36,0.03)); }
.leaderboard-full-row.rank-pos-1 { border-color: rgba(251,191,36,0.3); background: linear-gradient(135deg, var(--bg-surface), rgba(251,191,36,0.06)); }
.leaderboard-rank-big { font-family: var(--font-mono); font-size: 20px; font-weight: 900; width: 36px; text-align: center; flex-shrink: 0; }
.leaderboard-full-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; font-family: var(--font-display); }
.leaderboard-full-info { flex: 1; min-width: 0; }
.leaderboard-full-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-full-handle { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.leaderboard-full-score { font-family: var(--font-mono); font-size: 14px; font-weight: 800; color: var(--cyan); text-align: right; }
.leaderboard-full-score-label { font-size: 10px; color: var(--text-muted); text-align: right; margin-top: 2px; font-weight: 500; }
.leaderboard-podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin-bottom: 28px; padding: 24px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.podium-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; max-width: 140px; }
.podium-slot.first { order: 2; }
.podium-slot.second { order: 1; }
.podium-slot.third { order: 3; }
.podium-avatar { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; font-family: var(--font-display); position: relative; }
.podium-slot.first .podium-avatar { width: 64px; height: 64px; font-size: 22px; box-shadow: 0 0 0 3px rgba(251,191,36,0.4), 0 8px 24px rgba(251,191,36,0.2); }
.podium-crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 16px; animation: crownBob 2s ease-in-out infinite; }
@keyframes crownBob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-3px); } }
.podium-name { font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.podium-score { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-align: center; }
.podium-bar { width: 100%; border-radius: 6px 6px 0 0; background: var(--bg-float); min-height: 20px; }
.podium-slot.first .podium-bar  { height: 60px; background: linear-gradient(to top, rgba(251,191,36,0.3), rgba(251,191,36,0.08)); }
.podium-slot.second .podium-bar { height: 40px; background: linear-gradient(to top, rgba(148,163,184,0.2), transparent); }
.podium-slot.third .podium-bar  { height: 26px; background: linear-gradient(to top, rgba(205,124,62,0.2), transparent); }

/* ── Accessibility ───────────────────────────────────────────── */
:root { --text-muted: #606880; }
.skip-link {
  position: fixed; top: -100%; left: 16px; z-index: 9999;
  padding: 10px 20px; background: var(--cyan); color: var(--bg-void);
  font-weight: 700; font-size: 14px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }
.view-tab:focus-visible, .bnav-btn:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: var(--radius-sm);
}
.auth-input:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

/* ── PTR indicator ───────────────────────────────────────────── */
.ptr-indicator {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  overflow: hidden; height: 0; opacity: 0;
  transition: height 0.15s, opacity 0.15s;
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
  background: var(--bg-base); border-bottom: 1px solid var(--border);
}
.ptr-icon { color: var(--cyan); font-size: 16px; transition: transform 0.2s; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Rightbar toggle ─────────────────────────────────────────── */
.topbar-rightbar-toggle {
  display: none; width: 36px; height: 36px; border-radius: var(--radius-md);
  align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 16px; transition: var(--transition);
}
.topbar-rightbar-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }
@media (max-width: 1024px) { .topbar-rightbar-toggle { display: flex !important; } }

/* ╔══════════════════════════════════════════════════════════════╗
   ║  LIGHT MODE — complete, systematic                          ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* Core palette override */
[data-theme="light"] {
  --bg-void:        #f1f3fa;
  --bg-base:        #f6f8fd;
  --bg-surface:     #ffffff;
  --bg-elevated:    #eef0f8;
  --bg-float:       #e5e8f2;
  --border:         rgba(0,0,0,0.08);
  --border-mid:     rgba(0,0,0,0.12);
  --border-active:  rgba(14,116,190,0.38);
  --border-soft:    rgba(0,0,0,0.07);

  --cyan:           #0e74be;
  --cyan-dim:       rgba(14,116,190,0.1);
  --cyan-glow:      rgba(14,116,190,0.18);
  --violet:         #ff6b35;
  --violet-dim:     rgba(255,107,53,0.1);
  --rose:           #e11d48;
  --emerald:        #059669;
  --amber:          #d97706;
  --sky:            #0284c7;
  --text-code:      #0e5a8a;

  --text-primary:   #0f1117;
  --text-secondary: #44506b;
  --text-muted:     #7283a0;

  color-scheme: light;

  --glass-bg:    rgba(246,248,253,0.9);
  --glass-border: rgba(0,0,0,0.08);
}

/* Body */
[data-theme="light"] body {
  background: var(--bg-void);
  color: var(--text-primary);
}

/* Topbar */
[data-theme="light"] #topbar {
  background: rgba(246,248,253,0.9) !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 4px 20px rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .topbar-search input {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .topbar-search input::placeholder { color: var(--text-muted); }
[data-theme="light"] .topbar-search input:focus {
  background: rgba(0,0,0,0.05) !important;
  border-color: rgba(14,116,190,0.4) !important;
  box-shadow: 0 0 0 3px rgba(255,45,110,0.1) !important;
}
[data-theme="light"] .topbar-logo {
  background: linear-gradient(90deg, #ff2d6e, #ff6b35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
[data-theme="light"] .topbar-action-btn { color: var(--text-secondary); }
[data-theme="light"] .topbar-action-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Sidebar */
[data-theme="light"] #sidebar {
  background: rgba(246,248,253,0.94) !important;
  border-right: 1px solid rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .sidebar-link { color: var(--text-secondary); }
[data-theme="light"] .sidebar-link:hover {
  background: rgba(0,0,0,0.04) !important;
  color: var(--text-primary);
}
[data-theme="light"] .sidebar-link.active {
  background: linear-gradient(135deg, rgba(14,116,190,0.1) 0%, rgba(124,58,237,0.05) 100%) !important;
  color: var(--cyan);
  border-left: 2px solid rgba(14,116,190,0.5) !important;
}
[data-theme="light"] .sidebar-link.active .icon,
[data-theme="light"] .sidebar-link.active i { color: var(--cyan) !important; }
[data-theme="light"] .sidebar-section-label { color: var(--text-muted); }
[data-theme="light"] .sidebar-divider { background: rgba(0,0,0,0.08); }
[data-theme="light"] .sidebar-community-name { color: var(--text-secondary); }

/* Right sidebar */
[data-theme="light"] #rightbar {
  background: rgba(246,248,253,0.94) !important;
  border-left: 1px solid rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .widget, [data-theme="light"] .rightbar-section {
  background: rgba(255,255,255,0.95) !important;
  border-color: rgba(0,0,0,0.09) !important;
}
[data-theme="light"] .widget-title, [data-theme="light"] .rightbar-title { color: var(--text-primary); }

/* Feed / posts */
[data-theme="light"] .post-card { border-bottom-color: rgba(0,0,0,0.08) !important; }
[data-theme="light"] .post-card:hover { background: rgba(0,0,0,0.02) !important; }
[data-theme="light"] .post-card::before {
  background: linear-gradient(to bottom, #ff2d6e, #ff6b35);
}
[data-theme="light"] .post-content { color: var(--text-primary); }
[data-theme="light"] .post-author { color: var(--text-primary); }
[data-theme="light"] .post-author-handle, [data-theme="light"] .post-time { color: var(--text-muted); }
[data-theme="light"] .post-action { color: var(--text-secondary); }
[data-theme="light"] .post-action:hover { background: rgba(0,0,0,0.05) !important; color: var(--text-primary); }

/* Code blocks */
[data-theme="light"] .post-code, [data-theme="light"] pre {
  background: rgba(14,116,190,0.04) !important;
  border-color: rgba(14,116,190,0.1) !important;
  color: #0e5a8a !important;
}
[data-theme="light"] .post-code-lang { color: var(--text-muted); }

/* Composer */
[data-theme="light"] .composer { border-bottom-color: rgba(0,0,0,0.08) !important; }
[data-theme="light"] .composer-inner {
  background: rgba(0,0,0,0.025) !important;
  border-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .composer-inner:focus-within {
  border-color: rgba(14,116,190,0.32) !important;
  box-shadow: 0 0 0 3px rgba(14,116,190,0.07) !important;
}
[data-theme="light"] .composer-textarea { color: var(--text-primary); }
[data-theme="light"] .composer-textarea::placeholder { color: var(--text-muted); }
[data-theme="light"] .composer-toolbar { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .composer-tool { color: var(--text-muted); }
[data-theme="light"] .composer-tool:hover { background: var(--bg-elevated); color: var(--cyan); }

/* View tabs */
[data-theme="light"] .view-tabs {
  background: var(--bg-void) !important;
  border-bottom-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .view-tab { color: var(--text-muted); }
[data-theme="light"] .view-tab:hover { color: var(--text-secondary); }
[data-theme="light"] .view-tab.active { color: var(--text-primary) !important; }
[data-theme="light"] .view-tab::after { background: var(--cyan); }

/* Modal */
[data-theme="light"] .modal {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.1) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15) !important;
}
[data-theme="light"] .modal-header {
  background: rgba(0,0,0,0.02) !important;
  border-bottom-color: rgba(0,0,0,0.09) !important;
}
[data-theme="light"] .modal-title { color: var(--text-primary); }
[data-theme="light"] .modal-close { color: var(--text-muted); }
[data-theme="light"] .modal-close:hover { color: var(--text-primary); }
[data-theme="light"] .modal-overlay {
  background: rgba(15,17,23,0.55) !important;
  backdrop-filter: blur(12px) !important;
}

/* Chat / DMs */
[data-theme="light"] .chat-input-wrap {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .chat-input { color: var(--text-primary); }
[data-theme="light"] .chat-input::placeholder { color: var(--text-muted); }
[data-theme="light"] .dm-other .msg-text { background: rgba(0,0,0,0.06); color: var(--text-primary); }
[data-theme="light"] .dm-messages { background: var(--bg-base); }

/* Auth */
[data-theme="light"] .auth-screen { background: var(--bg-void); }
[data-theme="light"] .auth-panel-left {
  background: linear-gradient(135deg, #fffbf0 0%, #f0f2ff 100%);
  border-right-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .auth-bg-grid {
  background-image:
    linear-gradient(rgba(255,45,110,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,45,110,0.06) 1px, transparent 1px);
}
[data-theme="light"] .auth-bg-orb { opacity: 0.15; }
[data-theme="light"] .auth-card {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(24px) saturate(1.6) !important;
  border-color: rgba(0,0,0,0.1) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.12) !important;
}
[data-theme="light"] .auth-tabs {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .auth-tab { color: var(--text-muted); }
[data-theme="light"] .auth-tab.active {
  background: rgba(255,255,255,0.9) !important;
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .auth-input {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.12) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .auth-input::placeholder { color: var(--text-muted); }
[data-theme="light"] .auth-input:focus {
  background: rgba(0,0,0,0.05) !important;
  border-color: rgba(180,120,0,0.42) !important;
  box-shadow: 0 0 0 3px rgba(255,45,110,0.1) !important;
}
[data-theme="light"] .auth-btn-github { background: #24292e !important; color: #fff !important; }
[data-theme="light"] .auth-btn-github:hover { background: #1a1e22 !important; }
[data-theme="light"] .auth-btn-google {
  background: rgba(0,0,0,0.03) !important;
  border-color: rgba(0,0,0,0.12) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .auth-btn-google:hover { background: rgba(0,0,0,0.06) !important; }
[data-theme="light"] .auth-toggle-pw { color: var(--text-muted); }
[data-theme="light"] .auth-toggle-pw:hover { color: var(--text-primary); }
[data-theme="light"] .auth-panel-name {
  background: linear-gradient(100deg, #ff2d6e, #ff6b35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
[data-theme="light"] .auth-panel-headline { color: var(--text-primary); }
[data-theme="light"] .auth-panel-desc { color: var(--text-secondary); }
[data-theme="light"] .auth-features li { color: var(--text-secondary); border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .auth-features li i { background: var(--bg-elevated); border-color: rgba(0,0,0,0.1); color: var(--cyan); }
[data-theme="light"] .auth-divider { color: var(--text-muted); }
[data-theme="light"] .auth-divider::before, [data-theme="light"] .auth-divider::after { background: rgba(0,0,0,0.1); }
[data-theme="light"] .auth-footer { color: var(--text-muted); }
[data-theme="light"] .auth-footer a { color: var(--cyan); }
[data-theme="light"] .auth-link-btn { color: var(--cyan); }

/* Bottom nav */
[data-theme="light"] #bottom-nav {
  background: rgba(246,248,253,0.95) !important;
  border-top-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.07) !important;
}
[data-theme="light"] .bnav-btn { color: var(--text-muted); }
[data-theme="light"] .bnav-btn.active { color: var(--cyan) !important; }

/* Toast */
[data-theme="light"] .toast {
  background: rgba(255,255,255,0.97) !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14) !important;
}
[data-theme="light"] .toast-icon { color: var(--cyan); }

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.14); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.22); }

/* Notifications */
[data-theme="light"] .notif-item:hover { background: rgba(0,0,0,0.025) !important; }
[data-theme="light"] .notif-item.unread::before { background: var(--cyan); }
[data-theme="light"] .notif-text { color: var(--text-secondary); }
[data-theme="light"] .notif-text strong { color: var(--text-primary); }
[data-theme="light"] .notif-preview { background: var(--bg-elevated); color: var(--text-muted); }

/* Settings */
[data-theme="light"] .settings-row { border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .settings-row:hover { background: rgba(0,0,0,0.03); }

/* Community / explore */
[data-theme="light"] .community-card { background: var(--bg-surface); border-color: rgba(0,0,0,0.09); }
[data-theme="light"] .community-card:hover { border-color: rgba(14,116,190,0.3); }
[data-theme="light"] .explore-cat { background: var(--bg-surface); border-color: rgba(0,0,0,0.1); color: var(--text-secondary); }
[data-theme="light"] .explore-cat:hover { border-color: var(--cyan); color: var(--cyan); }
[data-theme="light"] .explore-cat.active { background: var(--cyan-dim); border-color: rgba(14,116,190,0.3); color: var(--cyan); }
[data-theme="light"] .project-card { background: var(--bg-surface); border-color: rgba(0,0,0,0.09); }
[data-theme="light"] .channel-item:hover { background: var(--bg-elevated); }
[data-theme="light"] .channel-item.active { background: var(--bg-float); }

/* Trending / follow */
[data-theme="light"] .trending-tag { color: var(--cyan); }
[data-theme="light"] .trending-item { border-bottom-color: rgba(0,0,0,0.07); }
[data-theme="light"] .follow-suggestion-name { color: var(--text-primary); }
[data-theme="light"] .follow-suggestion-handle { color: var(--text-muted); }
[data-theme="light"] .follow-btn { border-color: rgba(14,116,190,0.3); color: var(--cyan); background: var(--cyan-dim); }
[data-theme="light"] .follow-btn:hover { background: var(--cyan); color: #fff; }

/* Sidebar drawer on mobile */
[data-theme="light"] #sidebar {
  background: rgba(246,248,253,0.98) !important;
}
[data-theme="light"] #rightbar {
  background: rgba(246,248,253,0.98) !important;
}
[data-theme="light"] #layout-blur-overlay { background: rgba(15,17,23,0.4); }

/* Leaderboard */
[data-theme="light"] .leaderboard-full-row { background: var(--bg-surface); border-color: rgba(0,0,0,0.09); }
[data-theme="light"] .leaderboard-full-row:hover { border-color: rgba(14,116,190,0.22); }
[data-theme="light"] .leaderboard-podium { background: var(--bg-surface); border-color: rgba(0,0,0,0.09); }
[data-theme="light"] .leaderboard-page-tab { background: var(--bg-surface); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .leaderboard-full-score { color: var(--cyan); }

/* Misc inline-style overrides via CSS variables (these propagate automatically) */
[data-theme="light"] .msg-text code { background: rgba(0,0,0,0.06); color: #0e5a8a; }

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   DEVIT IDENTITY LAYER — v2
   Sharp. Grounded. Developer-native.
══════════════════════════════════════════════════════════════ */

/* ── Brand mark: D> wordmark in sidebar / topbar ─────────────── */
.topbar-logo-mark::after { content: '>'; }
.topbar-logo-mark { font-family: var(--font-mono); letter-spacing: -1px; }

/* ── Topbar: thinner, more editorial ─────────────────────────── */
#topbar {
  background: rgba(10,10,11,0.96) !important;
  border-bottom: 1px solid rgba(255,45,110,0.12) !important;
}

/* ── Amber underline on active sidebar links ──────────────────── */
.sidebar-link.active {
  background: rgba(255,45,110,0.07) !important;
  border-left: 2px solid var(--cyan) !important;
  color: var(--cyan) !important;
}
.sidebar-link.active .icon { color: var(--cyan) !important; }

/* ── Post cards: cleaner boundary, left rule on hover ─────────── */
.post-card {
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.post-card:hover { background: rgba(255,45,110,0.02) !important; }
.post-card:hover::before { width: 2px !important; background: var(--cyan) !important; }

/* ── Post author: monospace handles ──────────────────────────── */
.post-author-handle { font-family: var(--font-mono); font-size: 12px !important; }
.post-time { font-family: var(--font-mono); font-size: 11px !important; }

/* ── Code blocks: amber syntax ───────────────────────────────── */
.post-code { border-color: rgba(255,45,110,0.1) !important; }
.post-code-lang { color: var(--cyan) !important; opacity: 0.7; }

/* ── Auth: panel headline uses display font at full weight ──────── */
.auth-panel-headline {
  font-size: clamp(28px,3vw,40px) !important;
  letter-spacing: -0.035em !important;
  line-height: 1.1 !important;
}
.auth-panel-name {
  font-size: 32px !important;
  letter-spacing: -0.04em !important;
}

/* ── Auth card: offset border glow on amber ──────────────────── */
.auth-card {
  border-left: 1px solid rgba(255,45,110,0.08) !important;
}
.auth-input:focus {
  border-color: rgba(255,45,110,0.5) !important;
  box-shadow: 0 0 0 3px rgba(255,45,110,0.08) !important;
}
.auth-btn-primary {
  background: var(--cyan) !important;
  color: #0a0a0b !important;
  background-image: none !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.03em !important;
}
.auth-btn-primary:hover {
  background: #ffc94a !important;
  box-shadow: 0 6px 24px rgba(255,45,110,0.3) !important;
}

/* ── Post btn: amber fill ────────────────────────────────────── */
.post-btn {
  background: var(--cyan) !important;
  color: #0a0a0b !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.02em !important;
}
.post-btn:hover { box-shadow: 0 4px 16px rgba(255,45,110,0.35) !important; }

/* ── Bottom nav: monospace labels, amber active ──────────────── */
.bnav-btn.active { color: var(--cyan) !important; }
.bnav-btn.active .bnav-label { color: var(--cyan) !important; }
#bottom-nav {
  border-top: 1px solid rgba(255,45,110,0.1) !important;
}

/* ── View tabs: sharp underline in amber ─────────────────────── */
.view-tab::after { background: var(--cyan) !important; }
.view-tab.active { color: var(--text-primary) !important; }

/* ── Feed composer: no rounded softness ─────────────────────── */
.composer-inner {
  border-radius: var(--radius-sm) !important;
}

/* ── Profile stats: monospace numbers ────────────────────────── */
.profile-stat-count { font-family: var(--font-mono) !important; }

/* ── Sidebar section label: monospace uppercase ─────────────── */
.sidebar-section-label {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  color: rgba(255,45,110,0.45) !important;
  text-transform: uppercase !important;
}

/* ── Presence bar: amber pulse ───────────────────────────────── */
.presence-bar.loading {
  background: linear-gradient(90deg, transparent, var(--cyan), transparent) !important;
}

/* ── Notifications badge: amber dot ─────────────────────────── */
.badge {
  background: var(--cyan) !important;
  box-shadow: 0 0 8px rgba(255,45,110,0.5) !important;
}

/* ── Auth features icon: amber ───────────────────────────────── */
.auth-features li i { color: var(--cyan) !important; }

/* ── Explore categories active: amber ───────────────────────── */
.explore-cat.active {
  background: rgba(255,45,110,0.08) !important;
  border-color: rgba(255,45,110,0.3) !important;
  color: var(--cyan) !important;
}

/* ── Post action hover: amber tint ──────────────────────────── */
.post-action:hover { color: var(--cyan) !important; }
.post-action.liked { color: var(--rose) !important; }

/* ── Search input focus border ───────────────────────────────── */
.topbar-search input:focus {
  border-color: rgba(255,45,110,0.4) !important;
  box-shadow: 0 0 0 3px rgba(255,45,110,0.06) !important;
}

/* ── Modal header: amber title ───────────────────────────────── */
.modal-title { font-family: var(--font-mono) !important; letter-spacing: -0.01em; }

/* ── Rightbar widget headers ─────────────────────────────────── */
.rightbar-section-title {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  color: rgba(255,45,110,0.5) !important;
  text-transform: uppercase !important;
}

/* ── Toast: amber accent border ─────────────────────────────── */
.toast {
  border-left: 3px solid var(--cyan) !important;
}
.toast-icon { color: var(--cyan) !important; }

/* ── Auth magic btn: blue tint instead of violet ────────────── */
.auth-btn-magic {
  background: rgba(255,107,53,0.08) !important;
  color: var(--violet) !important;
  border-color: rgba(255,107,53,0.22) !important;
}

/* ── Follow/connect btn: amber outline ───────────────────────── */
.follow-btn {
  border-color: rgba(255,45,110,0.3) !important;
  color: var(--cyan) !important;
  background: rgba(255,45,110,0.05) !important;
}
.follow-btn:hover {
  background: var(--cyan) !important;
  color: #0a0a0b !important;
  border-color: var(--cyan) !important;
}

/* ── Profile action btn primary: amber ───────────────────────── */
.profile-action-btn.primary {
  background: var(--cyan) !important;
  color: #0a0a0b !important;
}

/* ── Link accent: amber ──────────────────────────────────────── */
.auth-footer a, .auth-link-btn { color: var(--cyan) !important; }

/* ── Story ring: amber gradient ──────────────────────────────── */
.story-ring {
  background: linear-gradient(135deg, #ff2d6e, #ff6b35) !important;
}

/* ── Hashtag/mention colors ──────────────────────────────────── */
.post-content .hashtag { color: var(--violet) !important; }
.post-content .mention { color: var(--cyan) !important; }

/* ── Profile cover: amber glow ───────────────────────────────── */
.profile-cover-art {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255,45,110,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(255,107,53,0.1) 0%, transparent 60%) !important;
}

/* ── Devit-specific utility: mono code inline ────────────────── */
code, .post-code, pre { font-family: var(--font-mono) !important; }

/* ── Light theme accent corrections ──────────────────────────── */
[data-theme="light"] .sidebar-link.active {
  background: rgba(255,45,110,0.07) !important;
  border-left-color: rgba(255,45,110,0.7) !important;
  color: var(--cyan) !important;
}
[data-theme="light"] .bnav-btn.active { color: var(--cyan) !important; }
[data-theme="light"] .view-tab::after { background: var(--cyan) !important; }
[data-theme="light"] .auth-btn-primary {
  background: var(--cyan) !important;
  color: #fff !important;
}
[data-theme="light"] .post-btn { background: var(--cyan) !important; color: #fff !important; }


/* ── Mobile auth card: force dark background ──────────────── */
@media (max-width: 860px) {
  /* CRITICAL: never force display — JS sets display:none on sign-in */
  #auth-screen {
    background: var(--bg-void) !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #auth-screen:not([style*="display: none"]):not([style*="display:none"]) {
    display: flex !important;
  }
  .auth-card {
    background: var(--bg-base) !important;
    border: 1px solid var(--border-mid) !important;
    border-radius: var(--radius-xl) !important;
    min-height: unset !important;
    width: 100% !important;
    max-width: 420px !important;
  }
  .auth-bg-orb { display: none; }
}

/* ── Bulletproof nav click fix ───────────────────────────────── */
#bottom-nav,
#bottom-nav-inner,
.bnav-btn,
.bnav-post-icon {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* ══════════════════════════════════════════════════════════════
   SETTINGS & EDIT PROFILE — full page layout
   ══════════════════════════════════════════════════════════════ */

.settings-shell {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  width: 100%;
  box-sizing: border-box;
}

.settings-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.settings-card-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.settings-row-value {
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0 4px;
}

/* ── AI Summary ──────────────────────────────────────────────── */
.ai-summary-wrap {
  margin: 6px 0 2px;
}
.ai-summary-btn {
  background: linear-gradient(135deg, rgba(99,217,255,0.12), rgba(167,139,250,0.12));
  border: 1px solid rgba(99,217,255,0.25);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: 0.15s;
  font-family: var(--font-body);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ai-summary-btn:hover { background: rgba(99,217,255,0.2); }
.ai-summary-btn:active { transform: scale(0.97); }
.ai-summary-btn:disabled { opacity: 0.6; cursor: default; }
.ai-summary-result {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

/* ── Comment vote buttons ────────────────────────────────────── */
.cmt-vote-btn {
  transition: color 0.15s, transform 0.1s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cmt-vote-btn:hover { transform: scale(1.2); }
.cmt-vote-btn:active { transform: scale(0.9); }

/* ── Mobile: settings & edit profile ────────────────────────── */
@media (max-width: 640px) {
  .settings-shell {
    padding: 16px 12px 80px; /* extra bottom for bottom nav */
  }

  .settings-title {
    font-size: 18px;
  }

  .settings-card {
    border-radius: var(--radius-md);
  }

  .settings-row {
    padding: 14px 14px;
    font-size: 13px;
    /* Larger tap targets on mobile */
    min-height: 48px;
  }

  .settings-row-value {
    font-size: 12px;
    max-width: 45%;
  }

  /* Edit profile back button easier to tap */
  #ep-back-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* AI summary full width on mobile */
  .ai-summary-btn {
    width: 100%;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
  }

  .ai-summary-result {
    font-size: 13px;
    padding: 10px;
  }

  /* Comment thread: more padding for touch */
  #comment-list > div {
    padding: 12px 14px !important;
  }

  .cmt-vote-btn {
    min-width: 36px;
    min-height: 36px;
    font-size: 14px !important;
  }

  /* Edit profile avatar section stacks better */
  .edit-avatar-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .edit-avatar-preview {
    width: 72px !important;
    height: 72px !important;
  }
}

/* ── Tablet: settings & edit profile ────────────────────────── */
@media (min-width: 641px) and (max-width: 1024px) {
  .settings-shell {
    padding: 24px 20px 40px;
    max-width: 540px;
  }
}


/* ══════════════════════════════════════════════════════════════
   SECTION 3.1 — GITHUB DEEP INTEGRATION
   Live Repo Cards · Code Sandbox · Auto Ship Posts · GH Identity
   ══════════════════════════════════════════════════════════════ */

/* ── Live Repo Card (post embed) ───────────────────────────────── */
.live-repo-card {
  margin: 10px 0 4px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: default;
}
.live-repo-card:hover {
  border-color: rgba(255, 45, 110, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.live-repo-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border);
}
.live-repo-card-icon {
  width: 32px; height: 32px;
  background: #24292e;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.live-repo-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.live-repo-card-name a {
  color: inherit;
  text-decoration: none;
}
.live-repo-card-name a:hover { color: var(--cyan); text-decoration: underline; }
.live-repo-card-desc {
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.live-repo-card-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px 12px;
  flex-wrap: wrap;
}
.live-repo-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.live-repo-stat i { font-size: 10px; }
.live-repo-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.live-repo-issues-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 107, 53, 0.1);
  color: var(--violet);
  border: 1px solid rgba(255, 107, 53, 0.2);
}
.live-repo-commit-tag {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 5px;
}
.live-repo-loading {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Loading pulse for live repo cards */
@keyframes liveRepoPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.live-repo-card.loading .live-repo-card-name,
.live-repo-card.loading .live-repo-card-desc {
  animation: liveRepoPulse 1.4s ease-in-out infinite;
}

/* ── Code Sandbox Embed in posts ───────────────────────────────── */
.sandbox-embed-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 10px 14px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  font-size: 12px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
}
.sandbox-embed-chip:hover {
  border-color: var(--cyan);
  background: rgba(255, 45, 110, 0.05);
}
.sandbox-embed-chip-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #1c1c1e, #2a2a30);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-mid);
}
.sandbox-embed-chip-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-weight: 500;
}
.sandbox-embed-chip-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(52, 211, 153, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.2);
  font-weight: 600;
  flex-shrink: 0;
}

/* Sandbox toolbar button in composer */
.composer-sandbox-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: all var(--transition);
  font-family: var(--font-body);
}
.composer-sandbox-btn:hover {
  color: var(--emerald);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.06);
}

/* ── Auto Ship Post badge ──────────────────────────────────────── */
.ship-post-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(255, 45, 110, 0.12), rgba(167, 139, 250, 0.12));
  border: 1px solid rgba(255, 45, 110, 0.25);
  color: var(--cyan);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.ship-post-badge i { font-size: 9px; }

/* Release chip on post cards */
.gh-release-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 10px 14px;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-md);
  background: rgba(52, 211, 153, 0.04);
  font-size: 12px;
  transition: border-color var(--transition);
}
.gh-release-chip:hover { border-color: rgba(52, 211, 153, 0.4); }
.gh-release-chip-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(52, 211, 153, 0.1);
  border-radius: 5px;
  padding: 2px 7px;
}
.gh-release-chip-name {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gh-release-chip-link {
  font-size: 11px;
  color: var(--cyan);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.gh-release-chip-link:hover { text-decoration: underline; }

/* ── GitHub Webhook setup UI ──────────────────────────────────── */
.webhook-step {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.webhook-step:last-child { border-bottom: none; }
.webhook-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-float);
  border: 1px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
}
.webhook-step-body { flex: 1; min-width: 0; }
.webhook-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.webhook-step-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.webhook-url-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
}
.webhook-url-copy code {
  flex: 1;
  font-size: 11px;
  color: var(--text-code);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.webhook-copy-btn {
  font-size: 11px;
  color: var(--cyan);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.webhook-copy-btn:hover { opacity: 0.75; }
.webhook-events-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.webhook-event-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--emerald);
  font-family: var(--font-mono);
}

/* ── GitHub Profile enrichment widget ──────────────────────────── */
.gh-identity-widget {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
}
.gh-identity-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.gh-identity-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.gh-activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.gh-activity-row:last-child { border-bottom: none; }
.gh-activity-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--bg-float);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.gh-activity-label {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gh-activity-value {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* ── Rightbar "Ship It" widget ─────────────────────────────────── */
.rightbar-ship-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 14px;
}
.rightbar-ship-widget-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.rightbar-ship-widget-body {
  padding: 12px 14px;
}
.ship-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s;
}
.ship-action-row:last-child { border-bottom: none; }
.ship-action-row:hover { opacity: 0.75; }
.ship-action-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.ship-action-text { flex: 1; min-width: 0; }
.ship-action-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.ship-action-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Light theme adjustments */
[data-theme="light"] .live-repo-card {
  background: #f8f8f8;
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .live-repo-card-footer {
  background: #f0f0f0;
  border-top-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .sandbox-embed-chip {
  background: #f5f5f5;
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .sandbox-embed-chip:hover {
  background: rgba(255,45,110,0.04);
}
[data-theme="light"] .webhook-url-copy {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .gh-identity-widget {
  background: #f8f8f8;
  border-color: rgba(0,0,0,0.1);
}

  background: #fff;
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .settings-card-header {
  border-bottom-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .ai-summary-result {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

/* ── Hashtag Autocomplete Dropdown ──────────────────────────── */
#composer-tag-dropdown {
  animation: tagDropIn 0.15s var(--spring) forwards;
}
@keyframes tagDropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tag-sugg-item {
  border-bottom: 1px solid var(--border);
}
.tag-sugg-item:last-child { border-bottom: none; }
.tag-sugg-item.active,
.tag-sugg-item:hover {
  background: rgba(255,45,110,0.08) !important;
}

/* Section strip below composer textarea */
#composer-tag-strip {
  padding: 6px 0 2px;
  flex-wrap: wrap;
  gap: 5px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Developer Stacks ──────────────────────────────────────── */
.tech-stack {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 12px;
}
.tech-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; background: var(--bg-float);
  border: 1px solid var(--border-mid); color: var(--text-secondary);
  font-family: var(--font-mono);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform 0.15s;
}
.tech-badge:hover {
  background: rgba(255,45,110,0.10);
  border-color: rgba(255,45,110,0.35);
  color: var(--cyan);
  transform: translateY(-1px);
}
.tech-badge i { font-size: 9px; color: var(--cyan); }

/* Stack section label in profile */
.profile-stack-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-top: 14px; margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.profile-stack-label i { color: var(--cyan); }

/* ── Project Badges & Milestones ────────────────────────────── */
.profile-badges {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: 12px;
}
.profile-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  border: 1px solid var(--border-mid);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  position: relative;
  transition: transform 0.2s var(--spring), box-shadow 0.2s;
  cursor: default;
}
.profile-badge:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

/* Badge tiers by color */
.profile-badge.badge-gold {
  background: rgba(251,191,36,0.10);
  border-color: rgba(251,191,36,0.30);
  color: #fbbf24;
}
.profile-badge.badge-cyan {
  background: rgba(255,45,110,0.10);
  border-color: rgba(255,45,110,0.30);
  color: var(--cyan);
}
.profile-badge.badge-violet {
  background: rgba(255,107,53,0.10);
  border-color: rgba(255,107,53,0.30);
  color: var(--violet);
}
.profile-badge.badge-emerald {
  background: rgba(62,207,142,0.10);
  border-color: rgba(62,207,142,0.30);
  color: var(--emerald);
}
.profile-badge .badge-icon { font-size: 13px; }

/* Badge section label */
.profile-badges-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-top: 14px; margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.profile-badges-label i { color: #fbbf24; }

/* Badge tooltip */
.profile-badge[title] { cursor: help; }

/* ── Topic Tags / Channels ──────────────────────────────────── */
/* Hashtag in post content — now clickable */
.post-content .hashtag {
  color: var(--violet);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition), text-decoration var(--transition);
  border-radius: 3px;
  padding: 0 1px;
}
.post-content .hashtag:hover { color: var(--cyan); text-decoration: underline; }

/* Tag feed view header */
.tag-feed-header {
  padding: 20px 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.tag-feed-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 900; letter-spacing: -0.02em;
  color: var(--cyan);
  margin-bottom: 4px;
}
.tag-feed-meta {
  font-size: 12px; color: var(--text-muted);
  padding-bottom: 14px;
}

/* Tag chip in composer */
.composer-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 6px 0 2px;
}
.composer-tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  background: rgba(255,107,53,0.10);
  border: 1px solid rgba(255,107,53,0.25);
  color: var(--violet);
  font-family: var(--font-mono);
  cursor: pointer;
  transition: background var(--transition), transform 0.15s;
}
.composer-tag-chip:hover { background: rgba(255,107,53,0.18); transform: scale(1.03); }
.composer-tag-chip .remove-tag { color: var(--text-muted); font-size: 10px; margin-left: 2px; }

/* Trending tags — enhanced */
.trending-item {
  cursor: pointer;
}
.trending-tag-row {
  display: flex; align-items: center; justify-content: space-between;
}
.trending-tag-name {
  font-size: 13px; font-weight: 700; color: var(--cyan);
}
.trending-tag-count {
  font-size: 11px; color: var(--text-muted);
}
.trending-tag-bar {
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  margin-top: 4px;
  transition: width 0.4s var(--spring);
}

/* Tag browse chips in rightbar */
.tag-chips-wrap {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 14px;
}
.tag-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; font-family: var(--font-mono);
  background: var(--bg-float); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition);
}
.tag-chip:hover {
  background: rgba(255,107,53,0.10);
  border-color: rgba(255,107,53,0.3);
  color: var(--violet);
  transform: translateY(-1px);
}

/* Milestone toast */
.milestone-toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(255,45,110,0.08));
  border: 1px solid rgba(251,191,36,0.25);
  font-size: 13px; font-weight: 600;
  animation: slideInRight 0.4s var(--spring) forwards;
}

/* Light theme overrides */
[data-theme="light"] .tech-badge {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
  color: #444;
}
[data-theme="light"] .tech-badge:hover {
  background: rgba(255,45,110,0.07);
  color: var(--cyan);
}
[data-theme="light"] .profile-badge {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
  color: #555;
}
[data-theme="light"] .tag-chip {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
  color: #555;
}

/* ════════════════════════════════════════════════════════════════
   PATCH: Search bar dropdown + Light mode fix + Follow btn perf
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Topbar Search — inline dropdown results ─────────────── */
.topbar-search { position: relative; }

#topbar-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: max(100%, 340px);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.25);
  overflow: hidden;
  z-index: 500;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s var(--ease-expo), transform 0.16s var(--ease-expo);
}
#topbar-search-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Section header inside dropdown */
.tsearch-section-label {
  padding: 10px 14px 5px;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Individual result row */
.tsearch-result {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer;
  transition: background 0.12s;
}
.tsearch-result:hover { background: rgba(255,255,255,0.04); }
.tsearch-result:active { background: rgba(255,255,255,0.07); }
.tsearch-result-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #ff2d6e, #ff6b35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #0a0a0b;
  overflow: hidden;
}
.tsearch-result-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tsearch-result-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg-float); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-secondary);
}
.tsearch-result-text { flex: 1; min-width: 0; }
.tsearch-result-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tsearch-result-sub {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.tsearch-result-kbd {
  font-size: 10px; font-family: var(--font-mono);
  color: var(--text-muted); background: var(--bg-float);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 6px; flex-shrink: 0;
}

/* Divider between sections */
.tsearch-divider {
  height: 1px; background: var(--border); margin: 4px 0;
}

/* Empty / loading state */
.tsearch-empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 13px; color: var(--text-muted);
}
.tsearch-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 14px;
  font-size: 13px; color: var(--text-muted);
}
.tsearch-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--cyan);
  animation: spin 0.7s linear infinite;
}

/* Footer "see all results" row */
.tsearch-footer {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--cyan);
  cursor: pointer;
  transition: background 0.12s;
  gap: 6px;
}
.tsearch-footer:hover { background: var(--cyan-dim); }

/* Light mode — dropdown */
[data-theme="light"] #topbar-search-dropdown {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 12px 36px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.08);
}
[data-theme="light"] .tsearch-result:hover { background: rgba(0,0,0,0.03); }
[data-theme="light"] .tsearch-result:active { background: rgba(0,0,0,0.06); }
[data-theme="light"] .tsearch-result-icon { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .tsearch-result-kbd { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .tsearch-footer { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .tsearch-footer:hover { background: var(--cyan-dim); }
[data-theme="light"] .tsearch-divider { background: rgba(0,0,0,0.07); }


/* ── Stack Filter Bar ──────────────────────────────────────── */
.stack-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.stack-filter-bar::-webkit-scrollbar { display: none; }
.stack-filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.stack-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.stack-chip {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all 0.15s ease;
  cursor: pointer;
}
.stack-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-mid);
}
.stack-chip.active {
  color: var(--cyan);
  background: var(--cyan-dim);
  border-color: var(--border-active);
}

/* ── Dev Activity Feed ──────────────────────────────────────── */
.dev-activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.dev-activity-item:hover { background: var(--bg-elevated); }
.dev-activity-avatar { flex-shrink: 0; }
.dev-activity-body { flex: 1; min-width: 0; }
.dev-activity-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.dev-activity-icon { font-size: 13px; flex-shrink: 0; }
.dev-activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Enhanced Poll Styles ───────────────────────────────────── */
.poll-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.poll-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--cyan-dim);
  border: 1px solid rgba(255,45,110,0.2);
  border-radius: 6px;
  padding: 2px 8px;
}
.poll-tap-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
.poll-vote-cta {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.poll-option:not(.voted):hover .poll-vote-cta {
  background: var(--cyan);
  color: #fff;
}
.poll-container {
  background: linear-gradient(135deg, rgba(255,45,110,0.04), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,45,110,0.15);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 12px;
}


/* In light mode, --cyan is already blue (#0e74be).
   The issue is hardcoded #ff2d6e / rgba(255,45,110,...) values
   scattered through non-variable light-mode rules. Fix them. */

/* Topbar logo — keep red gradient brand mark */
[data-theme="light"] .topbar-logo {
  background: linear-gradient(90deg, #ff2d6e, #ff6b35) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
/* Topbar logo mark chip — keep red */
[data-theme="light"] .topbar-logo-mark {
  background: #ff2d6e !important;
  color: #fff !important;
}

/* Search focus ring — blue, not red */
[data-theme="light"] .topbar-search input:focus {
  border-color: rgba(14,116,190,0.45) !important;
  box-shadow: 0 0 0 3px rgba(14,116,190,0.1) !important;
}

/* Auth input focus — blue */
[data-theme="light"] .auth-input:focus {
  border-color: rgba(14,116,190,0.45) !important;
  box-shadow: 0 0 0 3px rgba(14,116,190,0.1) !important;
}

/* Auth primary button — keep red brand gradient */
[data-theme="light"] .auth-btn-primary {
  background: linear-gradient(130deg, #ff2d6e, #ff6b35) !important;
  color: #fff !important;
}

/* Active sidebar link — blue */
[data-theme="light"] .sidebar-link.active {
  background: linear-gradient(135deg, rgba(14,116,190,0.1), rgba(14,116,190,0.05)) !important;
  color: #0e74be !important;
  border-left: 2px solid rgba(14,116,190,0.55) !important;
}
[data-theme="light"] .sidebar-link.active .icon,
[data-theme="light"] .sidebar-link.active i { color: #0e74be !important; }

/* View tab active underline — blue */
[data-theme="light"] .view-tab::after { background: #0e74be !important; }
[data-theme="light"] .view-tab.active { color: #0e74be !important; }

/* Composer focus ring — blue */
[data-theme="light"] .composer-inner:focus-within {
  border-color: rgba(14,116,190,0.35) !important;
  box-shadow: 0 0 0 3px rgba(14,116,190,0.08) !important;
}

/* Post card left hover bar — blue in light mode */
[data-theme="light"] .post-card:hover::before {
  background: linear-gradient(to bottom, #0e74be, #0284c7) !important;
}
[data-theme="light"] .post-card::before {
  background: linear-gradient(to bottom, #0e74be, #0284c7) !important;
}

/* Follow suggestion follow button — blue */
[data-theme="light"] .follow-btn {
  border-color: rgba(14,116,190,0.35) !important;
  color: #0e74be !important;
  background: rgba(14,116,190,0.07) !important;
}
[data-theme="light"] .follow-btn:hover {
  background: #0e74be !important;
  color: #fff !important;
  border-color: #0e74be !important;
}

/* Tag-related — accent stays blue */
[data-theme="light"] .trending-tag-name,
[data-theme="light"] .trending-tag { color: #0e74be !important; }
[data-theme="light"] .trending-tag-bar {
  background: linear-gradient(90deg, #0e74be, #0284c7) !important;
}
[data-theme="light"] .tag-feed-title { color: #0e74be !important; }
[data-theme="light"] .post-content .mention { color: #0e74be !important; }

/* Hashtag in posts — keep violet (orange) not red */
[data-theme="light"] .post-content .hashtag { color: #c2410c !important; }

/* PTR indicator spinner — blue */
[data-theme="light"] .ptr-icon { color: #0e74be !important; }

/* Leaderboard scores — blue */
[data-theme="light"] .leaderboard-full-score { color: #0e74be !important; }

/* Notif unread dot — blue */
[data-theme="light"] .notif-item.unread::before { background: #0e74be !important; }

/* Toast icon — blue */
[data-theme="light"] .toast-icon { color: #0e74be !important; }

/* Skip link bg — blue in light mode */
[data-theme="light"] .skip-link { background: #0e74be !important; }

/* Community/explore hover border — blue */
[data-theme="light"] .explore-cat:hover { border-color: #0e74be !important; color: #0e74be !important; }
[data-theme="light"] .explore-cat.active { background: rgba(14,116,190,0.08) !important; color: #0e74be !important; }

/* Bottom nav active — blue */
[data-theme="light"] .bnav-btn.active { color: #0e74be !important; }

/* Auth features icon — blue */
[data-theme="light"] .auth-features li i { color: #0e74be !important; }
[data-theme="light"] .auth-link-btn,
[data-theme="light"] .auth-footer a { color: #0e74be !important; }

/* Tech badges hover — blue tint */
[data-theme="light"] .tech-badge:hover {
  background: rgba(14,116,190,0.08) !important;
  color: #0e74be !important;
  border-color: rgba(14,116,190,0.3) !important;
}

/* Tag chip hover — blue */
[data-theme="light"] .tag-chip:hover {
  background: rgba(14,116,190,0.07) !important;
  border-color: rgba(14,116,190,0.28) !important;
  color: #0e74be !important;
}

/* Composer tool hover — blue */
[data-theme="light"] .composer-tool:hover { color: #0e74be !important; }

/* Widget / rightbar section — light background for light mode */
[data-theme="light"] .widget,
[data-theme="light"] .rightbar-section {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.09) !important;
}

/* Presence bar stays red (brand) in both modes */


/* ── 3. Follow / join buttons — GPU-composited, no jank ─────── */

/* Single source of truth: compositing hint + minimal transitions */
.follow-btn,
.join-btn {
  /* GPU layer hint — prevents repaint on transform/opacity changes */
  will-change: transform;
  /* Only composite-friendly properties */
  transition:
    background 0.15s var(--ease-expo),
    color 0.15s var(--ease-expo),
    border-color 0.15s var(--ease-expo),
    transform 0.18s var(--ease-spring),
    box-shadow 0.15s var(--ease-expo) !important;
  /* Prevent layout shifts during animation */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.follow-btn:hover,
.join-btn:hover {
  transform: translateY(-1px) translateZ(0) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
}

.follow-btn:active,
.join-btn:active {
  transform: scale(0.95) translateZ(0) !important;
  transition-duration: 0.08s !important;
}

/* Post actions — same GPU treatment for like/repost/etc */
.post-action {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition:
    background 0.12s var(--ease-expo),
    color 0.12s var(--ease-expo),
    transform 0.15s var(--ease-spring) !important;
}
.post-action:hover {
  transform: scale(1.08) translateZ(0) !important;
}
.post-action:active {
  transform: scale(0.92) translateZ(0) !important;
  transition-duration: 0.06s !important;
}

