/* ============================================================
   NEXUS — Global Styles  v2
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,400&display=swap');

/* ── Light mode ── */
:root {
  --topbar-bg: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  /* Accent strip for cards */
  --card-accent: linear-gradient(90deg, #6366F1, #8B5CF6);
  --topbar-text: #ffffff;
  --topbar-text-dim: rgba(255,255,255,0.72);
  --topbar-hover: rgba(255,255,255,0.14);
  --topbar-active: rgba(255,255,255,0.22);
  /* Brand */
  --indigo-50:   #EEF2FF;
  --indigo-100:  #E0E7FF;
  --indigo-200:  #C7D2FE;
  --indigo-400:  #818CF8;
  --indigo-500:  #6366F1;
  --indigo-600:  #4F46E5;
  --indigo-700:  #4338CA;
  --indigo-800:  #3730A3;
  --indigo-900:  #1E1B4B;

  --violet-400:  #A78BFA;
  --violet-500:  #8B5CF6;
  --violet-600:  #7C3AED;

  /* Legacy aliases (backward compat) */
  --purple-50:   var(--indigo-50);
  --purple-100:  var(--indigo-200);
  --purple-200:  var(--indigo-200);
  --purple-400:  var(--indigo-400);
  --purple-600:  var(--indigo-500);
  --purple-700:  var(--indigo-600);
  --purple-800:  var(--indigo-700);
  --purple-900:  var(--indigo-900);

  /* Semantic */
  --rose-400:    #FB7185;
  --rose-500:    #F43F5E;
  --rose-600:    #E11D48;
  --teal-400:    #2DD4BF;
  --teal-500:    #14B8A6;
  --teal-600:    #0D9488;
  --amber-400:   #FBBF24;

  /* Legacy */
  --coral-50:    #FFF1F2;
  --coral-400:   #F43F5E;
  --coral-600:   #E11D48;
  --pink-400:    #FB7185;
  --teal-50:     #CCFBF1;

  /* Neutrals */
  --gray-50:     #F8F9FF;
  --gray-100:    #F1F2FE;
  --gray-200:    #E2E4F0;
  --gray-300:    #C9CBDE;
  --gray-400:    #9498B8;
  --gray-500:    #717598;
  --gray-600:    #575A7B;
  --gray-700:    #3D3F5C;
  --gray-900:    #0F0F23;

  /* Surfaces */
  --bg:           #E8EAF8;
  --surface:      #FFFFFF;
  --surface-2:    #F4F5FF;
  --border:       rgba(99,102,241,0.16);
  --border-md:    rgba(99,102,241,0.28);

  /* Text */
  --text-primary:   #0F0F23;
  --text-secondary: #575A7B;
  --text-muted:     #9498B8;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --gradient-surface: linear-gradient(180deg, #FFFFFF 0%, #F8F9FF 100%);

  /* Radius */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(79,70,229,0.06);
  --shadow-sm:  0 2px 8px rgba(79,70,229,0.1), 0 0 0 1px rgba(99,102,241,0.08);
  --shadow-md:  0 4px 20px rgba(79,70,229,0.14), 0 0 0 1px rgba(99,102,241,0.08);
  --shadow-lg:  0 12px 48px rgba(79,70,229,0.18), 0 0 0 1px rgba(99,102,241,0.08);
  --shadow-colored: 0 8px 28px rgba(99,102,241,0.38);

  /* Motion */
  --transition: 0.16s ease;
  --transition-slow: 0.28s ease;

  /* Typography */
  --font-sans:    'Inter', sans-serif;
  --font-display: 'Fraunces', serif;

  /* Layout */
  --topbar-h:    60px;
  --bottomnav-h: 0px;
  --sidebar-w:   244px;
}

/* ── Dark mode ── */
[data-theme="dark"] {
  --topbar-bg: linear-gradient(135deg, #3730A3 0%, #5B21B6 100%);
  --topbar-text: #ffffff;
  --topbar-text-dim: rgba(255,255,255,0.65);
  --topbar-hover: rgba(255,255,255,0.12);
  --topbar-active: rgba(255,255,255,0.2);

  --bg:           #08080F;
  --surface:      #0F0F1C;
  --surface-2:    #17172A;
  --border:       rgba(129,140,248,0.1);
  --border-md:    rgba(129,140,248,0.18);

  --text-primary:   #F0EFFF;
  --text-secondary: #A0A0C0;
  --text-muted:     #6B6B8A;

  --gray-50:     #13131F;
  --gray-100:    #1A1A2E;
  --gray-200:    #252540;
  --gray-300:    #35356A;
  --gray-400:    #6B6B8A;
  --gray-500:    #8A8AAA;
  --gray-600:    #A0A0C0;
  --gray-900:    #F0EFFF;

  --indigo-50:   rgba(99,102,241,0.12);
  --purple-50:   rgba(99,102,241,0.12);

  --shadow-xs:   0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.35), 0 0 0 1px rgba(129,140,248,0.08);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(129,140,248,0.08);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(129,140,248,0.08);
  --shadow-colored: 0 8px 32px rgba(99,102,241,0.35);

  --gradient-surface: linear-gradient(180deg, #0F0F1C 0%, #13131F 100%);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-slow), color var(--transition-slow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-sans); }
input, textarea, select { font-family: var(--font-sans); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* Selection */
::selection { background: rgba(99,102,241,0.18); color: var(--indigo-700); }
[data-theme="dark"] ::selection { background: rgba(129,140,248,0.25); color: #C7D2FE; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

/* ══════════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: none;
  box-shadow: 0 2px 16px rgba(79,70,229,0.32);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: .875rem;
  z-index: 100;
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  -webkit-text-fill-color: #fff;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  padding: 8px 4px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.topbar-search {
  flex: 1;
  max-width: 340px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  height: 38px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  padding: 0 1.1rem 0 2.6rem;
  font-size: 13.5px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.topbar-search input::placeholder { color: rgba(255,255,255,0.6); }

.topbar-search input:focus {
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.22);
}

.topbar-search i {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  pointer-events: none;
}

.topbar-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

.topbar-nav-btn {
  width: 40px; height: 40px;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  color: var(--topbar-text-dim);
  font-size: 21px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
  position: relative;
  flex-shrink: 0;
}

.topbar-nav-btn:hover {
  background: var(--topbar-hover);
  color: var(--topbar-text);
}
.topbar-nav-btn.active {
  color: var(--topbar-text);
  background: var(--topbar-active);
}

/* Back button always visible regardless of topbar-nav visibility */
.topbar-back-btn {
  flex-shrink: 0;
  color: rgba(255,255,255,0.85) !important;
}
.topbar-back-btn:hover {
  background: var(--topbar-hover) !important;
  color: #fff !important;
}

.notif-badge {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: var(--rose-400);
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: 0 0 0 2px rgba(251,113,133,0.4);
}

/* ══════════════════════════════════════════════
   AVATAR
══════════════════════════════════════════════ */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-28 { width: 28px; height: 28px; font-size: 10px; }
.avatar-32 { width: 32px; height: 32px; font-size: 11px; }
.avatar-36 { width: 36px; height: 36px; font-size: 13px; }
.avatar-40 { width: 40px; height: 40px; font-size: 14px; }
.avatar-48 { width: 48px; height: 48px; font-size: 16px; }
.avatar-72 { width: 72px; height: 72px; font-size: 22px; }
.avatar-96 { width: 96px; height: 96px; font-size: 28px; }

/* ══════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════ */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--sidebar-w);
  gap: 0;
  padding-top: var(--topbar-h);
  max-width: 1160px;
  margin: 0 auto;
}

.sidebar-left, .sidebar-right {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar { display: none; }

.feed-col {
  padding: 1.25rem .875rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
  min-height: calc(100vh - var(--topbar-h));
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg);
}

/* ══════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }

.card-body { padding: 1rem 1.125rem; }

.card-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .875rem;
}

/* ── Profile card widget ── */
.profile-banner {
  height: 76px;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 60%, #A855F7 100%);
  background-size: cover;
  background-position: center top;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 60%);
}

.profile-card-body {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  text-align: center;
}

.profile-avatar-wrap {
  margin-top: -28px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--indigo-500);
}

.profile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: .2rem;
}

