:root {
  /* Brand colors */
  --spark-pink: #ff2d78;
  --spark-purple: #c44dff;
  --spark-blue: #6b5bff;
  --spark-gradient: linear-gradient(135deg, #ff2d78, #c44dff, #6b5bff);
  --spark-gradient-hover: linear-gradient(135deg, #ff5a94, #d47aff, #8a7bff);
  --spark-gradient-subtle: linear-gradient(135deg, rgba(255,45,120,0.15), rgba(196,77,255,0.15));
  --spark-pink-rgb: 255,45,120;

  /* Surfaces */
  --bg-primary: #080c1a;
  --bg-secondary: #0d1230;
  --bg-card: #111830;
  --bg-card-hover: #1a2245;
  --bg-elevated: #1c2550;
  --bg-overlay: rgba(0,0,0,0.7);
  --bg-glass: rgba(17,24,48,0.85);

  /* Text */
  --text-primary: #e8ecf4;
  --text-secondary: #8892b0;
  --text-muted: #5a6488;
  --text-inverse: #0a0e1a;

  /* Borders */
  --border-color: #1e2745;
  --border-light: rgba(255,255,255,0.06);
  --border-hover: #2a3560;

  /* Radius */
  --radius: 16px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --radius-round: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(255,45,120,0.15);
  --shadow-glow-strong: 0 0 30px rgba(255,45,120,0.3);

  /* Layout */
  --nav-height: 52px;
  --bottom-nav-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --max-width: 1100px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --fs-xs: 0.65rem;
  --fs-sm: 0.72rem;
  --fs-base: 0.78rem;
  --fs-md: 0.85rem;
  --fs-lg: 0.95rem;
  --fs-xl: 1.05rem;
  --fs-2xl: 1.2rem;
}

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html { height: -webkit-fill-available; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  font-size: var(--fs-base);
}
::selection { background: rgba(var(--spark-pink-rgb), 0.3); color: white; }
a { color: var(--spark-purple); text-decoration: none; }
a:hover { color: var(--spark-pink); }
img, video { max-width: 100%; height: auto; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Animations ───────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes likeBurst { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 8px rgba(var(--spark-pink-rgb), 0.2); } 50% { box-shadow: 0 0 20px rgba(var(--spark-pink-rgb), 0.4); } }
@keyframes progressSlide { from { width: 0%; } to { width: 100%; } }
@keyframes heartBeat { 0% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } 60% { transform: scale(1); } }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.fade-in { animation: fadeIn 0.35s ease-out both; }
.fade-in-up { animation: fadeInUp 0.4s ease-out both; }
.fade-in-scale { animation: fadeInScale 0.3s ease-out both; }
.slide-down { animation: slideDown 0.3s ease-out both; }
.stagger > * { animation: fadeInUp 0.4s ease-out both; }
.stagger > *:nth-child(1) { animation-delay: 0.02s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.14s; }
.stagger > *:nth-child(5) { animation-delay: 0.18s; }
.stagger > *:nth-child(6) { animation-delay: 0.22s; }
.stagger > *:nth-child(7) { animation-delay: 0.26s; }
.stagger > *:nth-child(8) { animation-delay: 0.3s; }
.stagger > *:nth-child(n+9) { animation-delay: 0.34s; }

/* ─── Skeleton Loading ─────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-xs);
  color: transparent !important;
  -webkit-user-select: none; user-select: none;
  pointer-events: none;
}
.skeleton-text { height: 14px; margin-bottom: 8px; width: 100%; }
.skeleton-text:last-child { width: 60%; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skeleton-thumb { width: 100%; height: 200px; border-radius: var(--radius-md); }
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.skeleton-card-header { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.skeleton-card-header .skeleton-text { flex: 1; }
.skeleton-card-body { display: flex; flex-direction: column; gap: 6px; }
.skeleton-card-actions { display: flex; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-color); }
.skeleton-action { width: 60px; height: 28px; border-radius: 6px; }

/* ─── Navigation ───────────────────────────────────────── */
.spark-nav {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg-glass); backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}
.nav-container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 16px;
  height: var(--nav-height); display: flex; align-items: center; gap: 12px;
}
.nav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.nav-brand:hover { opacity: 0.9; }
.brand-icon { font-size: 1.4rem; background: var(--spark-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.brand-text { background: var(--spark-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; color: var(--text-secondary);
  text-decoration: none; border-radius: var(--radius-xs);
  transition: all 0.2s; font-size: var(--fs-sm); position: relative;
  font-weight: 500;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active { color: white; background: var(--spark-gradient-subtle); box-shadow: inset 0 0 0 1px rgba(255,45,120,0.2); }
.nav-link i { font-size: 1.1rem; }
.nav-badge {
  position: absolute; top: 2px; right: 6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--spark-pink); color: white;
  border-radius: 9px; font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-avatar-wrapper { position: relative; display: inline-block; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.nav-avatar-dropdown { background: none; border: none; cursor: pointer; padding: 0; }
.nav-avatar-placeholder { width: 34px; height: 34px; border-radius: 50%; background: var(--spark-gradient); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: white; }

/* Online dot */
.online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: #444; border: 2px solid var(--bg-primary);
  transition: background 0.3s;
}
.online-dot.online { background: #00c853; box-shadow: 0 0 6px rgba(0,200,83,0.6); }
.conv-avatar-wrapper, .profile-avatar-section { position: relative; display: inline-block; }

/* ─── Bottom Navigation ────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-glass); backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-around;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 6px 12px;
  color: var(--text-muted); text-decoration: none;
  font-size: 0.65rem; position: relative;
  transition: all 0.2s; min-width: 56px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bottom-nav-item i { font-size: 1.35rem; transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.bottom-nav-item span { font-size: 0.6rem; font-weight: 500; }
.bottom-nav-item.active { color: var(--spark-pink); }
.bottom-nav-item.active i { transform: scale(1.15); }
.bottom-nav-item:active i { transform: scale(0.9); }
.bottom-nav-item:hover { color: var(--text-primary); }
.bottom-nav-center { margin-top: -14px; }
.bottom-nav-plus {
  width: 50px; height: 50px;
  background: var(--spark-gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(255,45,120,0.4);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bottom-nav-plus:hover { transform: scale(1.08); box-shadow: 0 6px 30px rgba(255,45,120,0.5); }
.bottom-nav-plus:active { transform: scale(0.92); }
.bottom-badge {
  position: absolute; top: 2px; right: 8px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--spark-pink); color: white;
  border-radius: 9px; font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Dropdown ──────────────────────────────────────────── */
.dropdown-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 6px !important;
  animation: fadeInScale 0.15s ease-out;
}
.dropdown-item {
  color: var(--text-primary) !important;
  font-size: 0.85rem !important;
  padding: 10px 14px !important;
  border-radius: var(--radius-xs) !important;
  transition: all 0.15s;
}
.dropdown-item:hover { background: var(--spark-gradient-subtle) !important; color: var(--spark-pink) !important; }
.dropdown-item.text-danger:hover { background: rgba(220,53,69,0.1) !important; }
.dropdown-divider { border-color: var(--border-color) !important; margin: 4px 0 !important; }

/* ─── Buttons ──────────────────────────────────────────── */
.btn-spark {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: var(--fs-sm);
  border: none; cursor: pointer; transition: all 0.15s;
  text-decoration: none; font-family: inherit;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
}
.btn-spark-primary {
  background: var(--spark-gradient); color: white;
  box-shadow: 0 4px 15px rgba(var(--spark-pink-rgb), 0.25);
}
.btn-spark-primary:hover {
  background: var(--spark-gradient-hover); color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--spark-pink-rgb), 0.35);
}
.btn-spark-primary:active { transform: scale(0.96); box-shadow: 0 2px 10px rgba(var(--spark-pink-rgb), 0.2); }
.btn-spark-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-spark-outline {
  background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--border-color);
}
.btn-spark-outline:hover { border-color: var(--spark-pink); color: var(--spark-pink); background: rgba(var(--spark-pink-rgb), 0.05); }
.btn-spark-sm { padding: 5px 12px; font-size: var(--fs-xs); min-height: 30px; }
.btn-spark-full { width: 100%; justify-content: center; }
.btn-spark-danger { background: #dc3545; color: white; }
.btn-spark-danger:hover { background: #c82333; transform: translateY(-1px); }
.btn-spark-ghost {
  background: transparent; color: var(--text-secondary);
  padding: 8px 12px; border-radius: var(--radius-xs);
}
.btn-spark-ghost:hover { background: var(--bg-card); color: var(--text-primary); }

/* ─── Main Layout ──────────────────────────────────────── */
.spark-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 10px calc(var(--bottom-nav-height) + 20px + var(--safe-bottom));
  min-height: calc(100vh - var(--nav-height));
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.page-header h1 { font-size: var(--fs-lg); display: flex; align-items: center; gap: 8px; font-weight: 700; }

/* ─── Flash Messages ───────────────────────────────────── */
.flash-container { margin-bottom: 16px; }
.flash-alert {
  padding: 12px 16px; border-radius: var(--radius-md);
  margin-bottom: 8px; font-size: 0.85rem;
  animation: slideDown 0.3s ease-out;
  display: flex; align-items: center; gap: 8px;
}
.flash-alert i { font-size: 1.1rem; flex-shrink: 0; }
.flash-success { background: rgba(0,200,83,0.12); color: #00c853; border: 1px solid rgba(0,200,83,0.2); }
.flash-danger { background: rgba(220,53,69,0.12); color: #ff6b6b; border: 1px solid rgba(220,53,69,0.2); }
.flash-warning { background: rgba(255,193,7,0.12); color: #ffc107; border: 1px solid rgba(255,193,7,0.2); }
.flash-info { background: rgba(13,110,253,0.12); color: #6ea8fe; border: 1px solid rgba(13,110,253,0.2); }

/* ─── Toast Notifications ──────────────────────────────── */
.toast-container {
  position: fixed; top: 80px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 360px; width: 100%;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.35s ease-out;
  display: flex; align-items: center; gap: 10px;
  pointer-events: auto;
  backdrop-filter: blur(16px);
}
.toast i { font-size: 1.2rem; flex-shrink: 0; }
.toast-success i { color: #00c853; }
.toast-error i { color: #ff6b6b; }
.toast-info i { color: #6ea8fe; }
.toast-text { font-size: 0.85rem; line-height: 1.4; flex: 1; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 4px; }
.toast-close:hover { color: var(--text-primary); }

/* ─── Auth ─────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 100px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-icon { font-size: 2.8rem; background: var(--spark-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-header h1 { font-size: 1.6rem; margin: 10px 0 4px; }
.auth-header p { color: var(--text-secondary); font-size: 0.85rem; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--text-secondary); font-size: 0.85rem; }
.auth-switch a { color: var(--spark-pink); text-decoration: none; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* ─── Stories Bar ───────────────────────────────────────── */
.stories-bar { margin-bottom: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stories-bar::-webkit-scrollbar { display: none; }
.stories-scroll { display: flex; gap: 10px; padding: 4px 0; }
.story-circle {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; cursor: pointer; flex-shrink: 0;
  min-width: 52px; transition: transform 0.15s;
}
.story-circle:hover { transform: translateY(-2px); }
.story-circle:active { transform: scale(0.95); }
.story-ring {
  width: 48px; height: 48px; border-radius: 50%;
  padding: 2.5px; background: var(--spark-gradient);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 8px rgba(var(--spark-pink-rgb), 0.12);
}
.story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-primary); }
.story-ring-placeholder { color: white; font-weight: 700; font-size: var(--fs-md); }
.story-name { font-size: var(--fs-xs); color: var(--text-secondary); max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Story Viewer Overlay */
.story-viewer {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.story-viewer-inner {
  position: relative; width: 100%; max-width: 400px;
  aspect-ratio: 9/16; max-height: 90vh;
  background: #000; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.story-close { position: absolute; top: 12px; right: 12px; z-index: 10; background: none; border: none; color: white; font-size: 1.8rem; cursor: pointer; opacity: 0.8; transition: opacity 0.2s; }
.story-close:hover { opacity: 1; }
.story-progress { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 5; display: flex; gap: 4px; }
.progress-segment { flex: 1; height: 3px; background: rgba(255,255,255,0.25); border-radius: 2px; overflow: hidden; }
.progress-segment.seen { background: rgba(255,255,255,0.7); }
.progress-segment.active .progress-fill { height: 100%; background: white; }
@keyframes storyProgress { from { width: 0; } to { width: 100%; } }
.story-user-info { position: absolute; top: 24px; left: 14px; z-index: 5; display: flex; align-items: center; gap: 8px; color: white; font-size: 0.85rem; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.story-viewer-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.5); }
.story-image { width: 100%; height: 100%; object-fit: contain; }
.story-content { position: absolute; bottom: 40px; left: 16px; right: 16px; color: white; font-size: 0.9rem; text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,0.8); }
.story-nav { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; }
.story-prev, .story-next { background: none; border: none; color: white; font-size: 2rem; padding: 24px 12px; cursor: pointer; opacity: 0.5; transition: opacity 0.2s; }
.story-prev:hover, .story-next:hover { opacity: 1; }

/* ─── Feed Layout ───────────────────────────────────────── */
.feed-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
.feed-header { margin-bottom: 16px; }

/* Search bar */
.search-bar {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 14px;
  transition: all 0.2s;
}
.search-bar:focus-within { border-color: var(--spark-pink); box-shadow: 0 0 0 3px rgba(var(--spark-pink-rgb), 0.1); }
.search-bar i { color: var(--text-muted); font-size: 1rem; }
.search-bar input {
  background: none; border: none; color: var(--text-primary);
  padding: 12px 10px; font-size: 0.9rem;
  width: 100%; outline: none; font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; padding: 4px; line-height: 1;
}
.search-clear:hover { color: var(--text-primary); }

/* Feed tabs */
.feed-tabs {
  display: flex; gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--border-color);
}
.feed-tab {
  flex: 1; text-align: center; padding: 9px 6px;
  border-radius: 8px; color: var(--text-secondary);
  text-decoration: none; font-size: 0.82rem; font-weight: 500;
  transition: all 0.2s;
}
.feed-tab.active {
  background: var(--spark-gradient); color: white;
  box-shadow: 0 4px 12px rgba(var(--spark-pink-rgb), 0.2);
}
.feed-tab:hover:not(.active) { color: var(--text-primary); background: rgba(255,255,255,0.03); }

.feed-sidebar { display: none; }

/* ─── Post Cards ────────────────────────────────────────── */
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.post-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.post-card:active { transform: scale(0.98); }
.post-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.post-author { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.post-avatar-wrapper { position: relative; flex-shrink: 0; }
.post-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-avatar-placeholder {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--spark-gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--fs-sm); color: white; flex-shrink: 0;
}
.post-author-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.post-author-name { font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-author-username { color: var(--text-secondary); font-size: var(--fs-xs); }
.verified-badge { color: var(--spark-blue); font-size: var(--fs-sm); }
.post-date { color: var(--text-muted); font-size: var(--fs-xs); white-space: nowrap; }
.post-body p {
  line-height: 1.5; margin-bottom: 8px;
  white-space: pre-wrap; word-break: break-word; font-size: var(--fs-base);
}
.post-body p:last-child { margin-bottom: 0; }
.post-image {
  width: 100%; max-height: 400px;
  object-fit: cover; border-radius: var(--radius-md);
  margin-top: 4px; cursor: pointer;
  transition: transform 0.2s;
}
.post-image:hover { transform: scale(1.01); }
.post-video {
  width: 100%; max-height: 480px;
  border-radius: var(--radius-md); margin-top: 4px;
  display: block; background: #000;
}
.post-actions {
  display: flex; align-items: center; gap: 2px;
  padding-top: 8px; border-top: 1px solid var(--border-color);
  margin-top: 8px; flex-wrap: wrap;
}
.post-action {
  display: flex; align-items: center; gap: 3px;
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; font-size: var(--fs-xs); text-decoration: none;
  padding: 4px 8px; border-radius: 6px;
  transition: all 0.15s; min-height: 28px;
  font-weight: 500;
}
.post-action i { font-size: var(--fs-md); transition: transform 0.15s; }
.post-action:hover { color: var(--spark-pink); background: rgba(var(--spark-pink-rgb), 0.08); }
.post-action:active { transform: scale(0.92); }
.post-action.liked { color: var(--spark-pink); }
.post-action.liked i { animation: likeBurst 0.3s ease; }
/* Hashtags */
.hashtag { color: var(--spark-purple); font-weight: 500; cursor: pointer; }
.hashtag:hover { color: var(--spark-pink); text-decoration: underline; }
.mention { color: var(--spark-blue); font-weight: 500; cursor: pointer; }
.mention:hover { text-decoration: underline; }

/* ─── Sidebar (desktop) ────────────────────────────────── */
@media (min-width: 900px) {
  .feed-layout { grid-template-columns: 1fr 300px; }
  .feed-sidebar { display: flex; flex-direction: column; gap: 14px; }
  .spark-main { padding: 24px 28px 40px; }
  .feed-sidebar { position: sticky; top: calc(var(--nav-height) + 24px); align-self: start; }
}
.sidebar-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border-color); overflow: hidden;
}
.sidebar-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; font-weight: 600; font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-card-body { padding: 12px 16px; }
.sidebar-text { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.6; }
.sidebar-stats { display: flex; gap: 16px; margin-top: 10px; font-size: 0.82rem; color: var(--text-secondary); }
.sidebar-more { display: block; margin-top: 8px; font-size: 0.8rem; color: var(--spark-purple); font-weight: 500; }
.sidebar-more:hover { color: var(--spark-pink); }
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.suggested-user { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.suggested-user + .suggested-user { border-top: 1px solid var(--border-color); }
.suggested-user-info { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: 1; min-width: 0; }
.suggested-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.suggested-avatar-placeholder { width: 36px; height: 36px; border-radius: 50%; background: var(--spark-gradient); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: white; }
.suggested-name { font-weight: 500; font-size: 0.85rem; }
.suggested-username { color: var(--text-secondary); font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); }
.spark-input {
  width: 100%;
  background: var(--bg-primary) !important;
  border: 1.5px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 12px !important;
  font-size: var(--fs-base) !important;
  font-family: inherit !important;
  min-height: 38px !important;
  transition: all 0.15s !important;
  outline: none !important;
}
.spark-input:focus { border-color: var(--spark-pink) !important; box-shadow: 0 0 0 3px rgba(var(--spark-pink-rgb), 0.12) !important; }
.spark-input::placeholder { color: var(--text-muted); }
.spark-textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
select.spark-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px !important; cursor: pointer; }
.form-check-label { color: var(--text-secondary); font-size: 0.85rem; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.form-check-label input[type="checkbox"] { accent-color: var(--spark-pink); width: 16px; height: 16px; }
.interest-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.interest-hint {
  padding: 5px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-round);
  font-size: 0.78rem; cursor: pointer; color: var(--text-secondary);
  transition: all 0.2s;
}
.interest-hint:hover { border-color: var(--spark-pink); color: var(--spark-pink); background: rgba(var(--spark-pink-rgb), 0.05); }
.interest-tag { display: inline-block; padding: 3px 10px; background: rgba(196,77,255,0.12); color: var(--spark-purple); border-radius: var(--radius-round); font-size: 0.78rem; }
.interest-tag-sm { display: inline-block; padding: 2px 8px; background: rgba(196,77,255,0.08); color: var(--spark-purple); border-radius: var(--radius-round); font-size: 0.65rem; }
.char-counter { text-align: right; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.input-row { display: flex; gap: 8px; }
.input-row .spark-input { flex: 1; }

/* ─── Profile ───────────────────────────────────────────── */
.profile-page { max-width: 720px; margin: 0 auto; }
.profile-banner {
  height: 180px; border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
@media (min-width: 600px) { .profile-banner { height: 260px; } }
.profile-banner-img { width: 100%; height: 100%; object-fit: cover; }
.profile-banner-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(8,12,26,0.9)); }
.profile-header {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 16px; margin-top: -60px; padding: 0 16px;
  position: relative; z-index: 2;
}
.profile-avatar-section { position: relative; }
.profile-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover; border: 4px solid var(--bg-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.profile-avatar-placeholder {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid var(--bg-primary);
  background: var(--spark-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 700; color: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.profile-verified {
  position: absolute; bottom: 4px; right: 4px;
  color: var(--spark-blue); font-size: 1.3rem;
  background: var(--bg-primary);
  border-radius: 50%; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}
.online-indicator {
  position: absolute; bottom: 6px; right: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #444; border: 3px solid var(--bg-primary);
  transition: background 0.3s;
}
.online-indicator.online { background: #00c853; box-shadow: 0 0 10px rgba(0,200,83,0.6); }
.online-text { color: #00c853 !important; font-size: 0.78rem !important; }
.profile-info { flex: 1; min-width: 200px; padding-top: 60px; }
.profile-name { font-size: 1.4rem; font-weight: 700; }
.profile-username { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 6px; }
.profile-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  color: var(--text-secondary); font-size: 0.8rem;
}
.profile-meta span { display: flex; align-items: center; gap: 4px; }
.profile-actions { display: flex; gap: 8px; padding-top: 60px; width: 100%; }
.profile-actions .btn-spark { flex: 1; justify-content: center; font-size: 0.82rem; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px; padding: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 8px; text-align: center;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-value { display: block; font-size: 1.3rem; font-weight: 700; background: var(--spark-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { color: var(--text-secondary); font-size: 0.72rem; margin-top: 4px; }
.profile-interests { padding: 0 16px 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.profile-bio { padding: 0 16px 14px; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }
.profile-connections { padding: 0 16px 14px; display: flex; gap: 24px; flex-wrap: wrap; }
.connection-section h3 { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 8px; }
.connection-list { display: flex; gap: 6px; flex-wrap: wrap; }
.connection-item img, .mini-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.mini-avatar {
  background: var(--spark-gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem; color: white;
}
.profile-posts { padding: 0 16px 40px; }
.profile-posts h3 { font-size: 1.05rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* ─── People Page ───────────────────────────────────────── */
.people-page { max-width: 800px; margin: 0 auto; }
.people-search { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.search-row { display: flex; gap: 8px; }
.search-row .spark-input { flex: 1; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-row .spark-input, .filter-row .form-select { flex: 1; min-width: 120px; font-size: 0.82rem; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.person-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 20px 16px;
  text-align: center; transition: all 0.25s; position: relative;
}
.person-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.person-avatar-link { display: block; margin-bottom: 10px; position: relative; }
.person-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 auto; }
.person-avatar-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--spark-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: white; margin: 0 auto;
}
.person-avatar-link .online-dot { bottom: 4px; right: calc(50% - 40px); }
.person-name { font-weight: 600; font-size: 0.88rem; text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 3px; }
.person-username { color: var(--text-secondary); font-size: 0.72rem; margin-bottom: 4px; }
.person-details { display: flex; justify-content: center; gap: 8px; color: var(--text-muted); font-size: 0.72rem; margin-bottom: 8px; }
.person-interests { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.person-card .follow-btn {
  position: absolute; top: 10px; right: 10px;
  min-width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* ─── Messages ──────────────────────────────────────────── */
.messages-page { max-width: 640px; margin: 0 auto; }
.conversations-list { display: flex; flex-direction: column; gap: 4px; }
.conversation-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); text-decoration: none;
  color: inherit; transition: all 0.2s;
}
.conversation-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.conv-avatar-wrapper { position: relative; flex-shrink: 0; }
.conv-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.conv-avatar-placeholder { width: 48px; height: 48px; border-radius: 50%; background: var(--spark-gradient); display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 1rem; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }
.conv-preview { display: block; color: var(--text-secondary); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { color: var(--text-muted); font-size: 0.7rem; white-space: nowrap; }
.conv-unread {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--spark-pink); flex-shrink: 0;
}

/* Conversation */
.conversation-page { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100vh - var(--nav-height) - var(--bottom-nav-height) - 40px); }
.conversation-header { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-color); margin-bottom: 10px; }
.back-link { color: var(--text-secondary); text-decoration: none; font-size: 1.2rem; padding: 4px 8px; border-radius: var(--radius-xs); transition: all 0.2s; }
.back-link:hover { color: var(--spark-pink); background: rgba(var(--spark-pink-rgb), 0.08); }
.conv-user-info { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.conv-user-info .conv-avatar { width: 40px; height: 40px; }
.conv-username { color: var(--text-secondary); font-size: 0.75rem; }
.messages-container { flex: 1; overflow-y: auto; padding: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.message {
  max-width: 80%; padding: 10px 14px;
  border-radius: 16px; font-size: 0.88rem;
  line-height: 1.45; word-break: break-word;
  animation: fadeIn 0.2s ease-out;
}
.message-sent { align-self: flex-end; background: var(--spark-gradient); color: white; border-bottom-right-radius: 4px; }
.message-received { align-self: flex-start; background: var(--bg-card); border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.message-time { font-size: 0.65rem; opacity: 0.7; margin-top: 4px; }
.message-form { display: flex; gap: 8px; padding: 12px 0; }
.message-form .spark-input { flex: 1; }

/* ─── Post Detail ───────────────────────────────────────── */
.post-detail { max-width: 640px; margin: 0 auto; }
.post-detail .back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 0.85rem; }
.comments-section { margin-top: 20px; }
.comments-section h3 { font-size: 1.05rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.comment-form { display: flex; gap: 8px; margin-bottom: 14px; }
.comment-form .spark-input { flex: 1; min-height: 42px !important; }
.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 8px;
  transition: all 0.2s;
}
.comment-card:hover { border-color: var(--border-hover); }
.comment-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.comment-author { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.comment-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.comment-avatar-placeholder { width: 30px; height: 30px; border-radius: 50%; background: var(--spark-gradient); display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 0.7rem; }
.comment-name { font-weight: 500; font-size: 0.82rem; }
.comment-date { color: var(--text-muted); font-size: 0.7rem; margin-left: 6px; }
.comment-text { font-size: 0.85rem; line-height: 1.5; }
.comment-actions { display: flex; gap: 8px; margin-top: 6px; }
.comment-action {
  background: none; border: none; color: var(--text-muted);
  font-size: 0.72rem; cursor: pointer; padding: 2px 6px;
  border-radius: 4px; transition: all 0.2s;
}
.comment-action:hover { color: var(--spark-pink); background: rgba(var(--spark-pink-rgb), 0.08); }
.comment-action.text-danger:hover { color: #ff6b6b; background: rgba(220,53,69,0.08); }

/* ─── Events ────────────────────────────────────────────── */
.events-page { max-width: 720px; margin: 0 auto; }
.events-grid { display: flex; flex-direction: column; gap: 12px; }
.event-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 16px;
  transition: all 0.25s;
}
.event-card:hover { border-color: var(--border-hover); transform: translateX(4px); }
.event-date-badge {
  min-width: 54px; text-align: center;
  padding: 10px 8px; background: var(--spark-gradient);
  border-radius: var(--radius-md); flex-shrink: 0;
}
.event-day { display: block; font-size: 1.4rem; font-weight: 700; color: white; }
.event-month { display: block; font-size: 0.65rem; color: rgba(255,255,255,0.8); text-transform: uppercase; }
.event-info { flex: 1; min-width: 0; }
.event-info h3 { font-size: 0.95rem; margin-bottom: 4px; }
.event-info p { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 0.75rem; }
.event-meta span { display: flex; align-items: center; gap: 4px; }
.event-action { flex-shrink: 0; }

/* ─── Notifications ─────────────────────────────────────── */
.notifications-page { max-width: 640px; margin: 0 auto; }
.notifications-list { display: flex; flex-direction: column; gap: 3px; }
.notification-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none; color: inherit; transition: all 0.2s;
}
.notification-item:hover { background: var(--bg-card-hover); }
.notification-item.unread { border-left: 3px solid var(--spark-pink); background: rgba(var(--spark-pink-rgb), 0.03); }
.notif-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.2rem;
  background: var(--spark-gradient-subtle);
  border-radius: var(--radius-md);
}
.notif-body { flex: 1; min-width: 0; }
.notif-text { display: block; font-size: 0.85rem; line-height: 1.4; }
.notif-time { color: var(--text-muted); font-size: 0.7rem; margin-top: 3px; display: block; }

/* ─── Settings / Create ─────────────────────────────────── */
.settings-page, .create-page { max-width: 560px; margin: 0 auto; }
.settings-card, .create-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--border-color);
}
.settings-card h2, .create-card h2 { margin-bottom: 24px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }

/* ─── Modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: fadeIn 0.2s ease-out;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 28px 24px;
  max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeInScale 0.25s ease-out;
  max-height: 80vh; overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { font-size: 1.1rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; padding: 4px; line-height: 1; transition: color 0.2s; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { margin-bottom: 16px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; }

/* ─── Lightbox ──────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease-out;
}
.lightbox-image {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain;
  animation: fadeInScale 0.3s ease-out;
}
.lightbox-close {
  position: fixed; top: 20px; right: 20px;
  background: rgba(0,0,0,0.5); border: none;
  color: white; width: 44px; height: 44px;
  border-radius: 50%; font-size: 1.4rem;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

/* ─── Share Sheet ───────────────────────────────────────── */
.share-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 3000;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 20px calc(20px + var(--safe-bottom));
  animation: slideUp 0.3s ease-out;
  max-height: 50vh; overflow-y: auto;
}
.share-sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.share-sheet-header h3 { font-size: 1rem; }
.share-sheet-close { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.share-option {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 12px 8px; cursor: pointer;
  border-radius: var(--radius-md); transition: all 0.2s;
  background: none; border: none; color: var(--text-primary);
  font-size: 0.75rem;
}
.share-option:hover { background: var(--bg-card-hover); }
.share-option i { font-size: 1.5rem; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--spark-gradient-subtle); border-radius: var(--radius-md); }

/* ─── Admin ─────────────────────────────────────────────── */
.admin-page { max-width: 1000px; margin: 0 auto; }
.admin-page h1 { font-size: 1.2rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 600px) { .admin-stats { grid-template-columns: repeat(4, 1fr); } }
.admin-stat-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 20px;
  position: relative; text-align: center;
}
.admin-stat-card i { font-size: 1.4rem; color: var(--spark-pink); margin-bottom: 8px; display: block; }
.admin-stat-value { display: block; font-size: 1.6rem; font-weight: 700; }
.admin-stat-label { color: var(--text-secondary); font-size: 0.75rem; }
.admin-badge-danger {
  position: absolute; top: 8px; right: 8px;
  background: #dc3545; color: white;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
}
.admin-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 600px) { .admin-nav { grid-template-columns: repeat(3, 1fr); } }
.admin-nav-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 24px;
  text-align: center; text-decoration: none; color: inherit;
  position: relative; transition: all 0.25s;
}
.admin-nav-card:hover { border-color: var(--spark-pink); transform: translateY(-2px); box-shadow: var(--shadow); }
.admin-nav-card i { font-size: 1.8rem; color: var(--spark-pink); display: block; margin-bottom: 8px; }
.admin-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--spark-pink); color: white;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
}
.admin-section { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.admin-section h3 { margin-bottom: 14px; font-size: 0.9rem; }
.admin-search { display: flex; gap: 8px; margin-bottom: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.admin-table th { text-align: left; padding: 10px 12px; color: var(--text-secondary); font-weight: 500; font-size: 0.75rem; border-bottom: 1px solid var(--border-color); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-color); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table a { color: var(--spark-blue); text-decoration: none; }
.admin-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.admin-avatar-placeholder { width: 30px; height: 30px; border-radius: 50%; background: var(--spark-gradient); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 0.7rem; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Pagination */
.pagination-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.page-info { color: var(--text-secondary); font-size: 0.8rem; }

/* Feed loader */
.feed-loader { display: none; justify-content: center; padding: 24px; }
.feed-end { text-align: center; padding: 24px; color: var(--text-muted); font-size: 0.85rem; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border-color); border-top-color: var(--spark-pink); border-radius: 50%; animation: spin 0.7s linear infinite; }

/* Empty states */
.empty-state, .empty-state-full {
  text-align: center; padding: 48px 24px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.empty-state i, .empty-state-full i { font-size: 3rem; color: var(--text-muted); margin-bottom: 16px; display: block; }
.empty-state h3, .empty-state-full h3 { font-size: 1.05rem; margin-bottom: 8px; }
.empty-state p, .empty-state-full p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 16px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* Like animation */
.like-btn:active i { animation: likeBurst 0.3s ease; }
.like-btn.liked i { animation: heartBeat 0.4s ease; }

/* ─── Post Reactions Bar ──────────────────────────────────── */
.post-reactions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 0 4px; margin-top: 4px;
}
.reaction-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 10px; border-radius: var(--radius-round);
  background: var(--bg-primary); border: 1px solid var(--border-color);
  font-size: 0.82rem; cursor: pointer; transition: all 0.2s;
  color: var(--text-secondary); font-weight: 500;
}
.reaction-badge:hover { border-color: var(--spark-purple); background: rgba(196,77,255,0.08); }
.reaction-badge.active { border-color: var(--spark-pink); background: rgba(255,45,120,0.1); color: var(--spark-pink); }
.reaction-badge:active { transform: scale(0.92); }

/* ─── Emoji Picker ───────────────────────────────────────── */
.emoji-picker {
  position: fixed; z-index: 2500;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 10px;
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  animation: fadeIn 0.15s ease-out;
  opacity: 0; transform: translateY(8px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.emoji-picker.visible {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: auto;
}
.emoji-option {
  width: 44px; height: 44px; display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; cursor: pointer;
  background: none; border: none; border-radius: var(--radius-xs);
  transition: all 0.15s;
}
.emoji-option:hover { background: var(--bg-card-hover); transform: scale(1.2); }
.emoji-option:active { transform: scale(0.9); }

/* ─── Bookmark Button ────────────────────────────────────── */
.post-action.bookmarked { color: var(--spark-blue); }
.post-action.bookmarked i { animation: likeBurst 0.3s ease; }

/* ─── Repost Button ──────────────────────────────────────── */
.post-action.reposted { color: #00c853; }
.post-action.reposted i { animation: likeBurst 0.3s ease; }

/* ─── Community Badge ─────────────────────────────────────── */
.community-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; margin-bottom: 10px;
  background: rgba(107,91,255,0.1); border: 1px solid rgba(107,91,255,0.2);
  border-radius: var(--radius-round); font-size: 0.78rem;
  color: var(--spark-blue); text-decoration: none;
  transition: all 0.2s; font-weight: 500;
}
.community-badge:hover { background: rgba(107,91,255,0.2); color: var(--spark-blue); }
.community-badge i { font-size: 0.85rem; }

/* ─── Trends Page ─────────────────────────────────────────── */
.trends-page { max-width: 640px; margin: 0 auto; }
.trends-list { display: flex; flex-direction: column; gap: 4px; }
.trend-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); text-decoration: none;
  color: inherit; transition: all 0.2s;
}
.trend-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateX(4px); }
.trend-number {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--spark-gradient-subtle); color: var(--spark-pink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.trend-info { flex: 1; min-width: 0; }
.trend-tag { display: block; font-weight: 600; font-size: 0.9rem; }
.trend-count { display: block; color: var(--text-secondary); font-size: 0.75rem; margin-top: 2px; }
.trend-arrow { color: var(--text-muted); font-size: 1rem; }

/* ─── Blocked Page ────────────────────────────────────────── */
.blocked-page { max-width: 600px; margin: 0 auto; }
.blocked-list { display: flex; flex-direction: column; gap: 4px; }
.blocked-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); transition: all 0.2s;
}
.blocked-item:hover { border-color: var(--border-hover); }
.blocked-user-info { flex: 1; min-width: 0; }

/* ─── Community Edit ──────────────────────────────────────── */
.community-members-list { display: flex; flex-direction: column; gap: 4px; }
.member-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); gap: 8px;
}
.member-role-control { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ─── Scroll-to-top Button ────────────────────────────────── */
.scroll-top {
  position: fixed; bottom: calc(var(--bottom-nav-height) + 24px + var(--safe-bottom));
  right: 16px; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--spark-gradient); color: white; border: none;
  font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.8); pointer-events: none;
}
.scroll-top.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.scroll-top:hover { transform: scale(1.1); box-shadow: var(--shadow-glow-strong); }
.scroll-top:active { transform: scale(0.9); }
@media (min-width: 900px) { .scroll-top { right: 28px; } }

/* ─── Enhanced Card Hover ─────────────────────────────────── */
.post-card {
  position: relative; overflow: hidden;
}
.post-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,45,120,0.03), rgba(107,91,255,0.03));
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.post-card:hover::before { opacity: 1; }

/* ─── Glossary / Text Utilities ──────────────────────────── */
.text-gradient { background: var(--spark-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.glass {
  background: var(--bg-glass); backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 360px) {
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .event-card { flex-direction: column; align-items: flex-start; }
  .event-date-badge { display: flex; gap: 4px; min-width: auto; padding: 4px 10px; }
  .event-day { font-size: 1rem; }
  .post-card { padding: 14px; border-radius: var(--radius-md); }
}
@media (min-width: 768px) {
  .spark-main { padding: 24px 28px 40px; }
}
@media (min-width: 1200px) {
  .feed-sidebar { width: 320px; }
  .feed-layout { grid-template-columns: 1fr 320px; gap: 24px; }
}

/* ─── Media upload UI ──────────────────────────────────── */
.torrent-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 24px;
  color: var(--text-muted); font-size: 0.85rem;
}
.torrent-loading i { font-size: 1.5rem; color: var(--spark-pink); }
.torrent-progress-bar {
  width: 100%; max-width: 240px; height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden;
}
.torrent-progress-fill { height: 100%; background: var(--spark-gradient); border-radius: 2px; transition: width 0.3s ease; }
.media-preview { margin-top: 12px; border-radius: var(--radius-md); overflow: hidden; }
.media-preview-video, .post-video { width: 100%; max-height: 480px; border-radius: var(--radius-md); display: block; background: #000; }
.media-preview-img { width: 100%; border-radius: var(--radius-md); display: block; }

/* ─── Search Users Section ──────────────────────────────── */
.search-users { margin-bottom: 16px; background: var(--bg-card); border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--border-color); }
.search-users h4 { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 10px; }
.search-user-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border-color); }
.search-user-item:last-child { border-bottom: none; }
.search-user-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.search-user-item span { font-weight: 500; font-size: 0.88rem; }

/* ─── Pin indicator ─────────────────────────────────────── */
.pin-indicator { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; }

/* ─── Edit Textarea ─────────────────────────────────────── */
.edit-textarea {
  width: 100%; min-height: 80px;
  background: var(--bg-primary) !important;
  border: 1.5px solid var(--spark-purple) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
  font-family: inherit !important;
  resize: vertical;
}