/* ══════════════════════════════════════════════════════
   UNINO — Complete Design System
   Modern, clean, Gen-Z friendly UI
   ══════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────── */
:root, [data-theme="light"] {
  --bg-primary: #F8F9FB;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F0F2F5;
  --bg-input: #F0F2F5;
  --text-primary: #1A1A2E;
  --text-secondary: #65676B;
  --text-tertiary: #8A8D91;
  --border: #E4E6EB;
  --accent: #6C5CE7;
  --accent-rgb: 108, 92, 231;
  --accent-hover: #5B4BD5;
  --accent-light: rgba(108, 92, 231, 0.1);
  --accent-glow: rgba(108, 92, 231, 0.25);
  --green: #00BA88;
  --green-light: rgba(0, 186, 136, 0.12);
  --red: #FF6B6B;
  --red-light: rgba(255, 107, 107, 0.1);
  --orange: #FF9F43;
  --orange-light: rgba(255, 159, 67, 0.1);
  --blue: #3B82F6;
  --blue-light: rgba(59, 130, 246, 0.1);
  --gradient: linear-gradient(135deg, #6C5CE7 0%, #A855F7 100%);
  --gradient-warm: linear-gradient(135deg, #FF9F43 0%, #FF6B6B 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;
  --nav-height: 60px;
  --header-height: 56px;
  --app-safe-top: env(safe-area-inset-top, 0px);
  --native-status-bar: 0px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg-primary: #0A0A14;
  --bg-secondary: #12121F;
  --bg-tertiary: #1A1A2E;
  --bg-input: #1A1A2E;
  --text-primary: #F5F5F7;
  --text-secondary: #A0A3BD;
  --text-tertiary: #6B6F8C;
  --border: #252540;
  --accent: #8B7CF7;
  --accent-rgb: 139, 124, 247;
  --accent-hover: #9D8FF9;
  --accent-light: rgba(139, 124, 247, 0.15);
  --accent-glow: rgba(139, 124, 247, 0.3);
  --green-light: rgba(0, 186, 136, 0.15);
  --red-light: rgba(255, 107, 107, 0.15);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

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

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow: hidden;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

::selection {
  background: var(--accent);
  color: white;
}

/* ── Screen Management ─────────────────────────────────── */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  flex-direction: column;
  padding-top: var(--app-safe-top);
  box-sizing: border-box;
  overflow: hidden;
}

.screen.active {
  display: flex;
}

/* ── Splash / Loading Screen ───────────────────────────── */
#splash {
  background: var(--bg-primary);
  align-items: center;
  justify-content: center;
  z-index: 200;
}

#loading-screen {
  background: var(--bg-primary);
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.splash-inner,
.loading-content {
  text-align: center;
}

.splash-logo,
.loading-logo {
  font-size: 72px;
  margin-bottom: 16px;
  animation: bounce 1s ease infinite;
}

.splash-title {
  font-size: 32px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.loading-content h2 {
  font-size: 32px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* ── Auth Screen ───────────────────────────────────────── */
#auth-screen {
  background: var(--bg-primary);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.auth-container,
.auth-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-hero {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo,
.auth-emoji {
  font-size: 64px;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 36px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-hero h1 {
  font-size: 36px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-hero p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
}

.auth-tagline {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
}

.online-pill,
.user-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-light);
  color: var(--green);
  padding: 10px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

/* Auth Forms */
.auth-form {
  display: none;
}

.auth-form.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 18px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all var(--transition);
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.auth-form input::placeholder {
  color: var(--text-tertiary);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 72px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-links-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -4px;
}

.text-link-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.text-link-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.input-row,
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-switch,
.switch-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.auth-switch a,
.switch-text a {
  font-weight: 600;
}

/* Utility: Dot */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot.green { background: var(--green); }
.dot.green.sm { width: 6px; height: 6px; }
.dot.orange { background: var(--orange); }
.dot.gray { background: var(--text-tertiary); }

/* Utility: btn-accent = btn-primary alias */
.btn-accent {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-accent:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.w100 { width: 100%; }

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-full {
  width: 100%;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: none;
  padding: 12px 20px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 10px 20px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--accent-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 10px 12px;
  border-radius: 18px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 18px;
  font-weight: 600;
  cursor: pointer;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-tertiary);
}

.icon-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.icon-btn .badge:empty {
  display: none;
}

/* ── App Header ────────────────────────────────────────── */
#app-header,
#hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.header-left,
.hdr-l {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo,
.hdr-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Status Pill */
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.status-pill.online {
  background: var(--green-light);
  color: var(--green);
}

.status-pill.away {
  background: var(--orange-light);
  color: var(--orange);
}

.status-pill.offline {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.online .status-dot {
  animation: pulse 2s ease infinite;
}

/* Live Count */
.live-pill,
.live-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light);
  padding: 4px 10px;
  border-radius: 100px;
}

.header-right,
.hdr-r {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-avatar,
.hdr-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition);
}

.header-avatar:hover {
  transform: scale(1.05);
}

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

/* Theme Toggle */
[data-theme="dark"] .icon-sun,
[data-theme="dark"] .ic-sun { display: block; }
[data-theme="dark"] .icon-moon,
[data-theme="dark"] .ic-moon { display: none; }
[data-theme="light"] .icon-sun,
[data-theme="light"] .ic-sun { display: none; }
[data-theme="light"] .icon-moon,
[data-theme="light"] .ic-moon { display: block; }

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

/* ── Bottom Navigation ─────────────────────────────────── */
#bottom-nav,
#nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: calc(var(--nav-height) + 8px);
  background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  padding: 8px 10px calc(env(safe-area-inset-bottom, 0px) + 8px);
  flex-shrink: 0;
  width: calc(100% - 24px);
  margin: 0 auto 10px;
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(17,24,39,.12);
  backdrop-filter: blur(14px);
}

.nav-item,
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 18px;
  position: relative;
  transition: all var(--transition);
}

.nav-item svg,
.nav-btn svg {
  width: 24px;
  height: 24px;
  transition: all var(--transition);
}

.nav-item:hover,
.nav-item.active,
.nav-btn:hover,
.nav-btn.active {
  color: var(--accent);
}

.nav-item.active svg,
.nav-btn.active svg {
  stroke: var(--accent);
}
.nav-btn.active, .nav-item.active { background: color-mix(in srgb, var(--accent) 14%, var(--bg-secondary)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }

/* Create Button */
.nav-create,
.nav-plus {
  position: relative;
  top: -10px;
}

.create-btn-wrap,
.plus-circle {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: all var(--transition);
}

.nav-create:hover .create-btn-wrap,
.nav-plus:hover .plus-circle {
  transform: scale(1.08);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.nav-badge {
  position: absolute;
  top: 0;
  right: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.nav-badge:empty {
  display: none;
}

/* ── Main Content ──────────────────────────────────────── */
#app-content,
#content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ── Feed Page ─────────────────────────────────────────── */
.feed-page {
  padding-bottom: 16px;
}

/* Welcome Banner */
.welcome-banner {
  padding: 20px 16px;
  background: var(--gradient);
  color: #fff;
  margin: 12px;
  border-radius: var(--radius-lg);
}

.welcome-banner h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.welcome-banner p {
  opacity: 0.9;
  font-size: 14px;
}

.feed-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 8px;
}

.feed-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.feed-search-bar {
  flex: 1;
  margin-bottom: 0;
  padding: 10px 14px;
  border-radius: 999px;
}

.feed-search-bar input {
  font-size: 14px;
}

/* Feed search people suggestions */
.feed-people-suggestions {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg-secondary);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 100;
  display: none;
  overflow: hidden;
  margin-top: 4px;
}
.feed-people-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; width: 100%;
  background: none; border: none; cursor: pointer;
  text-align: left; color: var(--text-primary);
  transition: background 0.15s;
}
.feed-people-item:hover { background: var(--bg-tertiary); }
.feed-people-info { display: flex; flex-direction: column; min-width: 0; }
.feed-people-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-people-meta {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.feed-search-clear {
  background: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.inline-video-preview {
  display: block;
  width: 100%;
  background: #000;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.inline-video-preview.ready {
  opacity: 1;
}

/* Hide the browser/WebView default video controls & poster icon across all video elements */
video::-webkit-media-controls {
  display: none !important;
}
video::-webkit-media-controls-enclosure {
  display: none !important;
}
video::-webkit-media-controls-panel {
  display: none !important;
}
video::-webkit-media-controls-start-playback-button {
  display: none !important;
}

/* Stories / Status Row */
.stories-row {
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stories-row::-webkit-scrollbar {
  display: none;
}

.story-item {
  flex-shrink: 0;
  text-align: center;
  cursor: pointer;
}

.story-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  padding: 3px;
  background: var(--gradient);
  margin-bottom: 6px;
}

.story-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
}

.story-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.story-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.add-story .story-avatar-inner {
  font-size: 24px;
  color: var(--accent);
}

/* Create Post Prompt */
.create-post-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.create-post-prompt:hover {
  background: var(--bg-tertiary);
}

.create-post-prompt .placeholder-text {
  flex: 1;
  color: var(--text-tertiary);
  font-size: 15px;
}

.create-post-hint {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.module-trends-card {
  margin: 12px 16px 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(108,92,231,0.08), rgba(217,70,239,0.08));
  border: 1px solid rgba(108,92,231,0.12);
  border-radius: 16px;
}

.module-trends-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.module-trends-head h3 {
  font-size: 14px;
  font-weight: 700;
}

.module-trends-head span {
  font-size: 11px;
  color: var(--text-secondary);
}

.module-trends-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trend-chip {
  border: none;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trend-chip span {
  color: var(--text-secondary);
  font-size: 11px;
}

.trending-posts-card {
  margin: 8px 16px 12px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(18, 96, 92, 0.08), rgba(244, 162, 97, 0.12));
  border: 1px solid rgba(18, 96, 92, 0.12);
  border-radius: 18px;
}

.trending-posts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.trending-posts-head h3 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}

.trending-posts-head span {
  font-size: 11px;
  color: var(--text-secondary);
}

.trend-nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.trend-toggle-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.trend-toggle-btn.collapsed {
  transform: rotate(180deg);
}

.trending-post-scroll.collapsed {
  display: none;
}

.trend-nav-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.trending-post-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.trending-post-scroll::-webkit-scrollbar {
  display: none;
}

.trending-post-card {
  flex: 0 0 min(280px, 78vw);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
}

.trending-post-media {
  position: relative;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--bg-tertiary);
}

.trending-post-media img,
.trending-post-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trending-post-video-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.trending-post-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.trending-post-copy {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.hashtag-trends-card {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.1), rgba(255, 214, 10, 0.12));
  border-color: rgba(244, 162, 97, 0.16);
}

.prompt-actions {
  display: flex;
  gap: 8px;
}

.prompt-action {
  color: var(--accent);
}