.profile-handle {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  padding-top: .75rem;
  margin-top: .35rem;
  border-top: 1px solid var(--border);
}

.profile-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.profile-stat-num { font-size: 17px; font-weight: 800; color: var(--indigo-600); }
.profile-stat-label { font-size: 9.5px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  border-radius: var(--radius-full);
  padding: .5rem 1.2rem;
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid var(--border-md);
  background: none;
  color: var(--text-primary);
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.btn:hover { background: var(--gray-50); box-shadow: var(--shadow-xs); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #5B50F0 0%, #8B5CF6 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  box-shadow: 0 8px 24px rgba(99,102,241,0.48);
  transform: translateY(-1px);
}
.btn-primary:active { filter: brightness(0.96); transform: translateY(0); }

.btn-danger {
  background: var(--rose-500);
  color: #fff;
  border-color: transparent;
}
.btn-danger:hover { background: var(--rose-600); }

.btn-sm { padding: .35rem .85rem; font-size: 12.5px; }
.btn-icon {
  padding: .4rem;
  width: 36px; height: 36px;
  justify-content: center;
  border-radius: var(--radius-md);
}
.btn-icon:hover { background: var(--gray-100); color: var(--indigo-500); }

/* ══════════════════════════════════════════════
   COMPOSER
══════════════════════════════════════════════ */
.composer {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  padding: 1rem 1.125rem;
}

.composer-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-width: 0;
}

