/* ==========================================================================
   SocialHub Design System — Redesigned UI/UX
   Modern, elegant, minimal, clean, premium, friendly & accessible
   Supports full Light & Dark mode via CSS variables & data-theme tokens
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* --------------------------------------------------------------------------
   Design Tokens (Light Mode Default)
   -------------------------------------------------------------------------- */
:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Brand Colors - Modern Indigo / Ultramarine */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-active: #3730a3;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  --primary-rgb: 79, 70, 229;

  /* Accent & Interactive */
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --cover-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);

  /* Neutral Canvas & Surfaces */
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-secondary: #f1f5f9;
  --surface-tertiary: #e2e8f0;
  --surface-hover: #f8fafc;
  --surface-active: #e2e8f0;
  --surface-elevated: #ffffff;

  /* Typography */
  --text-primary: #090d16;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Hairline Borders */
  --border: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-strong: #cbd5e1;

  /* Semantic Feedback */
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;

  --success: #10b981;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;

  --heart: #f43f5e;
  --heart-light: #ffe4e6;
  --heart-border: #fda4af;

  /* Shadows (Subtle, professional) */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.03);

  /* Geometry & Layout */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --sidebar-left-width: 260px;
  --sidebar-right-width: 320px;
  --content-max-width: 640px;
  --header-height: 64px;
  --bottom-nav-height: 64px;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --theme-transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* --------------------------------------------------------------------------
   Dark Mode Tokens (Applies when [data-theme="dark"])
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-active: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-border: rgba(99, 102, 241, 0.35);
  --primary-rgb: 99, 102, 241;

  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --cover-gradient: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 50%, #831843 100%);

  --background: #090d16;
  --surface: #111827;
  --surface-secondary: #172033;
  --surface-tertiary: #1e293b;
  --surface-hover: #1b2438;
  --surface-active: #243048;
  --surface-elevated: #162032;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;

  --border: #1f293d;
  --border-subtle: #172033;
  --border-strong: #2e3d5b;

  --danger: #f87171;
  --danger-hover: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --danger-border: rgba(239, 68, 68, 0.35);

  --success: #34d399;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.35);

  --heart: #fb7185;
  --heart-light: rgba(244, 63, 94, 0.18);
  --heart-border: rgba(251, 113, 133, 0.35);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

/* --------------------------------------------------------------------------
   Midnight Theme Tokens (Applies when [data-theme="midnight"])
   Deep navy sky with celestial cyan accents
   -------------------------------------------------------------------------- */
[data-theme="midnight"] {
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --primary-active: #0284c7;
  --primary-light: rgba(56, 189, 248, 0.15);
  --primary-border: rgba(56, 189, 248, 0.35);
  --primary-rgb: 56, 189, 248;

  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  --cover-gradient: linear-gradient(135deg, #071530 0%, #0c2352 50%, #0369a1 100%);

  --background: #070d1d;
  --surface: #0f172a;
  --surface-secondary: #162444;
  --surface-tertiary: #1e315b;
  --surface-hover: #192a50;
  --surface-active: #223769;
  --surface-elevated: #131e38;

  --text-primary: #f0f6fc;
  --text-secondary: #94a3b8;
  --text-muted: #62769c;
  --text-inverse: #070d1d;

  --border: #1e293b;
  --border-subtle: #14223d;
  --border-strong: #2d436e;

  --danger: #f87171;
  --danger-hover: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --danger-border: rgba(239, 68, 68, 0.35);

  --success: #38bdf8;
  --success-light: rgba(56, 189, 248, 0.15);
  --success-border: rgba(56, 189, 248, 0.35);

  --heart: #f43f5e;
  --heart-light: rgba(244, 63, 94, 0.18);
  --heart-border: rgba(251, 113, 133, 0.35);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.55);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.75);
}

/* --------------------------------------------------------------------------
   Ocean Theme Tokens (Applies when [data-theme="ocean"])
   Deep sea abyss with vibrant teal & aquamarine
   -------------------------------------------------------------------------- */