/* Suggested Friends Section */
.suggested-section {
  padding: 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.suggested-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.suggested-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.suggested-header a {
  font-size: 13px;
  font-weight: 600;
}

.suggested-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.suggested-list::-webkit-scrollbar {
  display: none;
}

.suggested-card {
  flex-shrink: 0;
  width: 140px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.suggested-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.suggested-card .avatar-lg {
  margin: 0 auto 8px;
}

.suggested-card-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.suggested-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 28px;
}

.suggested-card .btn-sm {
  width: 100%;
}

.suggested-event-card {
  border: 1px solid rgba(108, 92, 231, 0.22);
}

.suggested-event-thumb {
  width: 100%;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.suggested-event-thumb img,
.suggested-event-gradient {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suggested-event-gradient {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

/* Post Card */
.post-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  margin: 8px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}

.post-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.06);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 8px;
}

.post-header-info {
  flex: 1;
  min-width: 0;
}

.post-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-author-name {
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.post-author-name:hover {
  color: var(--accent);
}

.verified-badge {
  color: var(--accent);
}

.post-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-content {
  padding: 0 16px 12px;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-content .hashtag {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.post-content .hashtag:hover {
  text-decoration: underline;
}

.post-content .module-hashtag {
  color: var(--accent);
  font-weight: 700;
}

.post-content .mention-handle {
  color: #3b82f6;
  font-weight: 700;
  cursor: pointer;
}

.post-content .mention-handle:hover {
  text-decoration: underline;
}

.post-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  word-break: break-all;
}
.post-link:hover { text-decoration: underline; }

.expandable-post-body .post-content {
  padding-bottom: 6px;
}

.post-expand-btn {
  margin: 0 16px 12px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}

.module-post-text .post-content {
  padding: 0 0 6px;
}

.module-post-text .post-expand-btn {
  margin: 0;
}

.post-module-tags {
  padding: 0 16px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-context-tags {
  padding: 0 16px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-context-chip {
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: default;
}

.post-context-chip.clickable {
  cursor: pointer;
  color: var(--accent);
}

.post-comment-preview {
  margin: 0 16px 12px;
  width: calc(100% - 32px);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-secondary));
  border-radius: 12px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-comment-preview-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
}

.post-comment-preview-text {
  font-size: 12px;
  color: var(--text-primary);
}

#feed-posts {
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

#feed-posts.feed-ready {
  opacity: 1;
}

.feed-inline-suggestion {
  border-style: dashed;
  border-width: 1px;
  border-color: rgba(var(--accent-rgb), 0.28);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 48%);
}

.feed-inline-suggestion .discover-card {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.feed-inline-suggestion-rail .suggested-list {
  padding: 2px 12px 14px;
}

.anon-inline-action {
  color: var(--accent);
  font-weight: 800;
}

.anon-name-edit {
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.hashtag-chip {
  background: rgba(18, 96, 92, 0.08);
}

/* Post Image / Video Container */
.post-image-wrap, .post-media-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.post-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  cursor: pointer;
  display: block;
}

.post-video-wrap {
  position: relative;
  cursor: pointer;
  min-height: 200px;
  background: #000;
}

.post-video {
  width: 100%;
  min-height: 200px;
  max-height: 500px;
  object-fit: contain;
  display: block;
  background: #000;
}

.post-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  cursor: pointer;
  transition: opacity 0.2s;
}

.post-video-overlay:hover {
  background: rgba(0,0,0,0.35);
}

.play-btn-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.3);
}

/* Post Engagement area */
.post-engagement {
  padding: 0 16px 8px;
}

/* Post Actions */
.post-stats {
  padding: 8px 0 4px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-actions {
  display: flex;
  padding: 4px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.post-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: 18px;
  cursor: pointer;
  transition: all var(--transition);
}

.post-action:hover {
  background: var(--bg-tertiary);
}

.post-action.liked {
  color: var(--red);
}

.post-action.reacted {
  color: var(--accent);
}

.post-reaction-emoji {
  font-size: 15px;
  line-height: 1;
}

.post-action.liked svg {
  fill: var(--red);
  stroke: var(--red);
}

.reaction-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}

.reaction-total {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.reaction-summary.compact .reaction-chip,
.reaction-summary.inline .reaction-chip,
.reaction-summary.msg-inline .reaction-chip {
  padding: 1px 7px;
  font-size: 11px;
}

.reaction-picker-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reaction-option {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  font-size: 22px;
  cursor: pointer;
}

.reaction-option.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-reaction-popover {
  position: fixed;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-secondary) 92%, rgba(12,12,18,0.9));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.comment-reaction-popover .reaction-option {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 20px;
}

/* Comments Section */
.comments-section {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  background: var(--bg-tertiary);
}

.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }

.comment-bubble {
  flex: 1;
  background: var(--bg-tertiary);
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  min-width: 0;
}

.comment-author {
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.comment-author:hover {
  color: var(--accent);
}

.comment-text {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 2px;
}

.comment-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  display: inline;
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.comment-reply-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.comment-reply-btn:hover { text-decoration: underline; }

.comment-replies {
  margin-left: 0;
  border-left: none;
  padding-left: 0;
}

.comment-replies .comment-item {
  padding: 0;
}

.comment-replies .comment-bubble {
  background: var(--bg-secondary);
  border-color: transparent;
  padding: 8px 12px;
}

.comment-replies .comment-bubble .comment-author {
  font-size: 12px;
}

.comment-replies .comment-bubble .comment-text {
  font-size: 13px;
}

.reply-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-light);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.reply-indicator button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
}

.comment-input-wrap {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.comment-input-wrap input {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-primary);
  font-size: 14px;
}

.comment-input-wrap input:focus {
  border-color: var(--accent);
}

.comment-input-wrap button {
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ── Explore Page ──────────────────────────────────────── */
.explore-page {
  padding: 16px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
  transition: all var(--transition);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-bar svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: none;
  color: var(--text-primary);
  font-size: 15px;
}

.search-bar input::placeholder {
  color: var(--text-tertiary);
}

/* Filter Chips */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.chip:hover,
.chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* Users Grid */
.users-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.user-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.user-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.user-card .avatar-lg {
  margin: 0 auto 12px;
}

.user-card-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.user-card-uni {
  font-size: 12px;
  color: var(--text-secondary);
}

.user-card-major {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 100px;
  margin-top: 8px;
}

.user-card-distance {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ── Messages Page ─────────────────────────────────────── */
.messages-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#msg-tab-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.messages-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.messages-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.messages-header-actions .btn-sm {
  min-width: 72px;
}

.messages-header h2 {
  font-size: 22px;
  font-weight: 800;
}

.convo-list {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
}

.convo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: none;
  margin: 6px 10px;
  border-radius: 16px;
  background: var(--bg-secondary);
}

.convo-item:hover {
  background: var(--bg-tertiary);
}

.convo-item.unread {
  background: color-mix(in srgb, var(--accent-light) 70%, var(--bg-secondary));
}

.convo-avatar {
  position: relative;
}

.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--green);
  border: 2px solid var(--bg-secondary);
  border-radius: 50%;
}

.convo-info {
  flex: 1;
  min-width: 0;
}

.convo-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.convo-last-msg {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.convo-item.unread .convo-last-msg {
  color: var(--text-primary);
  font-weight: 600;
}

.convo-right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.convo-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.convo-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 100px;
  padding: 0 6px;
}

.convo-menu-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.convo-menu-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ── Chat View ─────────────────────────────────────────── */
#chat-view,
#group-chat-view {
  background: var(--bg-primary);
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: 100%;
  max-height: 100%;
}

/* Sub-Header (Chat & Profile back bars) */
.sub-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sub-hdr h3 {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  text-align: center;
}

.sub-hdr-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}

.sub-hdr-info h3 {
  text-align: left;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}

.chat-header-info h3 {
  font-size: 16px;
  font-weight: 700;
}

.chat-status-text {
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}

.chat-messages,
.chat-msgs,
#chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.chat-date-divider {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 16px 0 8px;
}

/* ── Message Rows with Avatars ─── */
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 4px;
}
.msg-row-sent {
  justify-content: flex-end;
}
.msg-row-received {
  justify-content: flex-start;
}
.msg-avatar-wrap {
  flex-shrink: 0;
  margin-bottom: 2px;
}
.msg-avatar-wrap .avatar-xs {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.msg-bubble {
  padding: 5px 10px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.01em;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  transition: transform .14s ease, opacity .14s ease;
}

.msg-bubble:has(.vn-player) {
  padding: 1px 8px;
  max-width: min(92%, 440px);
}

.msg-bubble:has(.vn-player) .msg-time {
  margin-top: 1px;
  line-height: 1.1;
}

.msg-bubble.msg-new {
  animation: msg-pop .14s ease-out;
}

.msg-bubble.message-long-pressing {
  transform: scale(0.985);
  opacity: 0.82;
}

@keyframes msg-pop {
  from { opacity: .85; transform: translateY(4px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-sent {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.msg-received {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

.msg-time {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.msg-sent .msg-time {
  justify-content: flex-end;
}

.msg-reaction-line {
  margin-top: 6px;
  display: flex;
}

.msg-sent .msg-reaction-line {
  justify-content: flex-end;
}

.msg-deleted {
  opacity: 0.72;
  font-style: italic;
}

/* ─── Chat Date Separators ───────────── */
.chat-date-sep {
  text-align: center;
  margin: 14px 0 8px;
}
.chat-date-sep span {
  background: var(--bg-tertiary, rgba(128,128,128,0.15));
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 10px;
}

/* ─── Message Delivery Status ───────────── */
.msg-status {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0px;
  line-height: 1;
}
.msg-status.sent { color: rgba(255,255,255,0.4); }
.msg-status.delivered { color: rgba(255,255,255,0.6); }
.msg-status.read { color: #34D399; }

.msg-image {
  max-width: 240px;
  border-radius: 18px;
  cursor: pointer;
  margin-bottom: 4px;
}

.chat-input-bar,
.chat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input-bar input[type="text"],
.chat-input-bar textarea,
.chat-bar input[type="text"],
.chat-bar textarea {
  flex: 1;
  padding: 9px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.35;
}

.chat-bar textarea {
  min-height: 40px;
  max-height: 84px;
}

.chat-reply-indicator {
  margin: 0 12px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-reply-close {
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 16px;
  cursor: pointer;
}

.msg-reply-snippet {
  border-left: 2px solid rgba(255,255,255,0.55);
  padding-left: 8px;
  margin-bottom: 5px;
  font-size: 12px;
  opacity: .96;
  background: rgba(255,255,255,0.14);
  border-radius: 8px;
  padding-top: 4px;
  padding-bottom: 4px;
  cursor: pointer;
  font-style: italic;
  color: rgba(255,255,255,0.85);
}

.msg-received .msg-reply-snippet {
  background: rgba(17,24,39,0.08);
  border-left-color: rgba(17,24,39,0.35);
  color: var(--text-secondary);
}

.msg-jump-highlight .msg-bubble {
  box-shadow: 0 0 0 2px rgba(99,102,241,0.35);
  transition: box-shadow .25s ease;
}

.msg-reply-btn {
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  width: 20px;
  height: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 2px;
  border-radius: 50%;
}

.msg-reply-btn:hover {
  color: var(--accent);
  background: rgba(99,102,241,0.12);
}

.chat-input-bar input:focus,
.chat-input-bar textarea:focus,
.chat-bar textarea:focus {
  border-color: var(--accent);
}

.msg-stack {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  min-width: 0;
}
.msg-stack-sent {
  align-items: flex-end;
}
.msg-stack-received {
  align-items: flex-start;
}

.send-btn {
  width: 44px;
  height: 44px;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-full);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.05);
}

/* ── Hustle (Marketplace) ──────────────────────────────── */
.hustle-page {
  padding: 16px;
}

.hustle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hustle-header h2 {
  font-size: 22px;
  font-weight: 800;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.listing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.listing-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.listing-placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--bg-tertiary);
}

.listing-info {
  padding: 12px;
}

.listing-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.listing-meta-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
}

.listing-meta-tag.hot {
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.12);
}

.listing-meta-tag.fast {
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.12);
}

.listing-rating {
  font-size: 12px;
  font-weight: 700;
  color: #facc15;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.28);
  margin-top: 4px;
}

.listing-rating span {
  color: var(--text-secondary);
  text-shadow: none;
}

.listing-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.listing-price {
  font-size: 19px;
  font-weight: 800;
  color: var(--accent);
}

.listing-seller {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}
.post-like-action.react-holding {
  transform: scale(0.98);
  opacity: 0.82;
}

/* ── Profile View ──────────────────────────────────────── */
#profile-view {
  background: var(--bg-primary);
  z-index: 55;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.profile-header h3 {
  font-size: 16px;
  font-weight: 700;
}

#profile-content,
#prof-body {
  flex: 1;
  overflow-y: auto;
}

.profile-cover {
  height: 160px;
  background: var(--gradient);
  position: relative;
}
.profile-cover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg-primary));
  pointer-events: none;
}

.profile-avatar-wrap {
  position: absolute;
  bottom: -48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  border: 4px solid var(--bg-primary);
  overflow: hidden;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 34px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

.profile-avatar-large.clickable {
  cursor: zoom-in;
}

.profile-avatar-large.clickable:hover {
  transform: scale(1.02);
}

.avatar-online-dot {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 14px; height: 14px;
  background: #34D399;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

.profile-info {
  text-align: center;
  padding: 58px 20px 16px;
}

.profile-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.profile-handle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.profile-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.profile-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 10px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.profile-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 16px;
}

.profile-stat {
  text-align: center;
  cursor: pointer;
  flex: 1;
  padding: 14px 8px;
  position: relative;
  transition: background 0.15s;
  border-radius: 18px;
}

.profile-stat-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
}