.composer-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  font-size: 14px;
  resize: none;
  min-height: 76px;
  background: var(--gray-50);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), min-height var(--transition), background var(--transition);
  line-height: 1.55;
}

.composer-textarea::placeholder { color: var(--text-muted); }

.composer-textarea:focus {
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  background: var(--surface);
  min-height: 100px;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.composer-actions { display: flex; gap: .2rem; }
.composer-action-btn {
  width: 34px; height: 34px;
  border: none; background: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.composer-action-btn:hover {
  background: var(--indigo-50);
  color: var(--indigo-500);
  transform: scale(1.08);
}

/* ── Image preview no composer ── */
.composer-image-preview {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 240px;
  background: var(--gray-100);
}
.composer-image-preview img {
  width: 100%; max-height: 240px; object-fit: cover;
}
.composer-image-remove {
  position: absolute; top: .5rem; right: .5rem;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
  transition: background var(--transition);
}
.composer-image-remove:hover { background: rgba(0,0,0,0.8); }

/* ── Privacy btn ── */
.composer-privacy-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--gray-100); border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: .3rem .7rem; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; font-family: var(--font-sans);
  transition: all var(--transition);
}
.composer-privacy-btn:hover { background: var(--indigo-50); color: var(--indigo-500); border-color: var(--indigo-200); }
.post-privacy-badge {
  font-size: 10px; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 2px; margin-left: .3rem;
}

/* ══════════════════════════════════════════════
   POST CARDS
══════════════════════════════════════════════ */
.post {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.post:last-child { border-bottom: none; }
.post:hover { background: rgba(99,102,241,0.028); }

.post-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.125rem .55rem;
}

.post-meta { flex: 1; min-width: 0; }
.post-author {
  font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.post-time { font-size: 11.5px; color: var(--text-muted); }

.post-body {
  padding: 0 1.125rem .75rem;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--text-primary);
}

.post-image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  margin: 0 0 .5rem;
}

.post-tags { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .3rem; }