[data-theme="ocean"] {
  --primary: #14b8a6;
  --primary-hover: #0d9488;
  --primary-active: #0f766e;
  --primary-light: rgba(20, 184, 166, 0.15);
  --primary-border: rgba(20, 184, 166, 0.35);
  --primary-rgb: 20, 184, 166;

  --accent-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  --cover-gradient: linear-gradient(135deg, #042426 0%, #0d4b53 50%, #0e7490 100%);

  --background: #041417;
  --surface: #0a2228;
  --surface-secondary: #102e35;
  --surface-tertiary: #163d47;
  --surface-hover: #13353d;
  --surface-active: #19434e;
  --surface-elevated: #0e2930;

  --text-primary: #f0fdfa;
  --text-secondary: #99dbdb;
  --text-muted: #5e9ea2;
  --text-inverse: #041417;

  --border: #133941;
  --border-subtle: #0d282f;
  --border-strong: #1b4e5a;

  --danger: #f87171;
  --danger-hover: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --danger-border: rgba(239, 68, 68, 0.35);

  --success: #2dd4bf;
  --success-light: rgba(45, 212, 191, 0.15);
  --success-border: rgba(45, 212, 191, 0.35);

  --heart: #fb7185;
  --heart-light: rgba(251, 113, 133, 0.18);
  --heart-border: rgba(251, 113, 133, 0.35);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.55);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.75);
}

/* --------------------------------------------------------------------------
   Lavender Theme Tokens (Applies when [data-theme="lavender"])
   Plum twilight night with electric violet & amethyst
   -------------------------------------------------------------------------- */
[data-theme="lavender"] {
  --primary: #a855f7;
  --primary-hover: #9333ea;
  --primary-active: #7e22ce;
  --primary-light: rgba(168, 85, 247, 0.15);
  --primary-border: rgba(168, 85, 247, 0.35);
  --primary-rgb: 168, 85, 247;

  --accent-gradient: linear-gradient(135deg, #9333ea 0%, #c084fc 100%);
  --cover-gradient: linear-gradient(135deg, #2e0854 0%, #581c87 50%, #7e22ce 100%);

  --background: #0f0919;
  --surface: #171126;
  --surface-secondary: #221a36;
  --surface-tertiary: #2e234a;
  --surface-hover: #261d3d;
  --surface-active: #322650;
  --surface-elevated: #1d1630;

  --text-primary: #faf5ff;
  --text-secondary: #c9bcf0;
  --text-muted: #8d7ca9;
  --text-inverse: #0f0919;

  --border: #281d3f;
  --border-subtle: #1c142e;
  --border-strong: #3b2c5d;

  --danger: #f87171;
  --danger-hover: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --danger-border: rgba(239, 68, 68, 0.35);

  --success: #c084fc;
  --success-light: rgba(192, 132, 252, 0.15);
  --success-border: rgba(192, 132, 252, 0.35);

  --heart: #f43f5e;
  --heart-light: rgba(244, 63, 94, 0.18);
  --heart-border: rgba(251, 113, 133, 0.35);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.55);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.75);
}

/* --------------------------------------------------------------------------
   Forest Theme Tokens (Applies when [data-theme="forest"])
   Deep pine woodland with vibrant emerald foliage
   -------------------------------------------------------------------------- */