.profile-stat:hover {
  background: var(--bg-secondary);
}

.profile-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; height: 60%;
  width: 1px;
  background: var(--border);
}

.profile-stat:hover .stat-num {
  color: var(--accent);
}

.stat-num {
  font-size: 20px;
  font-weight: 800;
  transition: color var(--transition);
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px 16px;
}
.profile-actions .btn-primary,
.profile-actions .btn-secondary,
.profile-actions .btn-outline {
  flex: 1;
  max-width: 160px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
  gap: 4px;
}

.profile-tab {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.profile-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.profile-posts {
  padding: 8px 0;
}

/* ── Avatars ───────────────────────────────────────────── */
.avatar-xs {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-xs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

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

.avatar-md {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

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

.avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

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

/* ── Modal ─────────────────────────────────────────────── */
.modal-overlay,
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}

.modal-sheet {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  touch-action: pan-y;
  will-change: transform;
  transition: transform 0.22s ease;
  animation: slideUp 0.3s ease;
}

.modal-bg.sheet-dragging {
  transition: none !important;
}

.modal-sheet.sheet-dragging {
  transition: none !important;
}

.modal-handle,
.modal-bar {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 100px;
  margin: 12px auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  padding: 16px;
}

/* ── Image Viewer ──────────────────────────────────────── */
.image-viewer,
.img-view {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

body.image-view-open .modal-bg {
  pointer-events: none;
}

.image-viewer img,
.img-view img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 18px;
}

.image-viewer-close,
.img-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 28px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.img-download {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.img-gallery-counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0,0,0,0.5);
  padding: 4px 14px;
  border-radius: 20px;
  z-index: 2;
}

.img-gallery-prev,
.img-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.img-gallery-prev { left: 12px; }
.img-gallery-next { right: 12px; }

/* ── Toast ─────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-weight: 600;
  z-index: 11000;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  max-width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Empty State ───────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.5;
}

/* ── Forms ─────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: 18px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Image Preview */
.image-preview {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 12px;
}

.image-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.image-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notifications Dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(var(--header-height) + 8px);
  right: 12px;
  width: min(340px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 70;
  animation: fadeIn 0.15s ease;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
}

.notif-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.notif-item:hover {
  background: var(--bg-tertiary);
}

.notif-item.unread {
  background: var(--accent-light);
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-text {
  font-size: 14px;
  line-height: 1.4;
}

.notif-text strong {
  font-weight: 700;
}

.notif-time {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.notif-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ── Loading ───────────────────────────────────────────── */
.inline-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 18px;
}

/* ── Animations ────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (min-width: 768px) {
  .users-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .listings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .modal-sheet {
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
  }
}

@media (min-width: 1024px) {
  body {
    display: flex;
    justify-content: center;
  }
  
  .screen {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
  }
  
  #app-shell {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ═══════════════════════════════════════════════════
   UNINO v4 — Discover, Radar Explore, Modules,
   Enhanced Purple, Page Transitions
   ═══════════════════════════════════════════════════ */

/* ── Extra Gradient Variables ── */
:root, [data-theme="light"] {
  --gradient-vivid: linear-gradient(135deg, #6C5CE7 0%, #D946EF 100%);
  --gradient-deep: linear-gradient(135deg, #4C1D95 0%, #7C3AED 50%, #A855F7 100%);
}
[data-theme="dark"] {
  --gradient-vivid: linear-gradient(135deg, #8B7CF7 0%, #E879F9 100%);
  --gradient-deep: linear-gradient(135deg, #5B21B6 0%, #8B5CF6 50%, #C084FC 100%);
}

/* ── Page Transition ── */
#content > * {
  animation: pageIn 0.25s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Welcome Banner Override ── */
.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gradient-deep);
}
.welcome-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Discover Section (Feed) ── */
.discover-section {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.discover-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.discover-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  text-align: center;
}
.discover-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.discover-tab:hover {
  color: var(--text-primary);
}
.discover-content {
  padding: 12px 0 8px;
}
.discover-scroll {
  display: flex;
  gap: 12px;
  padding: 0 16px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.discover-scroll::-webkit-scrollbar { display: none; }
.discover-card {
  flex-shrink: 0;
  width: 148px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.discover-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.discover-card.event-card {
  border: none;
}
.discover-card-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}
.discover-card-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discover-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 28px;
}
.discover-card-tag {
  display: inline-block;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.discover-card-btn {
  width: 100%;
  padding: 6px 0;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.discover-card-btn:hover { opacity: 0.9; }
.discover-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-tertiary);
}
.discover-empty span {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}
.online-dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  border: 2px solid var(--bg-tertiary);
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  right: 0;
}

/* ── Explore Toggle ── */
.explore-toggle {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
}
.explore-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: none;
  border: none;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.explore-toggle-btn.active {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.explore-toggle-btn svg { flex-shrink: 0; }

/* ── Radar ── */
.radar-container { padding: 0 0 8px; }
.radar-visual {
  width: 280px;
  height: 280px;
  margin: 0 auto 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed;
}
.radar-ring.r1 { width: 120px; height: 120px; border-color: rgba(var(--accent-rgb), 0.4); }
.radar-ring.r2 { width: 190px; height: 190px; border-color: rgba(var(--accent-rgb), 0.25); }
.radar-ring.r3 { width: 260px; height: 260px; border-color: rgba(var(--accent-rgb), 0.12); }
.radar-center-dot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-vivid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  z-index: 2;
  box-shadow: 0 0 24px var(--accent-glow), 0 0 60px rgba(var(--accent-rgb), 0.15);
  overflow: hidden;
}
.radar-center-dot img { width: 100%; height: 100%; object-fit: cover; }
.radar-sweep {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(var(--accent-rgb), 0.12) 60deg, transparent 120deg);
  animation: radar-spin 4s linear infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }
.radar-dot {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  z-index: 3;
  border: 2px solid var(--bg-primary);
  box-shadow: var(--shadow);
}
.radar-dot:hover {
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 10;
}
.radar-dot img { width: 100%; height: 100%; object-fit: cover; }
.radar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}
.legend-dot.module { background: #A855F7; }
.legend-dot.campus { background: #6C5CE7; }
.legend-dot.far { background: var(--text-tertiary); }

/* ── Proximity Sections ── */
.proximity-section {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.proximity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.proximity-header h3 { font-size: 14px; font-weight: 700; }
.proximity-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 100px;
}
.proximity-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.proximity-scroll::-webkit-scrollbar { display: none; }
.proximity-card {
  flex-shrink: 0;
  width: 90px;
  text-align: center;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 18px;
  transition: all var(--transition);
}
.proximity-card:hover { background: var(--bg-tertiary); }
.proximity-card-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: 4px;
}
.proximity-card-name {
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proximity-card-meta {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Module Chips ── */
.module-chip {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  margin: 2px;
}

.module-chip.clickable {
  border: none;
  cursor: pointer;
}

.module-chip.clickable:hover,
.trend-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
}

.module-feed-modal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module-post-item {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}

.module-post-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.module-post-author {
  font-size: 13px;
  font-weight: 700;
}

.module-post-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.module-post-text {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.module-post-item .post-module-tags {
  padding: 0;
}
.user-card-modules {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
}
.profile-modules {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

/* ── Profile About Tab ── */
.profile-about { padding: 16px; }
.about-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.about-item:last-child { border-bottom: none; }
.about-icon {
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 18px;
  flex-shrink: 0;
}
.about-label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 1px; }
.about-value { font-size: 14px; font-weight: 600; }
.about-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.backend-debug-card {
  align-items: flex-start;
}

.backend-debug-status {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  white-space: pre-line;
}

.backend-debug-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Profile Photo Grid ─── */
.profile-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 4px;
}
.photo-grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
}
.photo-grid-item img,
.photo-grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-grid-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

/* ── Group Page (Facebook-style) ─── */
/* ── Multi-Image Collage Grid ─── */
.collage-grid {
  display: grid;
  gap: 3px;
  border-radius: 18px;
  overflow: hidden;
  margin: 8px 0;
}
.collage-1 { grid-template-columns: 1fr; }
.collage-2 { grid-template-columns: 1fr 1fr; }
.collage-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage-3 .collage-item:first-child { grid-row: 1 / 3; }
.collage-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.collage-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 120px;
  max-height: 200px;
}
.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.collage-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

/* Create Post Collage Preview */
.collage-preview-grid {
  display: grid;
  gap: 3px;
  border-radius: 18px;
  overflow: hidden;
}
.collage-preview-grid.collage-1 { grid-template-columns: 1fr; }
.collage-preview-grid.collage-2 { grid-template-columns: 1fr 1fr; }
.collage-preview-grid.collage-3 { grid-template-columns: 1fr 1fr; }
.collage-preview-grid.collage-3 .collage-preview-item:first-child { grid-row: 1 / 3; }
.collage-preview-grid.collage-4 { grid-template-columns: 1fr 1fr; }
.collage-preview-item {
  position: relative;
  max-height: 140px;
  overflow: hidden;
}

/* ── Purple Enhancement Touches ── */
.post-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.post-card:hover { transform: translateY(-1px); }
.user-card:hover { box-shadow: 0 4px 16px var(--accent-glow); }
.convo-item { transition: all var(--transition); border-left: 3px solid transparent; }
.convo-item:hover { border-left-color: var(--accent); }
.listing-card:hover { box-shadow: 0 4px 16px var(--accent-glow); }
.hdr-avatar:hover { transform: scale(1.05); box-shadow: 0 0 12px var(--accent-glow); }
.profile-cover { background: var(--gradient-deep); }

/* \u2500\u2500 iOS Action Sheet \u2500\u2500 */
.ios-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}
.ios-action-btn:hover { background: var(--bg-tertiary); }

/* \u2500\u2500 Add Photo Button (+ icon) \u2500\u2500 */
.add-photo-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.add-photo-btn:hover { background: var(--accent-glow); }

/* \u2500\u2500 Chat Image Preview \u2500\u2500 */
.chat-img-preview {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  position: relative;
}
.chat-img-preview img {
  max-height: 120px;
  border-radius: 18px;
}
.chat-attach-btn {
  width: 36px;
  height: 36px;
}

/* \u2500\u2500 Message Image \u2500\u2500 */
.msg-image {
  max-width: 220px;
  border-radius: 18px;
  cursor: pointer;
  margin-bottom: 4px;
  display: block;
}
.msg-sent .msg-image {
  margin-left: auto;
}

/* ══════════════════════════════════════════════════
   STORY VIEWER OVERLAY
   ══════════════════════════════════════════════════ */
.story-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--app-safe-top);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
}
.story-viewer-overlay[style*="display: flex"],
.story-viewer-overlay[style*="display:flex"] {
  display: flex !important;
}

.story-progress-bar {
  position: absolute;
  top: var(--app-safe-top);
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  z-index: 310;
}
.story-progress-seg {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  overflow: hidden;
}
.story-progress-seg .story-progress-fill {
  width: 0;
  height: 100%;
  background: #fff;
  border-radius: 3px;
}
.story-progress-seg.done .story-progress-fill { width: 100%; }
.story-progress-seg.active .story-progress-fill {
  animation: storyProgress 5s linear forwards;
}

@keyframes storyProgress {
  from { width: 0; }
  to { width: 100%; }
}

.story-viewer-header {
  position: absolute;
  top: calc(var(--app-safe-top) + 16px);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 310;
}
.story-viewer-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.story-viewer-user b { font-size: 14px; }
.story-viewer-user small { font-size: 11px; opacity: 0.7; }

.story-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.story-viewer-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.story-full-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.story-text-display {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 40px 24px;
  line-height: 1.4;
  max-width: 320px;
  word-wrap: break-word;
}