.tag {
  display: inline-flex; align-items: center;
  background: var(--indigo-50);
  color: var(--indigo-500);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.post-actions {
  display: flex;
  padding: .35rem .75rem .875rem;
  gap: .1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.post-action-btn {
  display: flex; align-items: center; gap: .4rem;
  background: none; border: none;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.post-action-btn:hover {
  background: var(--indigo-50);
  color: var(--indigo-500);
  transform: translateY(-1px);
}
.post-action-btn.liked { color: var(--rose-500); }
.post-action-btn.liked:hover { color: var(--rose-600); background: rgba(244,63,94,0.08); }
.post-action-btn.bookmarked { color: var(--indigo-500); }
.post-action-btn i { font-size: 17px; }

/* ── Emoji reactions ── */
.reaction-wrap { position: relative; display: inline-block; }
.reaction-picker {
  position: absolute; bottom: calc(100% + 6px); left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-full); box-shadow: var(--shadow-lg);
  display: flex; gap: 1px; padding: 6px 10px;
  white-space: nowrap; z-index: 30;
  opacity: 0; pointer-events: none;
  transform: translateY(6px) scale(.88);
  transition: opacity .16s, transform .16s;
}
.reaction-wrap:hover .reaction-picker { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }
.reaction-emoji-btn {
  font-size: 22px; cursor: pointer; line-height: 1;
  padding: 2px 4px; border-radius: 8px;
  transition: transform .14s, background .14s;
  border: none; background: none;
}
.reaction-emoji-btn:hover { transform: scale(1.5); background: var(--gray-100); }
.reaction-summary {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; color: var(--text-muted); padding: .2rem .75rem .1rem;
}
.post-action-btn.reacted { color: var(--indigo-500); font-weight: 700; }

/* ── Hashtag / Mention ── */
.hashtag { color: var(--indigo-500); text-decoration: none; font-weight: 600; }
.hashtag:hover { text-decoration: underline; }
.mention { color: #0EA5E9; text-decoration: none; font-weight: 600; }
.mention:hover { text-decoration: underline; }

.mention-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  max-height: 220px; overflow-y: auto; margin-top: 4px;
}
.mention-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem 1rem; cursor: pointer; font-size: 13.5px;
  transition: background var(--transition);
}
.mention-item:hover { background: var(--indigo-50); }

/* ── Verified badge ── */
.verified-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; background: #1D9BF0; color: #fff;
  border-radius: 50%; font-size: 9px; flex-shrink: 0;
  vertical-align: middle; margin-left: 3px;
}