[data-theme="forest"] {
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-active: #047857;
  --primary-light: rgba(16, 185, 129, 0.15);
  --primary-border: rgba(16, 185, 129, 0.35);
  --primary-rgb: 16, 185, 129;

  --accent-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --cover-gradient: linear-gradient(135deg, #03251a 0%, #064e3b 50%, #047857 100%);

  --background: #05140e;
  --surface: #0a2118;
  --surface-secondary: #102e22;
  --surface-tertiary: #163d2e;
  --surface-hover: #133628;
  --surface-active: #194433;
  --surface-elevated: #0d281e;

  --text-primary: #ecfdf5;
  --text-secondary: #9ed2bb;
  --text-muted: #609b80;
  --text-inverse: #05140e;

  --border: #143c2c;
  --border-subtle: #0d2a1f;
  --border-strong: #1c523d;

  --danger: #f87171;
  --danger-hover: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --danger-border: rgba(239, 68, 68, 0.35);

  --success: #34d399;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.35);

  --heart: #fb7185;
  --heart-light: rgba(251, 113, 133, 0.18);
  --heart-border: rgba(251, 113, 133, 0.35);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.55);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.75);
}

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

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: var(--theme-transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

/* --------------------------------------------------------------------------
   App Shell Layout (Desktop 3-Column Architecture)
   -------------------------------------------------------------------------- */
.app-shell {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

/* --------------------------------------------------------------------------
   LEFT SIDEBAR (Brand, Navigation & Session)
   -------------------------------------------------------------------------- */
.app-sidebar-left {
  width: var(--sidebar-left-width);
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 30;
  background-color: var(--surface);
  transition: var(--theme-transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem 1.5rem 0.5rem;
  text-decoration: none;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand-icon-box svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.sidebar-brand:hover .brand-icon-box {
  transform: rotate(-5deg) scale(1.05);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Navigation List */
.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.sidebar-nav-item a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.sidebar-nav-item a svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

.sidebar-nav-item a:hover {
  background-color: var(--surface-secondary);
  color: var(--text-primary);
  transform: translateX(3px);
}

.sidebar-nav-item a:hover svg {
  transform: scale(1.1);
}

.sidebar-nav-item a.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.sidebar-nav-item a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  height: 64%;
  width: 4px;
  background-color: var(--primary);
  border-radius: 0 4px 4px 0;
}

.sidebar-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: var(--transition);
  margin-top: 0.5rem;
}

.sidebar-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.sidebar-cta-btn:active {
  transform: translateY(0);
}

/* Sidebar Footer & Theme Selector */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.theme-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.theme-picker-open-btn {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.theme-picker-open-btn:hover {
  text-decoration: underline;
}

/* 6-Theme Compact Grid (Sidebar) */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.theme-card-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  background-color: var(--surface-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-align: center;
  gap: 0.3rem;
  min-height: 48px;
}

.theme-card-option:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-hover);
}

.theme-card-option.active {
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: 0 0 0 1.5px var(--primary);
}

.theme-swatch-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.theme-swatch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.theme-swatch-light {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}
.theme-swatch-light .theme-swatch-dot {
  background-color: #4f46e5;
}

.theme-swatch-dark {
  background-color: #090d16;
}
.theme-swatch-dark .theme-swatch-dot {
  background-color: #6366f1;
}

.theme-swatch-midnight {
  background-color: #070d1d;
}
.theme-swatch-midnight .theme-swatch-dot {
  background-color: #38bdf8;
}

.theme-swatch-ocean {
  background-color: #041417;
}
.theme-swatch-ocean .theme-swatch-dot {
  background-color: #14b8a6;
}

.theme-swatch-lavender {
  background-color: #0f0919;
}
.theme-swatch-lavender .theme-swatch-dot {
  background-color: #a855f7;
}

.theme-swatch-forest {
  background-color: #05140e;
}
.theme-swatch-forest .theme-swatch-dot {
  background-color: #10b981;
}

.theme-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.theme-card-check {
  display: none;
  font-size: 0.65rem;
  position: absolute;
  top: 2px;
  right: 4px;
  color: var(--primary);
  font-weight: 800;
}

.theme-card-option.active .theme-card-check {
  display: block;
}

/* Universal Theme Picker Modal */
.theme-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.theme-modal-backdrop.open {
  display: flex;
}

.theme-modal-dialog {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.theme-modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.theme-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.theme-modal-close:hover {
  background-color: var(--surface-secondary);
  color: var(--text-primary);
}

.theme-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.theme-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.theme-picker-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background-color: var(--surface-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-align: left;
}

.theme-picker-card:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-hover);
  transform: translateY(-1px);
}

.theme-picker-card.active {
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.theme-picker-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.theme-picker-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.theme-picker-card-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.theme-picker-card-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #ffffff;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-picker-card.active .theme-picker-card-indicator {
  background-color: var(--primary);
  border-color: var(--primary);
}

.theme-system-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background-color: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 0.25rem;
}