.story-caption {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 15px;
  padding: 12px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.story-caption.with-reply {
  bottom: 76px;
}

.story-viewer-nav {
  position: absolute;
  inset: calc(var(--app-safe-top) + 80px) 0 40px;
  display: flex;
  z-index: 305;
}
.story-sound-toggle {
  position: absolute;
  right: 16px;
  bottom: 92px;
  z-index: 311;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}
.story-nav-prev,
.story-nav-next {
  flex: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.story-reply-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  z-index: 310;
}
.story-reply-bar input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
}
.story-reply-bar input::placeholder { color: rgba(255,255,255,0.5); }
.story-reply-send {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.story-close-btn {
  -webkit-tap-highlight-color: transparent;
}

.msg-system-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.msg-system-pill-story {
  background: rgba(236, 72, 153, 0.16);
  border: 1px solid rgba(236, 72, 153, 0.26);
  color: #ffe4f1;
}

.msg-system-pill-reaction {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.26);
  color: #deefff;
}

.msg-system-reference {
  margin-top: 6px;
  font-style: normal;
}

.msg-story-reference {
  margin-top: 6px;
  border-left: 2px solid rgba(255,255,255,0.3);
  padding-left: 8px;
  cursor: pointer;
}

.msg-story-reference .msg-system-reference {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* Story item states */
.story-item.has-unseen .story-avatar {
  background: var(--gradient);
}
.story-item.seen .story-avatar {
  background: var(--border);
}
.story-item.no-story .story-avatar {
  background: var(--bg-tertiary);
  padding: 2px;
}

.story-delete-btn {
  margin-left: auto;
  border: none;
  background: rgba(239, 68, 68, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════
   STORY CREATOR MODAL
   ══════════════════════════════════════════════════ */
.story-creator {
  padding: 0;
}
.story-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.story-type-tab {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 18px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.story-type-tab.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.story-type-content {
  display: none;
}
.story-type-content.active {
  display: block;
}
.story-text-preview {
  border-radius: var(--radius-lg);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.story-text-preview.story-caption-mode {
  min-height: 88px;
  padding: 12px 14px;
  align-items: stretch;
}

.story-text-preview textarea {
  width: 100%;
  height: 120px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  resize: none;
  outline: none;
}

.story-text-preview.story-caption-mode textarea {
  height: 64px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
.story-text-preview textarea::placeholder {
  color: rgba(255,255,255,0.6);
}
.story-bg-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.bg-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.bg-dot:hover {
  transform: scale(1.15);
  border-color: rgba(255,255,255,0.4);
}
.story-photo-drop {
  border-radius: var(--radius-lg);
  min-height: 200px;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════
   MESSAGE TABS (DM / Groups)
   ══════════════════════════════════════════════════ */
.msg-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}
.msg-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  text-align: center;
}
.msg-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.archive-fab {
  position: fixed;
  right: 16px;
  bottom: 84px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow);
  z-index: 100;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  opacity: 0.95;
}

.archive-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 22px var(--accent-glow);
}

.archive-fab.active {
  background: linear-gradient(135deg, var(--green), #16a34a);
}

.archive-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--red, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Group avatar icon */
.group-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--accent-light);
  border-radius: var(--radius-full);
}

.group-avatar-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Group chat sender name */
.gchat-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

/* Group header info */
.group-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.group-icon {
  font-size: 28px;
}

/* ══════════════════════════════════════════════════
   UI POLISH & ENHANCEMENTS
   ══════════════════════════════════════════════════ */

/* Smoother card hover */
.post-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Better discover cards */
.discover-card {
  transition: transform 0.2s ease;
}
.discover-card:hover {
  transform: translateY(-3px);
}

/* NWU purple accent enhancements */
.nav-btn.active svg {
  stroke: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent-glow));
}
.nav-btn.active span {
  color: var(--accent);
}

/* Pulse animation for online dot */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,186,136,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(0,186,136,0); }
}
.online-dot {
  animation: pulse-glow 2s ease infinite;
}

/* Better convo-item hover */
.convo-item {
  transition: background var(--transition);
}
.convo-item:hover {
  background: var(--bg-tertiary);
}

/* Prompt action + button styling */
.prompt-action {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: var(--radius-full);
}

/* Stories row scrollbar hidden */
.stories-row {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.messages-stories-row {
  padding-top: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  transition: max-height 0.26s ease, opacity 0.2s ease, padding 0.22s ease, margin 0.22s ease, border-color 0.22s ease;
  max-height: 120px;
  opacity: 1;
  overflow-y: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  will-change: max-height, opacity;
}

.messages-page.stories-collapsed .messages-stories-row {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  border-color: transparent;
}

.create-mention-suggestions {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
  max-height: 220px;
  overflow-y: auto;
}

.create-mention-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
}

.create-mention-item + .create-mention-item {
  border-top: 1px solid var(--border);
}

.create-mention-item:hover {
  background: var(--bg-tertiary);
}

.product-rating-stars {
  display: inline-flex;
  gap: 4px;
}

.product-rate-star {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #7c7c7c;
  cursor: pointer;
  transition: transform 0.16s ease, color 0.16s ease, text-shadow 0.16s ease;
}

.product-rate-star:hover,
.product-rate-star.active {
  color: #facc15;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.45);
}

.product-rate-star:hover {
  transform: scale(1.08);
}

.saved-cart-remove {
  min-width: 30px;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 18px !important;
  line-height: 1;
}

.hustle-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Chat bar polish */
.chat-bar input[type="text"]:focus,
.chat-bar textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Modal animation */
.modal-bg {
  transition: opacity 0.2s ease;
}
.modal-sheet {
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Welcome banner NWU style */
.welcome-banner {
  border-left: 4px solid var(--accent);
}

/* Header glow effect */
#hdr {
  box-shadow: 0 1px 8px rgba(108, 92, 231, 0.08);
}

/* Bottom nav glow for active */
.nav-btn.nav-plus .plus-circle {
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* ══════════════════════════════════════════════════
   ASSIGNMENT GROUPS
   ══════════════════════════════════════════════════ */
.asg-page {
  padding-bottom: 16px;
}

.asg-filter-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.asg-filter-row::-webkit-scrollbar { display: none; }

.asg-card {
  margin: 0 16px 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.asg-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}
.asg-card.is-member {
  border-left: 4px solid var(--accent);
}
.asg-card.is-archived {
  opacity: 0.6;
}

.asg-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.asg-card-module {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 100px;
}

.asg-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.asg-badge.open {
  background: var(--green-light);
  color: var(--green);
}
.asg-badge.full {
  background: var(--orange-light);
  color: var(--orange);
}
.asg-badge.locked {
  background: var(--red-light);
  color: var(--red);
}
.asg-badge.archived {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}

.asg-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.asg-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.asg-card-members {
  display: flex;
  align-items: center;
  gap: -6px;
  margin-bottom: 6px;
}
.asg-card-members .avatar-sm {
  margin-right: -6px;
  border: 2px solid var(--bg-secondary);
}
.asg-more {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-left: 4px;
}

.asg-conflict {
  font-size: 12px;
  color: var(--orange);
  background: var(--orange-light);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

.asg-card-host {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* Assignment Detail Modal */
.asg-detail {
  padding: 0 !important;
}
.asg-detail-title {
  font-size: 20px;
  font-weight: 800;
  padding: 16px 16px 4px;
}
.asg-detail-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border);
}
.asg-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.asg-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.asg-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.asg-member:last-child { border-bottom: none; }
.asg-member.conflict {
  background: var(--orange-light);
  margin: 0 -16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.asg-member.pending {
  justify-content: space-between;
}
.asg-member-info { flex: 1; }
.asg-member-name {
  font-size: 14px;
  font-weight: 600;
}
.asg-host-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 6px;
  border-radius: 100px;
  margin-left: 6px;
}
.asg-member-warn {
  font-size: 11px;
  color: var(--orange);
}

.asg-actions {
  padding: 16px;
}

/* ── Verified Badge ───────────────────────────────── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg-secondary);
}
.profile-name .verified-badge {
  width: 20px;
  height: 20px;
  font-size: 11px;
}
.post-author-name .verified-badge {
  width: 15px;
  height: 15px;
  font-size: 8px;
}

/* ── Preferences Modal ────────────────────────────── */
.pref-modal {
  padding: 0 !important;
  max-height: 75vh;
  overflow-y: auto;
}
.pref-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.pref-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.pref-search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  font-size: 14px;
}
.pref-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.pref-people-list,
.pref-grouped-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
}
.pref-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid transparent;
}
.pref-person:hover {
  background: var(--bg-tertiary);
}
.pref-person.want {
  background: rgba(0, 186, 136, 0.08);
  border-color: var(--green);
}
.pref-person.dontwant {
  background: rgba(255, 107, 107, 0.08);
  border-color: var(--red);
}
.pref-person-info { flex: 1; min-width: 0; }
.pref-person-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pref-person-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pref-choice-indicator {
  font-size: 16px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.pref-person.want .pref-choice-indicator {
  background: var(--green);
  color: #fff;
}
.pref-person.dontwant .pref-choice-indicator {
  background: var(--red);
  color: #fff;
}
.pref-grouped-tag {
  font-size: 11px;
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
  flex-shrink: 0;
}
.pref-grouped-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.pref-actions {
  padding: 16px;
}
.pref-hint {
  color: var(--text-tertiary);
  font-size: 11px;
  margin-top: 8px;
  text-align: center;
}
.pref-empty {
  color: var(--text-tertiary);
  font-size: 13px;
  padding: 12px 0;
  text-align: center;
}

/* ── Admin Panel ──────────────────────────────────── */
.admin-panel {
  padding: 0 !important;
}
.admin-stats {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.admin-stat-card {
  background: var(--bg-tertiary);
  border-radius: 18px;
  padding: 12px 8px;
  text-align: center;
}
.admin-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}
.admin-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.admin-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════
   CAMPUS MAP & EVENTS
   ══════════════════════════════════════════════════ */
.campus-map-container {
  padding-bottom: 16px;
}

.campus-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.campus-map-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.campus-map {
  position: relative;
  width: calc(100% - 32px);
  margin: 0 16px;
  height: 320px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* Subtle grid pattern */
  background-image:
    radial-gradient(circle at 20% 30%, var(--accent-light) 0%, transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(108,92,231,0.05) 0%, transparent 50%);
}

.campus-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}
.campus-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 5;
}

.campus-pin-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.campus-pin.has-events .campus-pin-icon {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.campus-pin.pulse .campus-pin-icon {
  animation: pinPulse 2s infinite;
}

@keyframes pinPulse {
  0%, 100% { box-shadow: 0 2px 8px var(--accent-glow); }
  50% { box-shadow: 0 2px 20px var(--accent-glow), 0 0 0 6px rgba(108,92,231,0.1); }
}

.campus-pin-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.campus-pin-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  text-shadow: 0 1px 2px var(--bg-primary);
}

.campus-events-section {
  padding: 16px;
}
.campus-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.campus-events-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.campus-event-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.campus-event-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.campus-event-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.campus-event-info {
  flex: 1;
  min-width: 0;
}
.campus-event-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}
.campus-event-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.campus-event-going {
  font-size: 11px;
  margin-top: 2px;
  display: flex;
  gap: 8px;
  color: var(--text-tertiary);
}

/* ═══ VOICE RECORDING ═══ */
.voice-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.voice-btn:hover {
  color: var(--accent);
  background: var(--bg-tertiary);
}

.voice-recorder {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  animation: voiceFadeIn 0.2s ease;
}
@keyframes voiceFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.voice-rec-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  animation: recPulse 1s infinite;
}
@keyframes recPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Recording waveform bars animation */
.voice-rec-indicator::after {
  content: '';
  display: flex;
  gap: 4px;
  width: 60px;
  height: 20px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--red) 0px, var(--red) 2px,
      transparent 2px, transparent 5px
    );
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='20'%3E%3Crect x='0' y='6' width='2' height='8' rx='1'%3E%3Canimate attributeName='height' values='8;18;8' dur='0.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='6;1;6' dur='0.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='5' y='3' width='2' height='14' rx='1'%3E%3Canimate attributeName='height' values='14;6;14' dur='0.6s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='3;7;3' dur='0.6s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='10' y='5' width='2' height='10' rx='1'%3E%3Canimate attributeName='height' values='10;18;10' dur='0.7s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='5;1;5' dur='0.7s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='15' y='2' width='2' height='16' rx='1'%3E%3Canimate attributeName='height' values='16;6;16' dur='0.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='2;7;2' dur='0.5s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='20' y='7' width='2' height='6' rx='1'%3E%3Canimate attributeName='height' values='6;16;6' dur='0.9s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='7;2;7' dur='0.9s' repeatCount='indefinite'/%3E%3C/rect%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: recWave 1s ease-in-out infinite alternate;
}