/* ── Story Highlights ── */
.highlights-row {
  display: flex; gap: .75rem; overflow-x: auto; scrollbar-width: none;
  padding: .65rem 1.25rem;
}
.highlights-row::-webkit-scrollbar { display: none; }
.highlight-item {
  display: flex; flex-direction: column; align-items: center;
  gap: .3rem; cursor: pointer; flex-shrink: 0; width: 66px;
}
.highlight-ring {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--gradient-primary); padding: 2.5px; flex-shrink: 0;
}
.highlight-ring.add-ring { background: none; border: 2px dashed var(--gray-300); padding: 1.5px; }
.highlight-ring-inner {
  width: 100%; height: 100%; border-radius: 50%;
  border: 2.5px solid var(--surface); background: var(--gray-100);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.highlight-ring-inner img { width: 100%; height: 100%; object-fit: cover; }
.highlight-name {
  font-size: 11px; color: var(--text-secondary); text-align: center;
  width: 66px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Testimonials (Depoimentos) ── */
.testimony-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius-md); padding: .875rem 1rem; margin-bottom: .65rem;
}
.testimony-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.testimony-text { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.testimony-pending { background: #FEF9C3; border-color: #FDE68A; }
.testimony-badge {
  font-size: 10.5px; padding: .15rem .55rem; border-radius: var(--radius-full);
  font-weight: 600; flex-shrink: 0;
}
.testimony-badge.pending  { background: #FEF9C3; color: #854D0E; }
.testimony-badge.approved { background: #DCFCE7; color: #166534; }

/* ── Profile viewers ── */
.profile-viewers {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .75rem; background: var(--gray-50);
  border-radius: var(--radius-md); margin-top: .75rem; cursor: pointer;
  transition: background var(--transition);
}
.profile-viewers:hover { background: var(--gray-100); }
.profile-viewers-avatars { display: flex; }
.profile-viewers-avatars .avatar { margin-right: -8px; border: 2px solid var(--surface); }

/* ── Online dot ── */
.online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ── Report ── */
.report-opt {
  width: 100%; text-align: left; padding: .65rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); font-size: 13.5px; color: var(--text-secondary);
  cursor: pointer; font-family: var(--font-sans);
  transition: all var(--transition);
}
.report-opt:hover { background: var(--indigo-50); color: var(--indigo-500); border-color: var(--indigo-200); }

/* ── Char counter ── */
.composer-char-count {
  display: none; text-align: right; font-size: 11px;
  color: var(--text-muted); margin-top: .2rem;
}
.composer-char-count.warn { color: var(--amber-400); display: block; }
.composer-char-count.danger { color: var(--rose-500); display: block; }

/* ══════════════════════════════════════════════
   COMMENTS
══════════════════════════════════════════════ */
.comment {
  display: flex; gap: .65rem;
  padding: .75rem 1.125rem;
  border-top: 1px solid var(--border);
}
.comment-body { flex: 1; min-width: 0; }
.comment-author { font-size: 13px; font-weight: 700; margin-bottom: 2px; letter-spacing: -.01em; }
.comment-text { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.comment-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════
   SIDEBAR COMPONENTS
══════════════════════════════════════════════ */
/* Friends grid */
.friends-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.friend-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.friend-item:hover .friend-name { color: var(--indigo-500); }
.friend-name { font-size: 10px; font-weight: 500; color: var(--text-secondary); text-align: center; line-height: 1.2; }

.online-indicator {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--teal-400);
  border: 2px solid var(--surface);
  margin-top: -12px; margin-left: 28px;
}

/* Communities */
.comm-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding-left var(--transition);
}
.comm-item:last-child { border-bottom: none; }
.comm-item:hover { padding-left: .25rem; }
.comm-item:hover .comm-name { color: var(--indigo-500); }

.comm-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.comm-name { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.comm-members { font-size: 11px; color: var(--text-muted); }

/* Scraps */
.scrap {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .8rem 1rem;
  margin-bottom: .5rem;
}
.scrap-author { font-size: 12.5px; font-weight: 700; color: var(--indigo-500); margin-bottom: 4px; display: flex; align-items: center; gap: .4rem; }
.scrap-text { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.scrap-time { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; }

/* Suggestions */
.suggest-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
}
.suggest-item:last-child { border-bottom: none; }
.suggest-info { flex: 1; min-width: 0; }
.suggest-name { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.suggest-sub { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ══════════════════════════════════════════════
   AUTH
══════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1.5rem 1rem;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 2.25rem 1.75rem;
  width: 100%;
  max-width: 390px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

.auth-logo {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: -.75rem;
}

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); letter-spacing: -.01em; }

.form-input {
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 1rem;
  font-size: 14px;
  background: var(--gray-50);
  color: var(--text-primary);
  outline: none;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  background: var(--surface);
}

textarea.form-input {
  height: auto;
  padding: .75rem 1rem;
  resize: vertical;
  min-height: 88px;
  line-height: 1.55;
}

.divider {
  display: flex; align-items: center; gap: .75rem;
  color: var(--text-muted); font-size: 12px;
}
.divider::before, .divider::after {
  content:''; flex:1; height:1px; background: var(--border);
}

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: .65rem;
  width: 100%; height: 44px;
  border: 1.5px solid var(--border-md);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}
.btn-google:hover { background: var(--gray-50); box-shadow: var(--shadow-sm); }
.btn-google:active { transform: scale(.98); }

.auth-switch { text-align: center; font-size: 13.5px; color: var(--text-secondary); }
.auth-switch a { color: var(--indigo-500); font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }

.auth-error {
  background: #FFF1F2; color: var(--rose-600);
  border: 1px solid rgba(244,63,94,0.25);
  border-radius: var(--radius-md);
  padding: .65rem 1rem;
  font-size: 13.5px;
  display: none;
}

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(var(--bottomnav-h) + 1.25rem); right: 1.25rem;
  background: var(--gray-900); color: var(--bg);
  padding: .7rem 1.1rem; border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500; z-index: 999;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  max-width: min(320px, calc(100vw - 2.5rem));
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .toast { background: var(--gray-200); color: var(--text-primary); }
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ══════════════════════════════════════════════
   SPINNER / LOADING
══════════════════════════════════════════════ */
.spinner {
  width: 32px; height: 32px;
  border: 2.5px solid var(--indigo-100);
  border-top-color: var(--indigo-500);
  border-radius: 50%;
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 1rem;
}

.loading-logo {
  font-family: var(--font-display);
  font-size: 28px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: .875rem; padding: 2.5rem 1rem; text-align: center;
}
.empty-state i { font-size: 44px; color: var(--gray-200); }
.empty-state p { font-size: 14px; color: var(--text-muted); font-weight: 500; }

/* ══════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,15,35,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  padding: 1rem;
  overflow-y: auto;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 1.1rem;
  transform: scale(.96) translateY(8px);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  margin: auto;
  border: 1px solid var(--border);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }

/* ══════════════════════════════════════════════
   SEARCH RESULTS
══════════════════════════════════════════════ */
.search-result-item {
  display: flex; align-items: center; gap: .875rem;
  padding: .875rem 1.125rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--indigo-50); }
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.search-result-sub { font-size: 12px; color: var(--text-muted); }

/* ══════════════════════════════════════════════
   NOTIFICATIONS PANEL
══════════════════════════════════════════════ */
.notif-panel {
  position: fixed;
  top: var(--topbar-h);
  right: .75rem;
  width: min(380px, calc(100vw - 1.5rem));
  max-height: min(500px, calc(100vh - var(--topbar-h) - 1rem));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 300;
  animation: panelIn .2s cubic-bezier(.34,1.56,.64,1);
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-10px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem .875rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-panel-title { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.notif-panel-body { flex: 1; overflow-y: auto; }

.notif-item {
  display: flex; align-items: flex-start; gap: .875rem;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--transition);
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--indigo-50); }
.notif-item.unread::before {
  content: '';
  position: absolute; left: .55rem; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--indigo-500); border-radius: 50%;
}