/* Sidebar User Dock */
.sidebar-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  background-color: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.sidebar-user-card:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

.sidebar-user-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-width: 0;
}

.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  background-color: var(--surface-tertiary);
  flex-shrink: 0;
}

.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-handle {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout-btn {
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logout-btn:hover {
  color: var(--danger);
  background-color: var(--danger-light);
}

/* --------------------------------------------------------------------------
   CENTER MAIN CONTENT COLUMN
   -------------------------------------------------------------------------- */
.app-main-content {
  width: 100%;
  max-width: var(--content-max-width);
  min-height: 100vh;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background-color: var(--background);
}

/* Sticky Header */
.main-sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(var(--primary-rgb), 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--theme-transition);
}

.main-header-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.mobile-top-bar {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.mobile-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
}

.mobile-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-header-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--surface-secondary);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  padding: 0;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-header-btn:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.mobile-header-btn:active,
.mobile-header-btn.active {
  transform: scale(0.94);
  color: var(--primary);
  border-color: var(--primary);
}

.mobile-header-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  display: block;
}

.mobile-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   REDESIGNED POST COMPOSER (Modern Social Media Experience)
   -------------------------------------------------------------------------- */
.composer-card {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem;
  transition: var(--theme-transition);
  position: relative;
}

.composer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.composer-badge-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.composer-badge-title::before {
  content: '';
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
}

.composer-body {
  display: flex;
  gap: 1rem;
}

.composer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  background-color: var(--surface-secondary);
}

.composer-input-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.composer-textarea {
  width: 100%;
  min-height: 85px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-primary);
  resize: none;
  outline: none;
  background: transparent;
  padding: 0.25rem 0;
}

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

/* Selected Image Preview Box */
.composer-image-preview-wrap {
  margin: 0.75rem 0 0.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--surface-secondary);
  position: relative;
  display: flex;
  flex-direction: column;
}

.composer-preview-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.composer-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
}