.voice-cancel-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.voice-send-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 6px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Voice message bubble */
.voice-msg-bubble {
  display: none;
}

/* ── iPhone-style Waveform Voice Note Player ─── */
.vn-player {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  min-width: 200px;
  max-width: min(78vw, 380px);
}

.vn-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
}
.msg-received .vn-play-btn {
  background: var(--accent);
  color: #fff;
}
.vn-play-btn:active { transform: scale(0.9); }

.vn-waveform-wrap {
  flex: 1;
  height: 26px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.vn-waveform {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  position: relative;
  z-index: 1;
}

.vn-waveform-bar {
  flex: 1;
  min-width: 2.5px;
  max-width: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  transition: background 0.15s;
}

.msg-received .vn-waveform-bar {
  background: var(--border);
}

/* Played portion overlay — clips the bars to show progress */
.vn-waveform-played {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
  transition: width 0.1s linear;
}
.vn-waveform-played::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.65);
}
.msg-received .vn-waveform-played::after {
  background: var(--accent);
  opacity: 0.5;
}

/* Scrub dot like iMessage */
.vn-scrub-dot {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  z-index: 3;
  opacity: 0;
  box-shadow: 0 0 4px rgba(0,0,0,0.25);
  transition: left 0.1s linear, opacity 0.2s;
}
.msg-received .vn-scrub-dot {
  background: var(--accent);
}
.vn-player.playing .vn-scrub-dot {
  opacity: 1;
}

.vn-time {
  font-size: 11px;
  opacity: 0.7;
  white-space: nowrap;
  min-width: 30px;
  text-align: right;
}

/* ── Repost Badge ─── */
.repost-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 12px;
  margin: -12px -16px 10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.repost-badge svg { flex-shrink: 0; }
.repost-badge span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  font-weight: 600;
}

.quote-embed-repost {
  margin-right: 14px !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

/* ── Shared Post Card in Chat ─── */
.shared-post-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  margin: 4px 0;
  min-width: 160px;
  transition: background 0.2s;
}
.shared-post-card:active {
  background: var(--border);
}

/* ── Story Upload Button ─── */
.story-upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.story-upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══ MEDIA PREVIEW (Create Post) ═══ */
.media-preview {
  position: relative;
  margin: 8px 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

/* ═══ REELS FEED BUTTON ═══ */
.reels-fab {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
  z-index: 100;
  transition: transform 0.2s, box-shadow 0.2s;
}
.reels-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.post-more-btn {
  color: var(--text-tertiary);
  transition: color 0.2s;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-more-btn:hover {
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════
   CUSTOM VIDEO PLAYER — Unino Cinema
   Modern glassmorphism player with smooth animations
   ══════════════════════════════════════════════════════ */

.unino-player {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
}

.unino-player video {
  width: 100%;
  display: block;
  min-height: 200px;
  max-height: 500px;
  object-fit: contain;
  background: #000;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.unino-player.is-loading video {
  opacity: 0;
  visibility: hidden;
}

.unino-player.is-loading .up-big-play,
.unino-player.is-loading .up-controls,
.unino-player.is-loading .up-play-anim {
  opacity: 0;
  pointer-events: none;
}

.unino-player.is-loading .up-loader {
  display: block;
}

/* Gradient overlays for control visibility */
.unino-player::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.unino-player::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.unino-player.show-controls::before,
.unino-player.show-controls::after {
  opacity: 1;
}

/* Center play button (big play) */
.up-big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 68px;
  height: 68px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.up-big-play svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  margin-left: 3px;
}

.unino-player.playing .up-big-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

/* Play/Pause animation overlay */
.up-play-anim {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 56px;
  height: 56px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
}

.up-play-anim.pop {
  animation: upPlayPop 0.5s ease forwards;
}

@keyframes upPlayPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  60% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

.up-play-anim svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* Skip indicator (double tap) */
.up-skip-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.up-skip-indicator.left { left: 20%; }
.up-skip-indicator.right { right: 20%; }

.up-skip-indicator.show {
  animation: upSkipPop 0.6s ease forwards;
}

@keyframes upSkipPop {
  0% { opacity: 0; transform: translateY(-50%) scale(0.8); }
  20% { opacity: 1; transform: translateY(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-50%) scale(1); }
}

/* Loading spinner */
.up-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: none;
}

.up-loader.active {
  display: block;
}

.up-loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Controls bar */
.up-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0 12px 10px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.unino-player.show-controls .up-controls {
  opacity: 1;
  pointer-events: auto;
}

/* Progress bar area */
.up-progress-wrap {
  position: relative;
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
}

.up-progress-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: visible;
  transition: height 0.15s ease;
}

.up-progress-wrap:hover .up-progress-track {
  height: 6px;
}

.up-progress-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
  transition: width 0.2s ease;
}

.up-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.05s linear;
}

.up-progress-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
  box-shadow: 0 0 6px rgba(0,0,0,0.4), 0 0 12px var(--accent-glow);
  z-index: 2;
}

.up-progress-wrap:hover .up-progress-thumb {
  transform: translate(-50%, -50%) scale(1);
}

/* Hover time preview */
.up-time-preview {
  position: absolute;
  bottom: 24px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.up-progress-wrap:hover .up-time-preview {
  opacity: 1;
}

/* Controls row */
.up-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.up-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.up-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.1);
}

.up-btn:active {
  transform: scale(0.95);
}

.up-btn svg {
  width: 20px;
  height: 20px;
}

.up-btn.play-btn svg {
  width: 22px;
  height: 22px;
}

/* Time display */
.up-time {
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.up-time-sep {
  color: rgba(255,255,255,0.4);
  margin: 0 2px;
}

/* Spacer */
.up-spacer {
  flex: 1;
}

/* Volume control */
.up-vol-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.up-vol-slider-wrap {
  width: 0;
  overflow: hidden;
  transition: width 0.2s ease;
}

.up-vol-wrap:hover .up-vol-slider-wrap,
.up-vol-wrap.active .up-vol-slider-wrap {
  width: 70px;
}

.up-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.up-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.up-vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Speed badge */
.up-speed-badge {
  color: rgba(255,255,255,0.75);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: rgba(255,255,255,0.05);
}

.up-speed-badge:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

/* Top bar (title area) */
.up-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.unino-player.show-controls .up-top-bar {
  opacity: 1;
  pointer-events: auto;
}

.up-top-title {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.up-download-btn {
  width: 34px;
  height: 34px;
  margin-left: 10px;
  background: rgba(0,0,0,0.35);
}

/* PiP badge */
.up-pip-tag {
  background: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  display: none;
}

/* Fullscreen player adjustments */
.unino-player:fullscreen,
.unino-player:-webkit-full-screen {
  border-radius: 0;
}

.unino-player:fullscreen video,
.unino-player:-webkit-full-screen video {
  max-height: 100vh;
  height: 100vh;
}

.unino-player:fullscreen .up-controls {
  padding: 0 24px 20px;
}

/* Double-tap zones */
.up-tap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 33%;
}

.up-tap-zone.left { left: 0; }
.up-tap-zone.center { left: 33%; width: 34%; }
.up-tap-zone.right { right: 0; }

/* Ripple effect on double-tap */
.up-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  animation: upRipple 0.5s ease-out forwards;
  pointer-events: none;
  z-index: 5;
}

@keyframes upRipple {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 120px; height: 120px; opacity: 0; margin-top: -60px; margin-left: -60px; }
}

/* Mobile touch optimizations */
@media (max-width: 768px) {
  .up-btn {
    width: 32px;
    height: 32px;
  }

  .up-btn svg {
    width: 18px;
    height: 18px;
  }

  .up-big-play {
    width: 58px;
    height: 58px;
  }

  .up-big-play svg {
    width: 24px;
    height: 24px;
  }

  .up-time {
    font-size: 11px;
  }

  .up-speed-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .up-vol-wrap {
    display: none;
  }

  .up-controls {
    padding: 0 10px 8px;
  }
}

/* Player in fullscreen reels mode */
.unino-player.reels-mode {
  height: 100%;
  border-radius: 0;
}

.unino-player.reels-mode video {
  height: 100%;
  max-height: 100%;
  object-fit: cover;
}

/* Keyboard focus outlines */
.up-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.up-progress-wrap:focus-visible {
  outline: 2px solid var(--accent);
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════
   Share & Enhanced Comments UI
   ══════════════════════════════════════════════════ */
.comment-item {
  display: flex !important;
  gap: 12px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.comment-item.comment-long-pressing {
  transform: scale(0.985);
  opacity: 0.82;
}
.comment-avatar-col {
  flex-shrink: 0;
}
.comment-avatar-col .avatar-sm {
  width: 36px; height: 36px;
  font-size: 14px;
}
.comment-content-col {
  flex: 0 1 calc(100% - 54px);
  max-width: calc(100% - 54px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.comment-bubble.enhanced {
  background: var(--bg-tertiary);
  padding: 10px 14px;
  border-radius: 18px;
  border-top-left-radius: 4px;
  margin-bottom: 4px;
  position: relative;
  flex: 0 1 auto;
  width: fit-content;
  max-width: min(84vw, 520px);
}
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}
.comment-author {
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-primary);
}
.comment-author:hover { text-decoration: underline; }
.comment-text {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
}
.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 4px;
  margin-bottom: 8px;
  width: fit-content;
  max-width: 100%;
}
.comment-time {
  font-size: 11px;
  color: var(--text-tertiary);
}
.c-act {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s;
}
.c-act:hover { color: var(--text-primary); }
.c-act.liked { color: var(--red); }
.c-act.reacted { color: var(--accent); }

.c-act.like-only {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 2px 6px 2px 2px;
  border-radius: 999px;
}

.c-act.like-only.has-emoji {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.10);
}

.c-act.like-only svg {
  flex-shrink: 0;
}

.comment-like-count {
  font-size: 12px;
  line-height: 1;
}

.comment-like-emoji {
  font-size: 15px;
  line-height: 1;
}

.create-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.create-author-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.create-author-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.create-anon-toggle {
  padding: 7px 10px;
  font-size: 12px;
}

.create-anon-toggle.anon-active {
  border-color: rgba(217, 70, 239, 0.45);
  color: #d946ef;
}

.address-suggestion-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text-primary);
  border: none;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}

.address-suggestion-item:hover {
  background: var(--bg-tertiary);
}

.radar-search-wrap {
  margin-bottom: 8px;
}

.radar-go-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.radar-suggestions {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  max-height: 220px;
  overflow-y: auto;
}

.radar-suggestion-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text-primary);
  padding: 10px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.radar-suggestion-item + .radar-suggestion-item {
  border-top: 1px solid var(--border);
}

.radar-suggestion-item:hover {
  background: var(--bg-tertiary);
}

.radar-suggestion-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.radar-suggestion-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.radar-suggestion-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.radar-suggestion-main {
  font-size: 13px;
  font-weight: 600;
}

.radar-suggestion-sub {
  font-size: 11px;
  color: var(--text-tertiary);
}

.comment-input-wrap.modern {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
  padding-top: 10px;
}

.comment-input-wrap.modern > button {
  align-self: flex-end;
}

.comment-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.comment-attach-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--accent);
}

.comment-input-wrap textarea,
.reel-comments-input textarea {
  flex: 1;
  min-height: 42px;
  max-height: 96px;
  resize: none;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.35;
}