.notif-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 17px;
}
.notif-text { flex: 1; min-width: 0; }
.notif-text p { font-size: 13px; line-height: 1.45; color: var(--text-primary); }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.notif-topbar-wrap { position: relative; }

/* ══════════════════════════════════════════════
   THEME TOGGLE
══════════════════════════════════════════════ */
.theme-toggle-btn {
  width: 40px; height: 40px;
  border: none; background: none;
  border-radius: var(--radius-md);
  color: var(--topbar-text-dim);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  cursor: pointer; flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: var(--topbar-hover);
  color: var(--topbar-text);
  transform: rotate(15deg);
}

/* ══════════════════════════════════════════════
   BOTTOM NAV (mobile)
══════════════════════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 62px;
  background: var(--topbar-bg);
  box-shadow: 0 -2px 16px rgba(79,70,229,0.22);
  border-top: none;
  z-index: 100;
  padding: 0 .5rem;
  align-items: stretch;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  background: none; border: none;
  color: rgba(255,255,255,0.65); font-size: 22px;
  transition: color var(--transition), transform var(--transition);
  padding: .5rem .25rem;
  position: relative;
  max-width: 80px;
}
.bottom-nav-btn.active { color: #fff; }
.bottom-nav-btn.active i { filter: drop-shadow(0 0 6px rgba(255,255,255,0.5)); }
.bottom-nav-btn.active i { transform: scale(1.1); }
.bottom-nav-btn:active { transform: scale(.93); }
.bottom-nav-btn span {
  font-size: 9.5px; font-weight: 600; line-height: 1;
  font-family: var(--font-sans);
  color: inherit;
}
.bottom-nav-btn .notif-dot {
  position: absolute; top: .4rem; right: calc(50% - 14px);
  width: 7px; height: 7px; background: var(--rose-500);
  border-radius: 50%; border: 1.5px solid var(--surface);
  display: none;
}

/* ══════════════════════════════════════════════
   USER DROPDOWN
══════════════════════════════════════════════ */
.user-menu { position: relative; margin-left: .25rem; flex-shrink: 0; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 185px;
  overflow: hidden;
  z-index: 400;
  animation: panelIn .18s cubic-bezier(.34,1.56,.64,1);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.1rem;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  text-decoration: none;
  transition: background var(--transition);
}
.user-dropdown-item:hover { background: var(--indigo-50); color: var(--indigo-500); }
.user-dropdown-item.danger { color: var(--rose-500); }
.user-dropdown-item.danger:hover { background: #FFF1F2; }
.user-dropdown-divider { height: 1px; background: var(--border); margin: .25rem 0; }

/* ══════════════════════════════════════════════
   PHOTOS GRID
══════════════════════════════════════════════ */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.photos-grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--gray-100);
  border-radius: 6px;
}
.photos-grid-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .24s, opacity .24s;
  display: block;
}
.photos-grid-item:hover img { transform: scale(1.07); opacity: .86; }
.photos-grid-overlay {
  position: absolute; inset: 0;
  background: rgba(99,102,241,0.25);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
  color: #fff; font-size: 28px;
}
.photos-grid-item:hover .photos-grid-overlay { opacity: 1; }

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px)
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .app-layout { grid-template-columns: 210px 1fr; }
  .sidebar-right { display: none; }
  .topbar-search { max-width: 240px; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
══════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --bottomnav-h: 62px; }

  .app-layout {
    grid-template-columns: 1fr;
    padding-bottom: var(--bottomnav-h);
  }
  .sidebar-left  { display: none !important; }
  .sidebar-right { display: none !important; }
  .feed-col {
    border: none;
    padding: .75rem .5rem;
    padding-bottom: calc(var(--bottomnav-h) + .5rem);
    gap: .75rem;
  }

  /* Topbar mobile */
  .topbar { padding: 0 .875rem; gap: .5rem; }
  .topbar-logo { font-size: 22px; }
  .topbar-search { display: none; }
  .topbar-nav { display: none; }
  .theme-toggle-btn { margin-left: auto; color: rgba(255,255,255,0.8); }
  .theme-toggle-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
  .user-menu { margin-left: 0; }

  /* Bottom nav */
  .bottom-nav { display: flex; }

  /* Modal mobile */
  .modal-overlay { align-items: flex-end; padding: 0; backdrop-filter: blur(8px); }
  .modal {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%; max-height: 92vh;
    padding: 1.25rem 1rem 2rem;
    transform: translateY(40px);
  }
  .modal-overlay.open .modal { transform: translateY(0); }

  /* Toast */
  .toast { bottom: calc(var(--bottomnav-h) + .875rem); left: .75rem; right: .75rem; }

  /* Posts */
  .post-header { padding: .875rem 1rem .5rem; }
  .post-body { padding: 0 1rem .7rem; font-size: 14px; }
  .post-actions { padding: .3rem .5rem .75rem; }
  .post-action-btn { font-size: 12px; padding: .38rem .55rem; }

  /* Composer */
  .composer { padding: .875rem 1rem; gap: .6rem; }

  /* Notif panel mobile */
  .notif-panel {
    right: 0; left: 0; width: 100%;
    top: var(--topbar-h);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }

  /* User dropdown mobile */
  .user-dropdown { right: 0; min-width: 175px; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — SMALL (≤ 380px)
══════════════════════════════════════════════ */
@media (max-width: 380px) {
  .auth-card { padding: 1.75rem 1.1rem; }
  .btn-sm { padding: .3rem .7rem; font-size: 12px; }
  .avatar-72 { width: 56px; height: 56px; font-size: 18px; }
  .friends-big-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════
   TAB TOGGLE (login, recados)
══════════════════════════════════════════════ */
.tab-toggle {
  flex: 1;
  padding: .45rem;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}
.tab-toggle.active {
  background: var(--surface);
  color: var(--indigo-500);
  box-shadow: var(--shadow-xs);
}

/* ══════════════════════════════════════════════
   MISC UTILITIES
══════════════════════════════════════════════ */
/* Post pinned badge */
.post-pinned-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: 11px; font-weight: 600;
  color: var(--indigo-500);
  padding: 2px 8px;
  background: var(--indigo-50);
  border-radius: var(--radius-full);
}

/* Share action menu */
.share-menu-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.1rem;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.share-menu-item:hover { background: var(--indigo-50); color: var(--indigo-500); }

/* Follow / Unfollow btn */
.btn-follow { min-width: 88px; }

/* Counter badge */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--indigo-500);
  color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: var(--radius-full);
  padding: 0 5px;
}

/* Input file hidden */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Back to top */
.back-to-top {
  position: fixed; bottom: calc(var(--bottomnav-h) + 1rem); right: 1.25rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: var(--shadow-colored);
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: all var(--transition);
  z-index: 90;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { filter: brightness(1.08); }