.composer-preview-filename {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.composer-preview-actions {
  display: flex;
  gap: 0.5rem;
}

.composer-replace-img-btn,
.composer-remove-img-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.composer-replace-img-btn {
  background-color: var(--surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.composer-replace-img-btn:hover {
  background-color: var(--surface-tertiary);
}

.composer-remove-img-btn {
  background-color: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.composer-remove-img-btn:hover {
  background-color: var(--danger);
  color: #ffffff;
}

/* Composer Bottom Toolbar */
.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.composer-tools-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.composer-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  border: 1px solid var(--primary-border);
  transition: var(--transition);
}

.composer-tool-btn svg {
  width: 17px;
  height: 17px;
}

.composer-tool-btn:hover {
  background-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.composer-tools-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.composer-char-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.composer-char-count.warning {
  color: #f59e0b;
}

.composer-char-count.danger {
  color: var(--danger);
}

.composer-submit-btn {
  padding: 0.55rem 1.35rem;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
  transition: var(--transition);
}

.composer-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.composer-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   FEED FILTER TABS (All Posts / Following)
   -------------------------------------------------------------------------- */
.feed-filter-tabs {
  display: flex;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.feed-filter-tab {
  flex: 1;
  text-align: center;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.feed-filter-tab:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

.feed-filter-tab.active {
  color: var(--primary);
  font-weight: 800;
  border-bottom-color: var(--primary);
  background-color: var(--surface);
}

/* --------------------------------------------------------------------------
   POSTS STREAM & REDESIGNED POST CARDS
   -------------------------------------------------------------------------- */
.posts-stream {
  display: flex;
  flex-direction: column;
}

.post-card {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.post-card:hover {
  background-color: var(--surface-hover);
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.post-author-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.post-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface-secondary);
  background-color: var(--surface-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.post-author-link:hover .post-avatar {
  transform: scale(1.05);
}

.post-author-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.post-author-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

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

.post-author-handle {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-time-dot {
  color: var(--text-muted);
  opacity: 0.6;
}

.post-time {
  color: var(--text-muted);
}

/* Post Actions Menu for Owner */
.post-menu-wrap {
  position: relative;
}

.post-menu-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}

.post-menu-btn:hover {
  background-color: var(--surface-secondary);
  color: var(--text-primary);
}

.post-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 140px;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.35rem;
  z-index: 25;
  display: none;
  flex-direction: column;
}

.post-dropdown-menu.open {
  display: flex;
}

.post-dropdown-item {
  padding: 0.55rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.post-dropdown-item:hover {
  background-color: var(--surface-secondary);
  color: var(--text-primary);
}

.post-dropdown-item.danger {
  color: var(--danger);
}

.post-dropdown-item.danger:hover {
  background-color: var(--danger-light);
}

/* Post Content & Media */
.post-body {
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--text-primary);
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.post-media-box {
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--surface-secondary);
  cursor: pointer;
  position: relative;
}

.post-media-box::after {
  content: 'Click to expand';
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.post-media-box:hover::after {
  opacity: 1;
}

.post-media-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-media-box:hover .post-media-image {
  transform: scale(1.01);
}

/* Engagement Counts Row */
.post-stats-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.65rem;
}

.post-stats-row strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Post Actions Strip */
.post-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.post-action-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.post-action-btn:hover {
  background-color: var(--surface-secondary);
  color: var(--text-primary);
}

.post-action-btn:hover svg {
  transform: scale(1.15);
}

/* Like Active State with Heart Pulse */
.post-action-btn.like-btn.liked {
  color: var(--heart);
}

.post-action-btn.like-btn.liked svg {
  fill: var(--heart);
  stroke: var(--heart);
  animation: heartPulse 0.35s ease forwards;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.post-action-btn.comment-btn:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.post-action-btn.share-btn:hover {
  color: var(--success);
  background-color: var(--success-light);
}

/* --------------------------------------------------------------------------
   COMMENTS DRAWER & NESTED SYSTEM
   -------------------------------------------------------------------------- */
.comments-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: fadeIn 0.2s ease;
}

.comment-composer-wrap {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.comment-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--surface-secondary);
  flex-shrink: 0;
}

.comment-form {
  flex: 1;
  display: flex;
  align-items: center;
  background-color: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.35rem 0.25rem 1rem;
  transition: var(--transition);
}

.comment-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background-color: var(--surface);
}

.comment-input-field {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
}

.comment-submit-btn {
  padding: 0.4rem 0.9rem;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.comment-submit-btn:hover:not(:disabled) {
  opacity: 0.92;
}

/* Comment List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.comment-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.comment-bubble {
  flex: 1;
  background-color: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  position: relative;
}

.comment-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.comment-author-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-time {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.comment-delete-btn {
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  transition: var(--transition);
}

.comment-delete-btn:hover {
  color: var(--danger);
  background-color: var(--danger-light);
}

.comment-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.empty-comments {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
}

/* --------------------------------------------------------------------------
   RIGHT SIDEBAR (Social Recommendations & Infrastructure)
   -------------------------------------------------------------------------- */
.app-sidebar-right {
  width: var(--sidebar-right-width);
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-widget {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: var(--theme-transition);
}

.widget-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.95rem;
  letter-spacing: -0.01em;
}

.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  background-color: var(--success-light);
  border: 1px solid var(--success-border);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.db-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--success);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Who to Follow Mini List */
.who-to-follow-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.user-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.user-mini-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}

.user-mini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--surface-secondary);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.user-mini-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-mini-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-mini-handle {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Trending Tags */
.trending-tags-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.trending-tag-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface-secondary);
  transition: var(--transition);
}

.trending-tag-item:hover {
  background-color: var(--surface-tertiary);
  transform: translateX(2px);
}

.tag-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
}

.tag-posts-count {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   EXPLORE PAGE (People Discovery & Search)
   -------------------------------------------------------------------------- */
.explore-container {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.explore-hero-box {
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
}

.explore-hero-box::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.explore-page-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.explore-page-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.5;
  max-width: 480px;
}

.explore-search-wrap {
  position: relative;
  width: 100%;
}

.explore-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.explore-search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.explore-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.explore-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.explore-user-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.explore-user-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.explore-card-top {
  height: 64px;
  background: var(--cover-gradient);
  position: relative;
}

.explore-card-body {
  padding: 0 1.25rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  flex: 1;
}

.explore-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  background-color: var(--surface-secondary);
  margin-top: -30px;
  margin-bottom: 0.65rem;
}

.explore-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explore-card-handle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explore-card-bio {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  flex: 1;
}

.explore-card-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
}