.comment-img-preview {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-img-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.comment-img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-inline-image {
  margin-top: 8px;
  width: auto;
  max-width: min(240px, 72vw);
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: contain;
  cursor: pointer;
  display: block;
}

.reel-comments-panel {
  max-height: 72vh;
}

.reel-comments-input {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.reel-comments-input .send-btn {
  align-self: flex-end;
}

.reel-comment-main {
  display: flex;
  flex-direction: column;
  color: rgba(255,255,255,0.92);
}

.reel-comment-item .c-act {
  color: rgba(255,255,255,0.82);
}

.reel-comment-item .c-act.liked {
  color: #ff6b81;
}

/* Threading visual — connected lines */
.comment-replies {
  margin-top: 4px;
  padding-left: 18px;
  margin-left: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: none;
}

.toggle-replies-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 4px 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
}
.toggle-replies-btn:hover {
  color: var(--accent-hover);
}
.toggle-replies-btn svg {
  transition: transform 0.2s;
}
.toggle-replies-btn.expanded svg {
  transform: rotate(180deg);
}
.comment-replies::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 18px;
  width: 2px;
  background: var(--accent-light, rgba(108,92,231,0.25));
  border-radius: 2px;
}
.comment-replies .comment-item {
  position: relative;
  margin-bottom: 12px;
  padding: 0;
}
.comment-replies .comment-item::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 18px;
  width: 14px;
  height: 2px;
  background: var(--accent-light, rgba(108,92,231,0.25));
}
.reply-item {
  margin-bottom: 0;
}
.reply-item .comment-bubble.enhanced {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

/* Share Friends List */
.share-friend-item {
  transition: background 0.2s;
}
.share-friend-item:active {
  transform: scale(0.98);
}

.share-external-btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.share-capture-stage {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 620px;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
}

.share-card-capture {
  width: 560px;
  background: radial-gradient(circle at 12% 0%, #eef4ff 0%, #f8f1ff 34%, #f4f7ff 100%);
  border-radius: 30px;
  border: 1px solid rgba(72, 86, 122, 0.12);
  padding: 20px;
  color: #1f2937;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 20px 45px rgba(21, 27, 43, 0.2);
}

.share-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.share-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-card-author-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.share-card-author-meta strong {
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.share-card-author-meta span {
  font-size: 11px;
  color: #6b7280;
}

.share-card-brand {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #334155;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  padding: 5px 11px;
}

.share-card-text {
  font-size: 19px;
  line-height: 1.45;
  font-weight: 560;
  color: #0f172a;
  margin-bottom: 12px;
  word-break: break-word;
}

.share-card-text-empty {
  color: #64748b;
  font-style: italic;
}

.share-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.share-card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(59, 84, 154, 0.22);
  background: rgba(255, 255, 255, 0.75);
  color: #25416f;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
}

.share-card-media-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 12px;
  min-height: 210px;
  background: #dbe7f8;
}

.share-card-media {
  width: 100%;
  max-height: 520px;
  display: block;
  object-fit: cover;
}

.share-card-video-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
}

.share-card-video-placeholder {
  min-height: 210px;
  border-radius: 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(135deg, #0f172a 0%, #27364f 100%);
  color: #e5edff;
}

.share-card-video-placeholder span {
  font-size: 34px;
  line-height: 1;
}

.share-card-video-placeholder p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.4px;
}

.share-card-quote {
  border: 1px solid rgba(72, 86, 122, 0.2);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}

.share-card-quote-head {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.share-card-quote-text {
  font-size: 13px;
  line-height: 1.4;
  color: #1e293b;
  margin-bottom: 8px;
}

.share-card-quote-media {
  width: 100%;
  border-radius: 12px;
  max-height: 230px;
  object-fit: cover;
  display: block;
}

.share-card-foot {
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════════════
   VIDEO HUB (wraps LIVE + CLIPS tabs)
   ══════════════════════════════════════════════════ */
.video-hub {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  flex-direction: column;
}
.vh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--app-safe-top, env(safe-area-inset-top, 0px)) + 8px) 12px 8px;
  background: rgba(0,0,0,0.85);
  z-index: 40;
  flex-shrink: 0;
}
.vh-close {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none;
  color: #fff; font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.vh-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 20px; padding: 3px;
}
.vh-tab {
  padding: 7px 20px; border-radius: 17px;
  background: none; border: none; color: rgba(255,255,255,0.5);
  font-size: 13px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.5px; transition: all 0.2s;
}
.vh-tab.active {
  background: var(--accent); color: #fff;
}
.vh-body {
  flex: 1; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  min-height: 0;
}

/* ── Reels / Clips (inside Video Hub) ── */
.reels-container {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  flex-direction: column;
}
/* Old reels header hidden - Video Hub header used instead */
.reels-header {
  display: none;
}
.reels-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reels-sound-btn {
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
}
.reels-header h3 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.reels-close-btn {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.reels-close-btn:hover { background: rgba(255,255,255,0.25); }

.reels-scroll {
  flex: 1;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  height: 0;
  min-height: 0;
}
.reels-scroll::-webkit-scrollbar { display: none; }

.reel-slide {
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
}
.reel-video {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: contain;
  background: #000;
}
.reel-play-toggle {
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: pointer;
}
.reel-play-toggle.paused::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 32px;
}
.reel-overlay-bottom {
  position: relative;
  padding: 10px 80px 12px 16px;
  z-index: 10;
  pointer-events: auto;
  flex-shrink: 0;
}
.reel-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
.reel-author-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.reel-caption {
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Right side action buttons */
.reel-actions {
  position: absolute;
  right: 12px;
  bottom: 60px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.reel-act-btn {
  background: none;
  border: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s;
}
.reel-act-btn:active { transform: scale(0.85); }
.reel-act-btn span {
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.reel-act-btn.liked svg {
  filter: drop-shadow(0 0 6px rgba(255,71,87,0.6));
  animation: heartPop 0.3s ease;
}

.reel-act-btn.reacted span {
  color: #ffd166;
}
@keyframes heartPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ─── Reel Inline Comments Panel ───────────── */
.reel-comments-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  max-height: 55vh;
  background: rgba(0,0,0,0.92);
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  z-index: 1200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: slideUpPanel 0.25s ease-out;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.video-hub.reel-comments-open .reel-slide {
  padding-bottom: 44vh;
}

.video-hub.reel-comments-open .reel-video {
  flex: 0 0 auto;
  height: clamp(220px, 56vh, 68vh);
  min-height: 220px;
}

.reel-comments-panel.is-loading {
  opacity: 0.94;
}

.reel-comments-panel:not(.is-open) {
  transform: translateY(10px);
  opacity: 0;
}

@media (min-width: 900px) {
  .video-hub.reel-comments-open .reel-slide {
    padding-bottom: 0;
    padding-right: min(420px, 42vw);
  }

  .video-hub.reel-comments-open .reel-video {
    width: calc(100% - min(420px, 42vw));
    height: 100%;
    margin-right: auto;
  }

  .video-hub.reel-comments-open .reel-comments-panel {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(420px, 42vw);
    max-height: 100vh;
    border-radius: 0;
  }
}
@keyframes slideUpPanel {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.reel-comments-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.reel-comments-header h3 {
  color: #fff; font-size: 15px; margin: 0;
}
.reel-comments-header .icon-btn {
  color: rgba(255,255,255,0.7); font-size: 18px; background: none; border: none; cursor: pointer;
}
.reel-comments-list {
  flex: 1; overflow-y: auto; padding: 10px 16px;
  overscroll-behavior: contain;
}
.reel-comment-item {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 14px;
}
.reel-comment-item .avatar-xs { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.reel-comment-item div { color: rgba(255,255,255,0.9); }
.reel-comments-input {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.1);
}
.reel-comments-input input {
  flex: 1; background: rgba(255,255,255,0.1); border: none;
  border-radius: 20px; padding: 9px 14px; color: #fff; font-size: 14px; outline: none;
}
.reel-comments-input input::placeholder { color: rgba(255,255,255,0.4); }
.reel-comments-input .send-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); border: none; display: flex;
  align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}

/* ─── Tab Badge (Messages tabs) ───────────── */
.tab-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9px;
  min-width: 16px;
  text-align: center;
  margin-left: 4px;
  display: none;
}

/* Reels FAB on feed */
.reels-fab {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #A855F7);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(108,92,231,0.5);
  z-index: 100;
  transition: transform 0.2s;
}
.reels-fab:active { transform: scale(0.9); }

/* Final overrides for upgraded comments/reel UX */
.reel-comments-panel {
  max-height: 72vh;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.reel-comments-header {
  border-bottom: 1px solid var(--border);
}

.reel-comments-header h3,
.reel-comments-header .icon-btn {
  color: var(--text-primary);
}

.reel-comments-list {
  padding: 12px 14px;
}

.reel-input-wrap {
  position: sticky;
  bottom: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 6px 12px calc(8px + env(safe-area-inset-bottom));
}

.comment-reply-to {
  margin-top: 3px;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.comment-input-wrap.modern {
  gap: 5px;
  background: var(--bg-secondary);
}

.comment-chat-bar {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.comment-chat-bar textarea {
  flex: 1;
  padding: 9px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-primary);
}

.comment-chat-bar .comment-attach-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.comment-chat-bar .send-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
}

.comment-chat-bar .send-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.reel-comment-main,
.reel-comment-item .reel-comment-main,
.reel-comment-item .reel-comment-main span,
.reel-comment-item .reel-comment-main div {
  color: var(--text-primary) !important;
}

.reel-comment-item .c-act {
  color: var(--text-secondary);
}

.reel-comment-item .c-act.liked {
  color: var(--red);
}

.radar-go-btn {
  display: none;
}

.map-route-panel {
  padding: 0 12px 12px;
}
.map-route-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(139, 92, 246, 0.08));
  box-shadow: var(--shadow);
}
.map-route-copy {
  flex: 1;
  min-width: 0;
}
.map-route-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}
.map-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.map-route-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.map-route-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.map-popup-card {
  min-width: 150px;
}
.map-popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.map-popup-btn {
  border: none;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
  cursor: pointer;
}
.map-popup-btn.secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
@media (max-width: 640px) {
  .map-route-card {
    flex-direction: column;
  }
  .map-route-actions {
    width: 100%;
    flex-direction: row;
    justify-content: stretch;
  }
  .map-route-actions .btn-outline,
  .map-route-actions .btn-primary {
    flex: 1;
  }
}