.explore-card-stats strong {
  color: var(--text-primary);
  font-weight: 700;
}

.explore-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   PROFILE PAGE (Cover, Avatar, Bio, Metrics & Tabs)
   -------------------------------------------------------------------------- */
.profile-view-wrap {
  display: flex;
  flex-direction: column;
}

.profile-cover-area {
  height: 180px;
  background: var(--cover-gradient);
  position: relative;
}

.profile-header-card {
  background-color: var(--surface);
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.profile-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -50px;
  margin-bottom: 1rem;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  background-color: var(--surface-secondary);
  box-shadow: var(--shadow);
}

.profile-action-btn-wrap {
  display: flex;
  gap: 0.5rem;
}

.profile-user-names {
  margin-bottom: 0.75rem;
}

.profile-full-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.profile-user-handle {
  font-size: 0.9rem;
  color: var(--text-muted);
  word-break: break-all;
}

.profile-bio-text {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 1rem;
  max-width: 540px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.profile-metrics-row {
  display: flex;
  gap: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.profile-metrics-row strong {
  color: var(--text-primary);
  font-weight: 800;
}

.profile-tabs-nav {
  display: flex;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.profile-tab-item {
  flex: 1;
  text-align: center;
  padding: 0.9rem 1rem;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.profile-tab-item:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

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

/* --------------------------------------------------------------------------
   AUTHENTICATION (Balanced 2-Column Split Layout for Login & Register)
   -------------------------------------------------------------------------- */
.auth-header {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
}

.auth-header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
}

.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  flex: 1;
  min-height: calc(100vh - 70px);
}

.auth-split-card {
  display: flex;
  width: 100%;
  max-width: 840px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 480px;
}

.auth-split-left {
  flex: 0 0 45%;
  width: 45%;
  background: var(--accent-gradient);
  padding: 3.25rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.auth-split-left::before {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  top: -60px;
  left: -60px;
  pointer-events: none;
}

.auth-brand-logo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.auth-brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.auth-brand-tagline {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2rem;
}

.auth-benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  padding: 0;
  margin: 0;
}

.auth-benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.4;
}

.auth-benefit-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.auth-split-right {
  flex: 0 0 55%;
  width: 55%;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--surface);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.form-field-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.form-field-input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 1rem;
  background-color: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: var(--transition);
  box-sizing: border-box;
}

textarea.form-field-input {
  height: auto;
  min-height: 76px;
  padding: 0.75rem 1rem;
  resize: vertical;
}