/* ─── Leaflet Map Pins ───────────── */
.leaflet-emoji-pin { background: none !important; border: none !important; }
.map-pin-wrap {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.map-pin-emoji {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.map-pin-count {
  position: absolute; top: -4px; right: -6px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
.map-pin-wrap.has-events .map-pin-emoji {
  animation: mapPulse 2s infinite;
}
@keyframes mapPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.leaflet-user-pin { background: none !important; border: none !important; }
.map-user-pin {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--accent);
  overflow: hidden; background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 9px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.map-user-pin img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Leaflet popup overrides */
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
}
.leaflet-popup-content { margin: 10px 14px !important; }

/* ─── Radar Map Overlay ───────────── */
.radar-map-wrap {
  position: relative;
  margin: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.radar-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px; height: 280px;
  pointer-events: none;
  z-index: 400;
}
.radar-overlay .radar-ring {
  position: absolute;
  border: 1px solid rgba(108,92,231,0.15);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}
.radar-overlay .r1 { width: 90px; height: 90px; }
.radar-overlay .r2 { width: 170px; height: 170px; }
.radar-overlay .r3 { width: 260px; height: 260px; }
.radar-sweep-anim {
  position: absolute;
  top: 50%; left: 50%;
  width: 130px; height: 130px;
  transform-origin: 0 0;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(108,92,231,0.2) 30deg, transparent 60deg);
  animation: radarSweep 4s linear infinite;
  border-radius: 0 130px 0 0;
  pointer-events: none;
}
@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Map user pin proximity colors */
.map-user-pin.pin-module { border-color: #34D399; }
.map-user-pin.pin-campus { border-color: var(--accent); }
.map-user-pin.pin-far { border-color: #F59E0B; }
.map-user-pin.map-me-pin {
  width: 36px; height: 36px;
  border: 3px solid var(--accent);
  box-shadow: 0 0 12px rgba(108,92,231,0.5);
  font-size: 12px;
}

/* ─── Anonymous Mode ───────────── */
.anon-toggle-btn {
  position: relative;
  transition: all 0.3s ease;
}
.anon-pref-btn {
  transition: all 0.2s ease;
}
.anon-pref-btn.pref-off {
  color: var(--text-tertiary);
}
.anon-pref-btn.pref-on {
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 50%;
}
.anon-toggle-btn.anon-active {
  color: #D946EF;
  background: rgba(217, 70, 239, 0.15);
  border-radius: 50%;
}
.anon-toggle-btn.anon-active svg { stroke: #D946EF; }

.anon-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7C3AED, #D946EF) !important;
  font-size: 16px;
  border-radius: 50%;
  color: #fff;
}

.anon-reveal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(139, 124, 247, 0.1);
  border-bottom: 1px solid rgba(139, 124, 247, 0.2);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  gap: 8px;
  flex-shrink: 0;
}
.anon-reveal-banner.reveal-request {
  background: rgba(217, 70, 239, 0.12);
  border-color: rgba(217, 70, 239, 0.25);
  color: #D946EF;
}
.anon-reveal-banner.reveal-waiting {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
  color: #F59E0B;
}
.anon-reveal-banner.reveal-success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
  color: #34D399;
  animation: revealFlash 0.6s ease;
}
.anon-reveal-banner.reveal-available {
  background: linear-gradient(90deg, rgba(108,92,231,0.08), rgba(217,70,239,0.08));
}
@keyframes revealFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Neon Map Theme Overrides ───────────── */
.radar-map-wrap,
.campus-map-container #leaflet-map {
  border: 1px solid rgba(139, 124, 247, 0.3);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.15), inset 0 0 20px rgba(108, 92, 231, 0.05);
}
[data-theme="dark"] .radar-map-wrap,
[data-theme="dark"] .campus-map-container #leaflet-map {
  box-shadow: 0 0 30px rgba(139, 124, 247, 0.2), 0 0 60px rgba(108, 92, 231, 0.08);
}
.leaflet-popup-content-wrapper {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3) !important;
  border: 1px solid rgba(139, 124, 247, 0.25) !important;
}
.leaflet-popup-tip {
  background: var(--bg-secondary) !important;
  border: 1px solid rgba(139, 124, 247, 0.25) !important;
  border-top: none !important;
  border-left: none !important;
}
.leaflet-control-zoom a {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(139, 124, 247, 0.2) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--accent) !important;
  color: #fff !important;
}
.map-pin-wrap.has-events .map-pin-emoji {
  filter: drop-shadow(0 0 8px rgba(139, 124, 247, 0.6));
}
.map-user-pin {
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.4), 0 2px 8px rgba(0,0,0,0.3);
}
.map-user-pin.pin-module {
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.4), 0 2px 8px rgba(0,0,0,0.3);
}
.map-user-pin.map-me-pin {
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.6), 0 0 40px rgba(108, 92, 231, 0.2);
}
.map-pin-count {
  box-shadow: 0 0 8px rgba(139, 124, 247, 0.5);
}

.radar-overlay .radar-ring {
  border-color: rgba(139, 124, 247, 0.2);
  box-shadow: 0 0 8px rgba(139, 124, 247, 0.08);
}
.radar-sweep-anim {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(139, 124, 247, 0.25) 30deg, transparent 60deg);
}

/* ─── Event Image Preview Grid (Create Event) ───────────── */
.ev-img-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.ev-img-thumb {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 1;
}
.ev-img-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ev-img-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ev-img-remove:hover { background: #EF4444; }

/* ─── Event Detail Images ───────────── */
.ev-detail-images {
  display: grid;
  gap: 4px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
}
.ev-detail-images.single {
  grid-template-columns: 1fr;
}
.ev-detail-images.grid {
  grid-template-columns: 1fr 1fr;
}
.ev-detail-images img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  max-height: 220px;
}

/* ─── Anonymous Message Button ───────────── */
.anon-msg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #7C3AED, #D946EF);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.anon-msg-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

/* ─── Event Scroll Cards (Radar) ───────────── */
.event-scroll-card {
  flex-shrink: 0;
  width: 110px;
  text-align: center;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 18px;
  transition: all var(--transition);
}
.event-scroll-card:hover { background: var(--bg-tertiary); }
.event-scroll-thumb {
  width: 80px; height: 80px;
  border-radius: 18px;
  object-fit: cover;
  margin-bottom: 6px;
}
.event-scroll-icon {
  width: 80px; height: 80px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 6px;
}
.event-scroll-title {
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-scroll-meta {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Create Modal Tabs ───────────── */
.create-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}
.create-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.create-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Avatar XL (for preview cards) ───────────── */
.avatar-xl {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  margin: 0 auto;
}
.avatar-xl img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ══════════════════════════════════════════════════
   LIVE STREAMING STYLES
   ══════════════════════════════════════════════════ */
.live-tab-content {
  padding: 16px;
  overflow-y: auto;
  height: 100%;
  -webkit-overflow-scrolling: touch;
}
.go-live-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 14px 20px;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #fff; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  margin-bottom: 20px; transition: transform 0.15s;
}
.go-live-btn:active { transform: scale(0.97); }
.go-live-icon { font-size: 22px; }

.live-stream-card {
  background: var(--bg-secondary, #1a1a2e);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform 0.15s;
}
.live-stream-card:active { transform: scale(0.98); }
.live-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  display: flex; align-items: center; justify-content: center;
}
.live-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.live-card-placeholder {
  display: flex; align-items: center; justify-content: center;
}
.live-badge-overlay {
  position: absolute;
  top: 10px; left: 10px;
  display: flex; gap: 8px; align-items: center;
}
.live-badge {
  background: #ff4757;
  color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 8px; border-radius: 6px;
  letter-spacing: 0.3px;
}
.live-viewers {
  background: rgba(0,0,0,0.6);
  color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  backdrop-filter: blur(4px);
}
.live-card-info { padding: 12px 14px; }
.live-card-row {
  display: flex; align-items: center; gap: 10px;
}
.live-card-title {
  color: #fff; font-size: 15px; font-weight: 600;
  line-height: 1.3;
}
.live-card-host {
  color: rgba(255,255,255,0.55); font-size: 12px;
  margin-top: 2px;
}

/* Go Live Modal */
.go-live-modal {
  padding: 4px 0;
}
.go-live-modal h2 {
  margin: 0 0 16px; font-size: 20px;
}
.live-camera-preview {
  position: relative;
  width: 100%; aspect-ratio: 16/9;
  background: #111; border-radius: 12px;
  overflow: hidden; margin: 14px 0;
}
.live-camera-preview video {
  width: 100%; height: 100%; object-fit: cover;
}
.live-preview-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: 13px;
}
.live-modal-actions {
  display: flex; gap: 10px; margin-top: 10px;
}
.live-modal-actions .btn-secondary,
.live-modal-actions .btn-primary {
  flex: 1; padding: 12px; border-radius: 12px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  border: none;
}
.live-modal-actions .btn-secondary {
  background: var(--bg-tertiary); color: var(--text-primary);
}
.live-modal-actions .btn-primary,
.go-live-start-btn {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #fff;
}

/* Live Viewer / Host Screen */
.live-viewer-screen {
  position: relative;
  width: 100%; height: 100%;
  background: #000;
  display: flex; flex-direction: column;
}
.live-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}

.live-video.viewer-mirrored {
  transform: scaleX(-1);
}

/* Mirror front camera for host so movement feels natural */
.live-video.host-cam {
  transform: scaleX(-1);
  object-fit: cover;
}
.live-connecting-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
  z-index: 20;
}
.live-top-bar {
  position: relative; z-index: 15;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}
.live-info-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.55);
  padding: 6px 12px; border-radius: 20px;
  color: #fff; font-size: 13px; font-weight: 700;
  backdrop-filter: blur(6px);
}
.live-dot {
  color: #ff4757; font-size: 10px;
  animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.live-viewer-count { font-variant-numeric: tabular-nums; }
.end-live-btn {
  background: #ff4757; color: #fff;
  border: none; border-radius: 20px;
  padding: 7px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.leave-live-btn {
  background: rgba(255,255,255,0.15);
  color: #fff; border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* Live comments overlay */
.live-comments-overlay {
  position: relative; z-index: 10;
  flex: 1; overflow-y: auto;
  padding: 10px 14px;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}
.live-comment {
  background: rgba(0,0,0,0.45);
  color: #fff; padding: 6px 12px;
  border-radius: 16px; margin-bottom: 6px;
  font-size: 13px; line-height: 1.4;
  max-width: 80%; width: fit-content;
  backdrop-filter: blur(4px);
  pointer-events: auto;
  animation: fadeInUp 0.2s ease-out;
}
.live-comment strong {
  color: var(--accent-light, #a29bfe);
  margin-right: 6px; font-weight: 700;
}
.live-comment.own strong { color: #ffd166; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Live bottom bar */
.live-bottom-bar {
  position: relative; z-index: 15;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.live-comment-input-wrap {
  flex: 1; display: flex; align-items: center;
  background: rgba(255,255,255,0.12);
  border-radius: 24px; padding: 4px 4px 4px 14px;
}
.live-comment-input-wrap input {
  flex: 1; background: none; border: none;
  color: #fff; font-size: 14px; outline: none;
  padding: 8px 0;
}
.live-comment-input-wrap input::placeholder { color: rgba(255,255,255,0.4); }
.live-send-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.live-react-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none;
  font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.live-react-btn:active { transform: scale(1.3); }

.live-view-mirror-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-flip-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.live-flip-btn:active { transform: rotate(180deg); }

/* Floating hearts */
.live-floating-heart {
  position: absolute;
  font-size: 28px;
  animation: floatHeart 2s ease-out forwards;
  pointer-events: none;
  bottom: 60px;
}
@keyframes floatHeart {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-200px) scale(0.5); }
}

/* ── Update Banner ── */
#update-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #6C5CE7; color: #fff;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 13px; z-index: 99999;
  box-shadow: 0 -2px 8px rgba(0,0,0,.2);
}
#update-banner span { flex: 1; }
#update-banner a {
  background: #fff; color: #6C5CE7; padding: 5px 12px;
  border-radius: 6px; font-weight: 600; text-decoration: none;
  white-space: nowrap; font-size: 12px;
}
#update-banner button {
  background: none; border: none; color: #fff; font-size: 20px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}


.brand-logo-shell {
  overflow: hidden;
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.brand-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo-xl { width: 88px; height: 88px; }
.brand-logo-lg { width: 78px; height: 78px; }
.brand-logo-sm { width: 32px; height: 32px; }

.splash-logo.brand-logo-shell,
.auth-emoji.brand-logo-shell {
  overflow: hidden;
  font-size: 0;
  animation: bounce 1s ease infinite;
}

.hdr-logo .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.feed-live-spotlight {
  margin-bottom: 18px;
}

.feed-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.feed-live-title {
  font-size: 15px;
  font-weight: 800;
}

.feed-live-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.feed-live-card {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feed-live-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--accent-rgb), 0.28);
}

.feed-live-card-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.feed-live-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
}

.feed-live-media img,
.feed-live-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-live-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 10, 20, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.feed-live-copy {
  padding: 14px;
}

.feed-live-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.feed-live-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.event-chat-banner {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.10), var(--bg-secondary));
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}

.event-chat-banner.clickable,
.group-header-info.clickable {
  cursor: pointer;
}