.form-field-input:focus {
  outline: none;
  background-color: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.password-toggle-btn {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.password-toggle-btn:hover {
  color: var(--text-primary);
  background-color: var(--surface-hover);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.auth-submit-btn {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 1.25rem;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
  transition: var(--transition);
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-footer-link {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

.auth-footer-link a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   BUTTONS & COMMON UI COMPONENTS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  border-radius: var(--radius);
  transition: var(--transition);
  padding: 0 1.25rem;
  height: 40px;
  min-height: 40px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

.btn-sm {
  height: 34px;
  min-height: 34px;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  height: 46px;
  min-height: 46px;
  padding: 0 1.5rem;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background-color: var(--surface-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--surface-tertiary);
  border-color: var(--border-strong);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--surface-secondary);
  border-color: var(--border-strong);
}

.btn-danger {
  background-color: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-follow {
  height: 34px;
  min-height: 34px;
  padding: 0 1.1rem;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #ffffff;
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-follow:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.btn-follow.following {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-follow.following:hover:not(:disabled) {
  background-color: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* Alert Boxes */
.alert-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.alert-box-danger {
  background-color: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-backdrop.open {
  display: flex;
}

.modal-content {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background-color: var(--surface-secondary);
  color: var(--text-primary);
}

/* Lightbox Fullscreen Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #ffffff;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 99;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1.25rem;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 340px;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-info {
  border-left: 4px solid var(--primary);
}

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

/* Spinners & Skeleton Loaders */
.center-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  width: 100%;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--surface-secondary);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton-card {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
}

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

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

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.empty-state-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.empty-state-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   MOBILE RESPONSIVENESS & BOTTOM NAVIGATION BAR
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 50;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.2rem;
  min-width: 48px;
  min-height: 48px;
  flex: 1;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.1s ease, background-color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link:hover {
  color: var(--text-primary);
}

.mobile-nav-link:active {
  transform: scale(0.92);
  color: var(--primary);
}

.mobile-nav-link svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  flex-shrink: 0;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.mobile-nav-link.active {
  color: var(--primary);
  font-weight: 800;
}

.mobile-nav-link.active svg {
  stroke: var(--primary);
}

.mobile-nav-create-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
  transform: translateY(-8px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.mobile-nav-create-btn:hover {
  transform: translateY(-9px) scale(1.03);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.55);
}

.mobile-nav-create-btn:active {
  transform: translateY(-6px) scale(0.95);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

@media (max-width: 1080px) {
  .app-sidebar-right {
    display: none;
  }
}

@media (max-width: 768px) {
  .app-sidebar-left {
    display: none;
  }

  .app-main-content {
    max-width: 100%;
    border-right: none;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 20px);
  }

  .mobile-top-bar {
    display: flex;
    min-height: 48px;
  }

  .mobile-bottom-nav {
    display: flex;
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  .mobile-nav-link {
    min-height: 48px;
    min-width: 48px;
    cursor: pointer;
  }

  .post-media-image {
    max-height: 380px;
  }

  .theme-toggle-action {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .auth-header {
    padding: 0.85rem 1rem;
  }

  .auth-layout {
    padding: 1.5rem 1rem;
    min-height: calc(100vh - 60px);
  }

  .auth-split-card {
    flex-direction: column;
    max-width: 440px;
    min-height: auto;
    border-radius: var(--radius-lg);
  }

  .auth-split-left {
    display: none;
  }

  .auth-split-right {
    flex: 1;
    width: 100%;
    padding: 1.75rem 1.25rem;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .form-row-two-col {
    grid-template-columns: 1fr !important;
  }

  .toast-container {
    bottom: calc(var(--bottom-nav-height) + 1.25rem);
    right: 1rem;
    left: 1rem;
  }

  .toast {
    max-width: 100%;
  }

  .explore-users-grid {
    grid-template-columns: 1fr;
  }

  .profile-header-card {
    padding: 1.25rem 1rem;
  }

  .profile-avatar-large {
    width: 80px;
    height: 80px;
    margin-top: -40px;
  }

  .profile-metrics-row {
    gap: 1.25rem;
  }

  .composer-card {
    padding: 1rem;
  }

  .composer-avatar {
    width: 38px;
    height: 38px;
  }

  .post-card {
    padding: 1rem 0.85rem;
  }

  .post-action-btn {
    min-height: 44px;
    padding: 0.35rem 0.6rem;
  }

  .comment-input-field {
    font-size: 0.95rem;
    min-height: 44px;
  }

  .comment-submit-btn {
    min-height: 44px;
    padding: 0 1.1rem;
  }
}

/* Extra small mobile widths (320px - 390px) */
@media (max-width: 420px) {
  .profile-avatar-large {
    width: 72px;
    height: 72px;
    margin-top: -36px;
  }

  .profile-metrics-row {
    gap: 0.85rem;
    font-size: 0.82rem;
  }

  .post-action-btn span {
    font-size: 0.78rem;
  }

  .composer-tools-left,
  .composer-tools-right {
    gap: 0.35rem;
  }

  .theme-modal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .theme-picker-card {
    padding: 0.65rem 0.7rem;
    gap: 0.5rem;
  }

  .theme-picker-card-name {
    font-size: 0.85rem;
  }

  .theme-picker-card-desc {
    font-size: 0.68rem;
    line-height: 1.25;
  }
}