.event-chat-banner-media {
  min-height: 92px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.event-chat-banner-media img,
.event-chat-banner-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-chat-banner-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.event-chat-banner-copy {
  min-width: 0;
}

.event-chat-banner-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.event-chat-banner-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.event-chat-banner-members {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.event-chat-attendees {
  display: flex;
  align-items: center;
}

.event-chat-attendee {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  margin-right: -8px;
}

.event-chat-attendee .avatar-xs {
  border: 2px solid var(--bg-secondary);
  box-shadow: var(--shadow-sm);
}

.event-chat-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .event-chat-banner {
    grid-template-columns: 1fr;
  }

  .event-chat-banner-media {
    min-height: 160px;
  }
}


.splash-status{margin-top:10px;color:var(--text-secondary);font-size:13px;max-width:260px;text-align:center}
.app-loading-shell{padding:32px 18px;min-height:50vh;display:flex;align-items:center;justify-content:center}
.app-loading-card{padding:24px 20px;border:1px solid var(--border);background:var(--bg-secondary);border-radius:24px;box-shadow:var(--shadow);text-align:center;max-width:320px}
.app-loading-card .inline-spinner{width:28px;height:28px;color:var(--accent);margin-bottom:14px}
#radar-map{border-radius:22px;overflow:hidden;box-shadow:var(--shadow)}
.maplibre-custom-marker{display:flex;align-items:center;justify-content:center}
.route-endpoint{padding:6px 10px;border-radius:999px;background:rgba(17,24,39,.92);color:#fff;font-size:11px;font-weight:700;box-shadow:0 8px 24px rgba(0,0,0,.22)}
.route-endpoint.route-start{background:#16a34a}
.route-endpoint.route-end{background:linear-gradient(135deg,#6C5CE7,#A855F7)}
.route-focus-active .proximity-section,.route-focus-active .radar-legend{display:none}
.chat-plus-wrap{position:relative;display:flex;align-items:center}
.chat-plus-menu{position:absolute;left:0;bottom:52px;display:grid;gap:8px;min-width:150px;padding:10px;border-radius:16px;background:var(--bg-secondary);border:1px solid var(--border);box-shadow:var(--shadow);z-index:40}
.chat-plus-option{border:none;background:var(--bg-tertiary);color:var(--text-primary);padding:10px 12px;border-radius:12px;text-align:left;font-weight:600}
.poll-card{margin:12px 0;padding:12px;border-radius:18px;background:var(--bg-secondary);border:1px solid var(--border)}
.poll-question{font-weight:700;margin-bottom:10px}
.poll-options{display:grid;gap:8px}
.poll-option{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--border);background:var(--bg-tertiary);color:var(--text-primary);padding:10px 12px;border-radius:14px;font-weight:600}
.poll-option.active{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);background:color-mix(in srgb, var(--accent) 14%, var(--bg-tertiary))}
.poll-footer{margin-top:8px;font-size:12px;color:var(--text-secondary)}
.chat-location-card{margin:10px 0;padding:12px;border-radius:16px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);text-align:left}
.chat-location-title{font-weight:700}
.chat-location-sub{font-size:12px;color:var(--text-secondary);margin-top:4px}


/* v4 radar/chat/poll polish */
.radar-overlay{position:absolute;left:50%;top:50%;width:0;height:0;pointer-events:none;z-index:4;transform:none}
.radar-overlay .radar-ring{position:absolute;top:0;left:0;transform:translate(-50%,-50%);border:1px solid rgba(108,92,231,.16);background:radial-gradient(circle, rgba(108,92,231,.05), transparent 70%)}
.radar-sweep-anim{position:absolute;top:0;left:0;width:130px;height:130px;transform-origin:0 0;background:conic-gradient(from 0deg, transparent 0deg, rgba(108,92,231,.18) 32deg, transparent 68deg);animation:radarSweep 4s linear infinite;border-radius:0 130px 0 0}
.map-pin-wrap{position:relative;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 10px 20px rgba(108,92,231,.24))}
.map-pin-wrap.is-floating{animation:pinFloat 2.8s ease-in-out infinite}
.map-pin-emoji{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:16px;background:linear-gradient(135deg,#6C5CE7,#A855F7);color:#fff;font-size:20px;border:2px solid rgba(255,255,255,.82);box-shadow:0 8px 18px rgba(108,92,231,.3)}
.map-pin-label{position:absolute;left:50%;bottom:46px;transform:translateX(-50%);white-space:nowrap;padding:5px 10px;border-radius:999px;background:rgba(17,24,39,.86);color:#fff;font-size:11px;font-weight:700;letter-spacing:.01em}
@keyframes pinFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
.chat-plus-menu{left:0;bottom:56px;min-width:184px;padding:10px;border-radius:22px;background:color-mix(in srgb, var(--bg-secondary) 95%, white 5%);backdrop-filter:blur(16px);box-shadow:0 18px 40px rgba(17,24,39,.16);opacity:0;transform:translateY(8px) scale(.98);pointer-events:none;transition:opacity .12s ease,transform .12s ease;display:grid}.chat-plus-menu.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
.chat-plus-option.modern{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:var(--bg-tertiary);border:1px solid transparent;color:var(--text-primary)}
.chat-plus-option.modern span:last-child{font-size:13px;font-weight:800;letter-spacing:.04em}
.chat-plus-option-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:14px;background:linear-gradient(135deg, rgba(108,92,231,.16), rgba(168,85,247,.2));font-size:18px}
.poll-card.modern-poll{padding:14px;border-radius:22px;background:linear-gradient(180deg, color-mix(in srgb,var(--bg-secondary) 96%, white 4%), var(--bg-secondary));box-shadow:0 12px 28px rgba(17,24,39,.08)}
.poll-question{font-size:15px;font-weight:800;margin-bottom:12px}
.poll-option{position:relative;overflow:hidden;display:block;text-align:left;padding:0;border-radius:16px;background:var(--bg-tertiary)}
.poll-option-main{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px}
.poll-option-text{font-weight:700}
.poll-option-meta{font-size:12px;color:var(--text-secondary)}
.poll-option-fill{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg, rgba(108,92,231,.18), rgba(168,85,247,.2));border-radius:16px;min-width:10px;z-index:1}
.poll-option.active .poll-option-fill{background:linear-gradient(90deg, rgba(108,92,231,.3), rgba(168,85,247,.34))}
.modern-poll-composer .form-group input,.modern-poll-composer .form-group textarea{border-radius:16px}
.poll-composer-tip{font-size:12px;color:var(--text-secondary);margin:2px 0 14px}
.create-poll-pill{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:14px;border:1px solid var(--border);background:var(--bg-tertiary);font-size:12px;color:var(--text-secondary)}
.create-poll-pill strong{font-weight:700;color:var(--text-primary);display:-webkit-box;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.create-poll-pill-actions{display:flex;gap:6px;flex-shrink:0}
.create-pill-action{padding:4px 8px;border-radius:999px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-size:11px;font-weight:700}
.create-poll-editor{padding:12px;border-radius:16px;border:1px solid var(--border);background:var(--bg-tertiary)}
.create-poll-editor-actions{display:flex;justify-content:flex-end;gap:8px}
.feed-poll{border-color:color-mix(in srgb, var(--accent) 22%, var(--border));background:linear-gradient(165deg, color-mix(in srgb,var(--bg-secondary) 93%, white 7%), var(--bg-secondary));box-shadow:0 16px 30px rgba(17,24,39,.1)}
.feed-poll-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.feed-poll-chip{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;background:linear-gradient(135deg, rgba(108,92,231,.16), rgba(168,85,247,.2));color:var(--accent);font-size:11px;font-weight:800;letter-spacing:.02em}
.feed-poll-total{font-size:11px;color:var(--text-secondary);font-weight:700}
.feed-poll .poll-question{font-size:16px;line-height:1.35;letter-spacing:.01em}
.feed-poll .poll-option{border:1px solid color-mix(in srgb, var(--accent) 12%, var(--border));transition:transform .12s ease,border-color .12s ease}
.feed-poll .poll-option:hover{transform:translateY(-1px);border-color:color-mix(in srgb, var(--accent) 38%, var(--border))}
.feed-poll .poll-footer{margin-top:10px;text-align:right;font-size:11px;letter-spacing:.01em;color:var(--text-secondary)}
.chat-location-card.modern{display:flex;align-items:center;gap:12px;padding:14px 15px;border-radius:20px;background:linear-gradient(180deg, color-mix(in srgb,var(--bg-secondary) 95%, white 5%), var(--bg-secondary));box-shadow:0 14px 28px rgba(17,24,39,.08)}
.chat-location-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:16px;background:linear-gradient(135deg,#6C5CE7,#A855F7);color:#fff;font-size:20px}
.chat-location-copy{flex:1;min-width:0}
.chat-location-cta{padding:8px 11px;border-radius:999px;background:rgba(108,92,231,.12);color:var(--accent);font-size:12px;font-weight:700}
.location-preview-card{padding:16px;border-radius:20px;background:linear-gradient(180deg, color-mix(in srgb,var(--bg-secondary) 94%, white 6%), var(--bg-secondary));border:1px solid var(--border)}
.location-preview-meta{font-size:12px;color:var(--text-secondary);margin-top:4px}
.location-preview-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.campus-map-popup{min-width:180px}.campus-map-popup-title{font-weight:800;margin-bottom:4px}.campus-map-popup-sub{font-size:12px;color:#6b7280;margin-bottom:10px}

[data-theme="light"] .poll-question, [data-theme="light"] .poll-option-text, [data-theme="light"] .poll-option-meta, [data-theme="light"] .comment-author, [data-theme="light"] .comment-text, [data-theme="light"] .msg-reply-snippet, [data-theme="light"] .anon-identity-label, [data-theme="light"] .edit-profile-btn, [data-theme="light"] .icon-btn { color: var(--text-primary); }
[data-theme="light"] .poll-card, [data-theme="light"] .chat-location-card, [data-theme="light"] .msg-bubble { box-shadow: 0 10px 24px rgba(17,24,39,.06); }

.map-user-cluster{display:flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 10px;border-radius:999px;background:linear-gradient(135deg,#6C5CE7,#A855F7);color:#fff;font-size:13px;font-weight:800;border:2px solid rgba(255,255,255,.88);box-shadow:0 10px 22px rgba(108,92,231,.34)}
.cluster-user-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;border:none;background:var(--bg-tertiary);color:var(--text-primary);text-align:left}
.msg-bubble-pin{background:transparent !important;box-shadow:none !important;border:none !important;padding:0 !important;max-width:250px}
.chat-location-card.modern{width:100%;margin:0}
.campus-map-popup-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.map-popup-btn{border:none;border-radius:12px;padding:8px 12px;background:linear-gradient(135deg,#6C5CE7,#A855F7);color:#fff;font-weight:700}.map-popup-btn.secondary{background:var(--bg-tertiary);color:var(--text-primary);border:1px solid var(--border)}


/* v9 production polish */
.bottom-nav {
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  width: auto;
  border-radius: 26px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
}
.nav-btn {
  border-radius: 18px;
  min-width: 56px;
}
.nav-btn.active:not(.nav-plus) {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-secondary));
}
.nav-plus { transform: translateY(-14px); }
.chat-plus-menu { display:grid; }
.chat-plus-option.modern span:last-child { font-size: 12px; }
.msg-bubble-pin {
  padding: 4px !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}
.msg-bubble-pin .msg-time { right: 8px; bottom: 2px; }
.chat-location-card.modern {
  width: 100%;
  min-width: 0;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(17,24,39,.10);
}
.chat-location-card.modern .chat-location-sub { color: var(--text-secondary); }
.story-reply-send {
  min-width: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
}
.story-reply-bar input { padding-right: 10px; }
.campus-map-popup-actions { display:flex; gap:8px; margin-top:10px; }
.map-popup-btn { flex:1; }


/* v10 polish */
.img-download{position:absolute;top:16px;right:62px;z-index:3;border:none;border-radius:999px;padding:10px 14px;background:rgba(15,23,42,.78);color:#fff;font-weight:700;backdrop-filter:blur(12px)}
.img-download:hover{background:rgba(15,23,42,.9)}
.suggested-card-event{justify-content:flex-start}.suggested-event-thumb{width:64px;height:64px;border-radius:18px;object-fit:cover;margin-bottom:10px}.suggested-event-emoji{width:64px;height:64px;border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:28px;background:linear-gradient(135deg, rgba(108,92,231,.16), rgba(168,85,247,.18));margin-bottom:10px}
.story-insight-link{border:none;background:none;color:var(--accent);font:inherit;font-weight:700;padding:0;cursor:pointer}
.nav-plus{transform:translateY(-8px)}
.chat-plus-wrap{align-self:flex-end}
.create-post-actions-row{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--border);padding-top:12px;margin-top:12px;gap:10px;flex-wrap:nowrap}.create-post-actions-row .create-post-actions-left{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;overflow:auto;scrollbar-width:none}.create-post-actions-row .create-post-actions-left::-webkit-scrollbar{display:none}.create-post-actions-row .btn-primary{flex:0 0 auto}
[data-theme="light"] .poll-question,[data-theme="light"] .poll-option-text,[data-theme="light"] .poll-footer,[data-theme="light"] .chat-plus-option.modern,[data-theme="light"] .create-anon-toggle,[data-theme="light"] .suggested-card-name,[data-theme="light"] .suggested-card-meta{color:var(--text-primary)}
[data-theme="light"] .chat-plus-option-icon{color:var(--text-primary)}
