/* ============================================================
   SOCIOSPHERE — Premium Social Media Platform
   Dark Theme | Violet / Pink / Cyan Palette
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- ROOT VARIABLES ---- */
:root {
  --primary:           #8B5CF6;
  --primary-light:     #A78BFA;
  --primary-dark:      #7C3AED;
  --primary-glow:      rgba(139, 92, 246, 0.35);

  --secondary:         #F472B6;
  --secondary-light:   #F9A8D4;
  --secondary-dark:    #EC4899;
  --secondary-glow:    rgba(244, 114, 182, 0.35);

  --accent:            #22D3EE;
  --accent-light:      #67E8F9;
  --accent-dark:       #06B6D4;
  --accent-glow:       rgba(34, 211, 238, 0.35);

  --success:           #10B981;
  --warning:           #F59E0B;
  --danger:            #EF4444;
  --info:              #3B82F6;

  --bg-base:           #080812;
  --bg-dark:           #0D0D1E;
  --bg-surface:        #111122;
  --bg-card:           #14142A;
  --bg-card-2:         #1A1A35;
  --bg-hover:          #1E1E3F;
  --bg-input:          #0F0F24;
  --nav-bg:            rgba(11, 11, 30, 0.92);
  --glass-bg:          rgba(20, 20, 42, 0.8);
  --glass-light-bg:    rgba(30, 30, 63, 0.5);
  --weather-bg:        linear-gradient(135deg, #1a1a40 0%, #0f2460 100%);
  --weather-border:    rgba(59,130,246,.25);
  --weather-text:      #F8FAFC;
  --weather-subtext:   rgba(226,232,240,.72);
  --weather-muted:     rgba(226,232,240,.82);
  --weather-glow:      radial-gradient(circle, rgba(59,130,246,.2) 0%, transparent 70%);

  --text-primary:      #F1F5F9;
  --text-secondary:    #94A3B8;
  --text-muted:        #64748B;

  --border:            rgba(255,255,255,0.07);
  --border-strong:     rgba(255,255,255,0.12);
  --border-primary:    rgba(139, 92, 246, 0.45);

  --gradient-brand:    linear-gradient(135deg, #8B5CF6 0%, #F472B6 100%);
  --gradient-cool:     linear-gradient(135deg, #22D3EE 0%, #8B5CF6 100%);
  --gradient-warm:     linear-gradient(135deg, #F472B6 0%, #F59E0B 100%);
  --gradient-cyber:    linear-gradient(135deg, #22D3EE 0%, #10B981 100%);
  --gradient-dark-bg:  linear-gradient(135deg, #0D0D1E 0%, #160D2E 50%, #0D0D1E 100%);

  --shadow-xs:         0 2px 8px rgba(0,0,0,.4);
  --shadow-sm:         0 4px 16px rgba(0,0,0,.45);
  --shadow-md:         0 8px 32px rgba(0,0,0,.5);
  --shadow-lg:         0 16px 56px rgba(0,0,0,.6);
  --shadow-glow:       0 0 40px rgba(139, 92, 246, 0.35);
  --shadow-pink:       0 0 40px rgba(244, 114, 182, 0.25);
  --shadow-cyan:       0 0 40px rgba(34, 211, 238, 0.25);

  --font-primary:      'Poppins', sans-serif;
  --font-secondary:    'Inter', sans-serif;

  --sidebar-w:         292px;
  --right-sidebar-w:   336px;
  --header-h:          66px;

  --radius-xs:         6px;
  --radius-sm:         10px;
  --radius-md:         14px;
  --radius-lg:         20px;
  --radius-xl:         28px;
  --radius-full:       9999px;

  --ease:              all .3s cubic-bezier(.4,0,.2,1);
  --ease-fast:         all .15s cubic-bezier(.4,0,.2,1);
  --ease-bounce:       all .4s cubic-bezier(.34,1.56,.64,1);
}

:root[data-theme="light"] {
  --bg-base:           #F4F7FB;
  --bg-dark:           #E9EEF6;
  --bg-surface:        #FFFFFF;
  --bg-card:           #FFFFFF;
  --bg-card-2:         #F7F9FC;
  --bg-hover:          #EEF3F9;
  --bg-input:          #FFFFFF;
  --nav-bg:            rgba(255, 255, 255, 0.92);
  --glass-bg:          rgba(255, 255, 255, 0.78);
  --glass-light-bg:    rgba(255, 255, 255, 0.62);
  --weather-bg:        linear-gradient(135deg, #FFFFFF 0%, #E8F1FF 100%);
  --weather-border:    rgba(59,130,246,.18);
  --weather-text:      #0F172A;
  --weather-subtext:   #475569;
  --weather-muted:     #64748B;
  --weather-glow:      radial-gradient(circle, rgba(59,130,246,.12) 0%, transparent 72%);

  --text-primary:      #0F172A;
  --text-secondary:    #475569;
  --text-muted:        #64748B;

  --border:            rgba(15, 23, 42, 0.10);
  --border-strong:     rgba(15, 23, 42, 0.16);
  --border-primary:    rgba(139, 92, 246, 0.34);

  --shadow-xs:         0 2px 8px rgba(15,23,42,.05);
  --shadow-sm:         0 8px 24px rgba(15,23,42,.06);
  --shadow-md:         0 14px 36px rgba(15,23,42,.08);
  --shadow-lg:         0 20px 56px rgba(15,23,42,.12);
  --shadow-glow:       0 0 32px rgba(139, 92, 246, 0.16);
  --shadow-pink:       0 0 32px rgba(244, 114, 182, 0.14);
  --shadow-cyan:       0 0 32px rgba(34, 211, 238, 0.14);
}

/* ---- BASE RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-secondary);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

a { text-decoration: none; color: inherit; transition: var(--ease-fast); }

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

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-primary-soft { color: var(--primary-light); }
.text-secondary-soft { color: var(--secondary-light); }
.text-accent-soft { color: var(--accent-light); }
.text-muted-custom { color: var(--text-muted); font-size: .85rem; }

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.glass-card-light {
  background: var(--glass-light-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-brand {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-weight: 600;
  padding: .55rem 1.6rem;
  transition: var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-brand::after {
  content:'';
  position:absolute;inset:0;
  background: rgba(255,255,255,.12);
  opacity:0;
  transition: var(--ease-fast);
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); color:#fff; }
.btn-brand:hover::after { opacity:1; }
.btn-brand:active { transform: translateY(0); }

.btn-outline-brand {
  background: transparent;
  color: var(--primary-light);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-weight: 600;
  padding: .5rem 1.5rem;
  transition: var(--ease);
}
.btn-outline-brand:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-weight: 500;
  padding: .45rem 1.2rem;
  transition: var(--ease);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-primary); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--ease);
  cursor: pointer;
}
.btn-icon:hover { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: var(--shadow-glow); }

.btn-icon-sm {
  width: 34px; height: 34px;
  font-size: .85rem;
}

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.avatar img { width:100%; height:100%; object-fit:cover; }

.avatar-xs { width: 28px; height: 28px; }
.avatar-sm { width: 38px; height: 38px; }
.avatar-md { width: 46px; height: 46px; }
.avatar-lg { width: 60px; height: 60px; }
.avatar-xl { width: 80px; height: 80px; }
.avatar-xxl { width: 110px; height: 110px; }
.avatar-xxxl { width: 150px; height: 150px; }

.avatar-ring {
  padding: 2px;
  background: var(--gradient-brand);
}
.avatar-ring img,
.avatar-ring .avatar-inner {
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-card);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 11px; height: 11px;
  background: var(--success);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
}

/* ============================================================
   BADGE
   ============================================================ */
.badge-brand {
  background: var(--gradient-brand);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
}

.badge-count {
  display: inline-flex;
  align-items:center; justify-content:center;
  min-width:18px; height:18px;
  padding: 0 4px;
  background: var(--secondary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 99px;
  line-height:1;
  position:absolute;
  top:-4px; right:-4px;
}

/* ============================================================
   TOP NAVIGATION
   ============================================================ */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 38px; height: 38px;
  background: var(--gradient-brand);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.nav-logo span { background: var(--gradient-brand); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }

.nav-search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.nav-search {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: .55rem 1rem .55rem 2.6rem;
  color: var(--text-primary);
  font-family: var(--font-secondary);
  font-size: .9rem;
  transition: var(--ease);
  outline: none;
}
.nav-search:focus { border-color: var(--primary); background: var(--bg-input); box-shadow: 0 0 0 3px var(--primary-glow); }
.nav-search::placeholder { color: var(--text-muted); }

.nav-search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .4rem .9rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: var(--ease);
  cursor: pointer;
  position: relative;
  min-width: 52px;
}
.nav-link-item span.label { font-size: .62rem; font-family: var(--font-primary); font-weight: 500; margin-top: 1px; }
.nav-link-item:hover { color: var(--primary-light); background: var(--bg-hover); }
.nav-link-item.active {
  color: var(--primary-light);
  background: rgba(139,92,246,.12);
}
.nav-link-item.active::after {
  content:'';
  position:absolute;
  bottom:-1px; left:50%;
  transform:translateX(-50%);
  width:60%; height:2px;
  background: var(--gradient-brand);
  border-radius:99px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}

.nav-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--ease);
}
.nav-action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: var(--shadow-glow); }

.nav-profile-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .3rem .6rem .3rem .3rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--ease);
}
.nav-profile-btn:hover { border-color: var(--border-primary); background: var(--bg-hover); }

.nav-profile-info { display:flex; flex-direction:column; }
.nav-profile-info .name { font-family: var(--font-primary); font-weight: 600; font-size: .82rem; line-height:1.2; }
.nav-profile-info .sub  { font-size: .7rem; color: var(--text-muted); }

.nav-profile-menu {
  min-width: 250px;
  padding: .45rem;
}

.nav-profile-menu-header {
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:.7rem .75rem;
  margin-bottom:.35rem;
  border-radius:var(--radius-md);
  background:linear-gradient(135deg, rgba(139,92,246,.12) 0%, rgba(244,114,182,.08) 100%);
  border:1px solid var(--border);
}

.nav-profile-menu-header .avatar {
  box-shadow: var(--shadow-glow);
}

.nav-profile-menu-name {
  font-family:var(--font-primary);
  font-weight:700;
  font-size:.9rem;
  line-height:1.2;
}

.nav-profile-menu-sub {
  font-size:.75rem;
  color:var(--text-muted);
  margin-top:.1rem;
}

.nav-profile-menu-meta {
  margin-top:.3rem;
  font-size:.72rem;
  color:var(--primary-light);
  display:flex;
  align-items:center;
  gap:.35rem;
}
.nav-profile-menu-meta-link {
  text-decoration:none;
  cursor:pointer;
}
.nav-profile-menu-meta-link:hover {
  text-decoration:none;
  color:var(--secondary-light);
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-layout {
  display: block;
  min-height: 100vh;
  padding-top: var(--header-h);
}

/* ---- LEFT SIDEBAR ---- */
.left-sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: var(--header-h);
  left: 0;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
  scrollbar-width: none;
  z-index: 100;
}
.left-sidebar::-webkit-scrollbar { display:none; }

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  margin-right: var(--right-sidebar-w);
  min-height: calc(100vh - var(--header-h));
  padding: 1.5rem 1.5rem;
  max-width: 100%;
}

/* ---- RIGHT SIDEBAR ---- */
.right-sidebar {
  width: var(--right-sidebar-w);
  position: fixed;
  top: var(--header-h);
  right: 0;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 1rem;
  border-left: 1px solid var(--border);
  background: var(--bg-surface);
  scrollbar-width: none;
  z-index: 100;
}
.right-sidebar::-webkit-scrollbar { display:none; }

/* ============================================================
   SIDEBAR NAV MENU
   ============================================================ */
.sidebar-nav { list-style: none; }

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .9rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--ease);
  position: relative;
  margin-bottom: .1rem;
}
.sidebar-nav-item i {
  width: 20px;
  font-size: 1rem;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-nav-item:hover { color: var(--primary-light); background: rgba(139,92,246,.1); }
.sidebar-nav-item.active {
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: var(--shadow-glow);
}
.sidebar-nav-item.active i { color: #fff; }

.sidebar-section-title {
  font-family: var(--font-primary);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .9rem .9rem .3rem;
  margin-top: .5rem;
}

.sidebar-divider { height:1px; background: var(--border); margin: .75rem 0; }

/* ---- SIDEBAR USER CARD ---- */
.sidebar-user-card {
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.sidebar-user-card::before {
  content:'';
  position:absolute;inset:0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='30'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center;
}
.sidebar-user-card .avatar { border: 2px solid rgba(255,255,255,.5); }
.sidebar-user-card .user-name { font-family: var(--font-primary); font-weight: 700; color: #fff; font-size: .95rem; }
.sidebar-user-card .user-handle { font-size: .78rem; color: rgba(255,255,255,.7); }
.sidebar-user-stats { display:flex; gap:1rem; margin-top:.75rem; }
.sidebar-user-stats .stat { text-align:center; }
.sidebar-user-stats .stat-num { font-family:var(--font-primary); font-weight:700; color:#fff; font-size:.95rem; }
.sidebar-user-stats .stat-label { font-size:.65rem; color:rgba(255,255,255,.65); }

/* ============================================================
   STORIES BAR
   ============================================================ */
.stories-bar {
  display: flex;
  gap: .85rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.stories-bar::-webkit-scrollbar { display:none; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--ease);
}
.story-item:hover { transform: translateY(-3px); }

.story-avatar-wrap {
  position: relative;
  padding: 2.5px;
  border-radius: 50%;
  background: var(--gradient-brand);
}
.story-avatar-wrap.seen { background: var(--bg-hover); border: 2px solid var(--border-strong); padding: 0; }
.story-avatar-wrap img {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 2.5px solid var(--bg-card);
  object-fit: cover;
  display: block;
}
.story-avatar-wrap.seen img { border-color: transparent; }

.story-add-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--bg-card-2);
  border: 2px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  transition: var(--ease);
}
.story-add-btn:hover { background: rgba(139,92,246,.15); border-color: var(--primary); }

.story-name {
  font-family: var(--font-primary);
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 68px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   POST CREATION CARD
   ============================================================ */
.post-create-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--ease);
  position: relative;
  z-index: 20;
}
.post-create-card:hover { border-color: var(--border-primary); }

.post-create-input-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.post-create-textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: .7rem 1.2rem;
  color: var(--text-primary);
  font-family: var(--font-secondary);
  font-size: .92rem;
  resize: none;
  outline: none;
  transition: var(--ease);
  min-height: 46px;
  max-height: 140px;
  overflow-y: auto;
}
.post-create-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); background: var(--bg-card-2); }
.post-create-textarea::placeholder { color: var(--text-muted); }

.post-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.post-privacy-trigger {
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.3rem .65rem;
  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:var(--radius-full);
  font-size:.78rem;
  color:var(--text-secondary);
  cursor:pointer;
  transition:var(--ease-fast);
}
.post-privacy-trigger:hover {
  background:var(--bg-hover);
  border-color:var(--border-primary);
  color:var(--text-primary);
}
.post-privacy-dropdown {
  min-width:180px;
  left:0;
  right:auto;
}
.post-privacy-wrap {
  z-index: 30;
}
.post-privacy-dropdown .custom-dropdown-item {
  width:100%;
  border:none;
  background:transparent;
  text-align:left;
}

.post-tag-trigger {
  transition:var(--ease-fast);
}
.post-tag-trigger:hover {
  background:var(--bg-hover) !important;
  border-color:var(--border-primary) !important;
  color:var(--text-primary) !important;
}

.tag-people-modal {
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(0,0,0,.7);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1rem;
}

.tag-people-card {
  width:min(460px, 100%);
  max-height:min(80vh, 680px);
  overflow:hidden;
}

.tag-people-search {
  width:100%;
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:.7rem .95rem;
  color:var(--text-primary);
  font-size:.9rem;
  outline:none;
}

.tag-people-search:focus {
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--primary-glow);
}

.tag-people-list {
  display:flex;
  flex-direction:column;
  gap:.55rem;
  max-height:320px;
  overflow-y:auto;
}

.tag-people-item {
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:.75rem .85rem;
  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  cursor:pointer;
  transition:var(--ease-fast);
  color:var(--text-primary);
  text-align:left;
}

.tag-people-item:hover {
  background:var(--bg-hover);
  border-color:var(--border-primary);
}

.tag-people-item.selected {
  border-color:var(--primary);
  background:rgba(139,92,246,.12);
  box-shadow:var(--shadow-glow);
}

.tag-people-item .info {
  flex:1;
  min-width:0;
}

.tag-people-item .name {
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.88rem;
  color:var(--text-primary);
}

.tag-people-item .meta {
  font-size:.76rem;
  color:var(--text-muted);
  margin-top:.1rem;
}

.tag-people-check {
  width:26px;
  height:26px;
  border-radius:50%;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  color:transparent;
  background:var(--bg-card);
  transition:var(--ease-fast);
}

.tag-people-item.selected .tag-people-check {
  background:var(--gradient-brand);
  border-color:transparent;
  color:#fff;
}

.tag-people-selected {
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
}

.tag-chip {
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.32rem .65rem;
  border-radius:var(--radius-full);
  background:rgba(139,92,246,.14);
  border:1px solid var(--border-primary);
  color:var(--primary-light);
  font-size:.76rem;
  font-family:var(--font-primary);
  font-weight:500;
}

.post-type-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .85rem;
  border-radius: var(--radius-full);
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .8rem;
  font-family: var(--font-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--ease);
  white-space: nowrap;
}
.post-type-btn:hover { background: var(--bg-hover); border-color: var(--border-primary); color: var(--primary-light); transform: translateY(-1px); }
.post-type-btn i { font-size: .9rem; }

.post-type-btn.photo   i { color: #10B981; }
.post-type-btn.video   i { color: #3B82F6; }
.post-type-btn.feeling i { color: #F59E0B; }
.post-type-btn.location i { color: var(--secondary); }
.post-type-btn.poll    i { color: var(--accent); }
.post-type-btn.gif     i { color: #EC4899; }
.post-type-btn.voice   i { color: #EF4444; }
.post-type-btn.ai-post i { color: var(--primary); }
.post-type-btn.ai-img  i { color: var(--accent); }
.post-type-btn.music   i { color: var(--warning); }

.poll-creator-panel {
  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:1rem;
  margin-bottom:1rem;
}

.poll-creator-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin-bottom:.85rem;
}

.poll-creator-title {
  font-family:var(--font-primary);
  font-weight:700;
  font-size:.92rem;
}

.poll-creator-sub {
  font-size:.76rem;
  color:var(--text-muted);
  margin-top:.15rem;
}

.poll-creator-input,
.poll-creator-option-input,
.poll-creator-select {
  width:100%;
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:.7rem .9rem;
  color:var(--text-primary);
  font-size:.88rem;
  outline:none;
  transition:var(--ease-fast);
}

.poll-creator-input:focus,
.poll-creator-option-input:focus,
.poll-creator-select:focus {
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--primary-glow);
}

.poll-creator-options {
  display:flex;
  flex-direction:column;
  gap:.6rem;
  margin-top:.75rem;
}

.poll-creator-option-row {
  display:grid;
  grid-template-columns:1fr auto;
  gap:.55rem;
  align-items:center;
}

.poll-creator-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:.75rem;
  margin-top:.9rem;
}

.poll-creator-meta {
  display:flex;
  gap:.55rem;
  flex-wrap:wrap;
  align-items:center;
}

.gif-picker-modal {
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(0,0,0,.74);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1rem;
}

.gif-picker-card {
  width:min(860px, 100%);
  max-height:min(84vh, 760px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.gif-picker-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem 1.1rem;
  border-bottom:1px solid var(--border);
}

.gif-picker-title {
  font-family:var(--font-primary);
  font-weight:700;
  font-size:1rem;
}

.gif-picker-sub {
  font-size:.78rem;
  color:var(--text-muted);
  margin-top:.15rem;
}

.gif-picker-toolbar {
  padding:1rem 1.1rem .85rem;
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  border-bottom:1px solid var(--border);
}

.gif-picker-search {
  flex:1;
  min-width:220px;
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:.75rem .95rem;
  color:var(--text-primary);
  outline:none;
}

.gif-picker-search:focus {
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--primary-glow);
}

.gif-picker-grid {
  padding:1rem 1.1rem 1.1rem;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:.75rem;
  overflow-y:auto;
}

.gif-picker-item {
  position:relative;
  border-radius:var(--radius-md);
  overflow:hidden;
  border:1px solid var(--border);
  background:var(--bg-card-2);
  cursor:pointer;
  transition:var(--ease-fast);
  aspect-ratio:1 / 1;
}

.gif-picker-item:hover {
  transform:translateY(-2px);
  border-color:var(--border-primary);
  box-shadow:var(--shadow-md);
}

.gif-picker-item img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.gif-picker-caption {
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:.4rem .5rem;
  font-size:.72rem;
  color:#fff;
  background:linear-gradient(to top, rgba(0,0,0,.7), transparent);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.gif-picker-footer {
  padding:.8rem 1.1rem 1rem;
  border-top:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.75rem;
  flex-wrap:wrap;
}

.gif-picker-status {
  font-size:.78rem;
  color:var(--text-muted);
}

.gif-picker-attribution {
  font-size:.72rem;
  color:var(--text-muted);
}

.composer-gif-preview {
  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:.75rem;
  margin-bottom:1rem;
}

.composer-gif-preview-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin-bottom:.6rem;
}

.composer-gif-preview-title {
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.82rem;
}

.composer-gif-preview img {
  width:100%;
  max-height:260px;
  object-fit:cover;
  border-radius:var(--radius-md);
  display:block;
}

.location-creator-panel {
  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:1rem;
  margin-bottom:1rem;
}

.location-creator-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin-bottom:.85rem;
}

.location-creator-title {
  font-family:var(--font-primary);
  font-weight:700;
  font-size:.92rem;
}

.location-creator-sub {
  font-size:.76rem;
  color:var(--text-muted);
  margin-top:.15rem;
}

.location-creator-search {
  width:100%;
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:.7rem .9rem;
  color:var(--text-primary);
  font-size:.88rem;
  outline:none;
}

.location-creator-search:focus {
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--primary-glow);
}

.location-creator-list {
  display:flex;
  flex-direction:column;
  gap:.55rem;
  margin-top:.8rem;
  max-height:280px;
  overflow-y:auto;
}

.location-option {
  display:flex;
  align-items:center;
  gap:.75rem;
  width:100%;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:.8rem .9rem;
  color:var(--text-primary);
  text-align:left;
  cursor:pointer;
  transition:var(--ease-fast);
}

.location-option:hover {
  background:var(--bg-hover);
  border-color:var(--border-primary);
}

.location-option-icon {
  width:34px;
  height:34px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(244,114,182,.14);
  color:var(--secondary);
  flex-shrink:0;
}

.location-option-name {
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.86rem;
}

.location-option-meta {
  font-size:.76rem;
  color:var(--text-muted);
  margin-top:.1rem;
}

.composer-location-preview {
  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:.8rem .9rem;
  margin-bottom:1rem;
}

.composer-location-preview-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.75rem;
}

.composer-location-preview-title {
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.82rem;
}

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  overflow: visible;
  transition: var(--ease);
}
.post-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }

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

.post-author-info { flex:1; }
.post-author-name {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: .92rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.post-author-name .verified { color: var(--accent); font-size: .8rem; }
.post-author-meta {
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.post-author-meta i { font-size: .65rem; }

.post-card-menu { position:relative; z-index:30; }
.post-card-menu .custom-dropdown { z-index:80; }

.post-dropdown-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ease-fast);
}
.post-dropdown-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.post-card-body { padding: 0 1.25rem .75rem; }

.post-text {
  font-size: .93rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: .75rem;
}
.post-text .hashtag { color: var(--primary-light); cursor:pointer; }
.post-text .hashtag:hover { text-decoration:underline; }
.post-text .mention { color: var(--accent); cursor:pointer; }

.post-feeling-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.25);
  color: var(--warning);
  font-size: .78rem;
  font-family: var(--font-primary);
  font-weight: 500;
  padding: .2rem .65rem;
  border-radius: var(--radius-full);
  margin-bottom: .75rem;
}

.post-location-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--secondary);
  font-size: .78rem;
  margin-bottom: .75rem;
}

/* --- Post Media --- */
.post-media-grid { border-radius: var(--radius-md); overflow:hidden; margin-bottom:.75rem; }
.post-media-grid.one img { width:100%; max-height:480px; object-fit:cover; }
.post-media-grid.two { display:grid; grid-template-columns:1fr 1fr; gap:2px; }
.post-media-grid.two img { width:100%; height:240px; object-fit:cover; }
.post-media-grid.three { display:grid; grid-template-columns:1fr 1fr; grid-template-rows: 200px 200px; gap:2px; }
.post-media-grid.three img:first-child { grid-row:span 2; height:100%; object-fit:cover; width:100%; }
.post-media-grid.three img { width:100%; height:200px; object-fit:cover; }
.post-media-grid img { cursor:pointer; transition:var(--ease-fast); }
.post-media-grid img:hover { opacity:.9; }

/* More photos overlay */
.media-more-overlay {
  position:relative;
  display:block;
}
.media-more-overlay::after {
  content: attr(data-count);
  position:absolute;inset:0;
  background:rgba(0,0,0,.6);
  display:flex;
  align-items:center;justify-content:center;
  font-size:1.8rem;font-weight:700;color:#fff;
  font-family:var(--font-primary);
}

/* --- Shared Link Preview --- */
.post-link-preview-site {
  font-size:.73rem;
  font-weight:700;
  color:var(--primary-light);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.post-link-preview-title {
  margin-top:.35rem;
  font-family:var(--font-primary);
  font-size:1rem;
  font-weight:800;
  color:var(--text-primary);
  line-height:1.35;
}
.post-link-preview-description {
  margin-top:.35rem;
  font-size:.84rem;
  line-height:1.6;
  color:var(--text-secondary);
}
.post-link-preview-url {
  margin-top:.55rem;
  font-size:.74rem;
  color:var(--text-muted);
  word-break:break-all;
}
.post-link-preview {
  display:block;
  margin-top:.85rem;
  border:1px solid var(--border);
  border-radius:20px;
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  box-shadow:0 16px 32px rgba(8,8,18,.14);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-link-preview:hover {
  text-decoration:none;
  color:inherit;
  transform:translateY(-1px);
  box-shadow:0 20px 36px rgba(8,8,18,.2);
}
.post-link-preview-image {
  width:100%;
  height:240px;
  background:#07090f;
}
.post-link-preview-image img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.post-link-preview-copy {
  padding:1rem 1.05rem 1.05rem;
}

/* --- Poll Card --- */
.post-poll {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: .75rem;
}
.post-poll-question { font-family:var(--font-primary); font-weight:600; font-size:.92rem; margin-bottom:.75rem; }
.poll-option {
  display:flex;align-items:center;gap:.6rem;
  padding:.55rem .8rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  color:var(--text);
  margin-bottom:.45rem;
  cursor:pointer;
  transition:background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  position:relative;
  overflow:hidden;
}
.poll-option:hover {
  border-color:rgba(206,120,255,.55);
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow:0 10px 24px rgba(5, 5, 18, .24);
}
.poll-option-fill {
  position:absolute;left:0;top:0;bottom:0;
  background:rgba(139,92,246,.15);
  border-radius:inherit;
  transition:width .5s ease;
}
.poll-option-label { flex:1; font-size:.88rem; font-weight:600; color:var(--text); position:relative;z-index:1; }
.poll-option-pct { font-family:var(--font-primary); font-weight:700; font-size:.85rem; color:#f3ccff; position:relative;z-index:1; }

/* --- Post Actions --- */
.post-card-actions {
  display:flex;
  align-items:center;
  padding: .5rem 1.25rem .75rem;
  border-top: 1px solid var(--border);
  gap: .25rem;
}

.post-reaction-wrap { position:relative; }
.post-reaction-wrap::after {
  content:"";
  position:absolute;
  left:0;
  bottom:100%;
  width:100%;
  height:14px;
  background:transparent;
}
.post-action-btn {
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.42rem .9rem;
  border-radius:var(--radius-full);
  background:transparent;
  border:none;
  color:var(--text-muted);
  font-size:.84rem;
  font-family:var(--font-primary);
  font-weight:500;
  cursor:pointer;
  transition:var(--ease-fast);
}
.post-action-btn:hover { background:var(--bg-hover); color:var(--text-primary); }
.post-action-btn.liked { color: var(--secondary); }
.post-action-btn i { font-size:1rem; }

.reactions-popup {
  position:absolute;
  bottom:calc(100% + 4px);
  left:0;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-full);
  padding:.4rem .6rem;
  display:flex;gap:.2rem;
  box-shadow:var(--shadow-lg);
  opacity:0;
  transform:scale(.85) translateY(6px);
  transition:var(--ease-bounce);
  pointer-events:none;
  z-index:100;
  white-space:nowrap;
}
.post-reaction-wrap:hover .reactions-popup,
.post-reaction-wrap:focus-within .reactions-popup { opacity:1; transform:scale(1) translateY(0); pointer-events:all; }
.reaction-emoji {
  appearance:none;
  -webkit-appearance:none;
  border:none !important;
  background:transparent !important;
  box-shadow:none !important;
  outline:none;
  border-radius:0;
  padding:0;
  margin:0;
  line-height:1;
  font-size:1.5rem;
  cursor:pointer;
  transition:var(--ease-bounce);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}
.reaction-emoji:hover { transform:scale(1.35) translateY(-4px); }
.reaction-emoji.is-selected { transform:scale(1.18) translateY(-2px); filter:drop-shadow(0 0 10px rgba(255,255,255,.22)); }

.post-reactions-summary {
  display:flex;align-items:center;gap:.4rem;
  padding:.4rem 1.25rem;
  font-size:.8rem;
  color:var(--text-muted);
}
.reactions-icons { display:flex;gap:2px; }
.reactions-icons span { font-size:.9rem; }

/* --- Comments --- */
.post-comments {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
}

.comment-item {
  display:flex;
  gap:.65rem;
  margin-bottom:.75rem;
  align-items:flex-start;
}
.comment-bubble {
  background:var(--bg-card-2);
  border-radius:0 var(--radius-md) var(--radius-md) var(--radius-md);
  padding:.55rem .9rem;
  flex:1;
}
.comment-author { font-family:var(--font-primary); font-weight:600; font-size:.82rem; margin-bottom:.1rem; }
.comment-text { font-size:.85rem; color:var(--text-secondary); line-height:1.5; }
.comment-actions {
  display:flex;gap:.75rem;margin-top:.3rem;
  font-size:.75rem;color:var(--text-muted);
}
.comment-actions span { cursor:pointer; transition:var(--ease-fast); }
.comment-actions span:hover { color:var(--primary-light); }

.comment-input-row {
  display:flex;gap:.6rem;align-items:center;
  margin-top:.5rem;
}
.comment-input {
  flex:1;
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius-full);
  padding:.5rem 1rem;
  color:var(--text-primary);
  font-family:var(--font-secondary);
  font-size:.85rem;
  outline:none;
  transition:var(--ease);
}
.comment-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-glow); }
.comment-input::placeholder { color:var(--text-muted); }

/* ============================================================
   PROMOTED / AD POST
   ============================================================ */
.promoted-tag {
  display:inline-flex;align-items:center;gap:.3rem;
  font-size:.7rem;font-weight:600;
  color:var(--text-muted);
  background:var(--bg-card-2);
  padding:.15rem .5rem;
  border-radius:var(--radius-full);
  border:1px solid var(--border);
}

/* ============================================================
   FRIEND SUGGESTION CARD
   ============================================================ */
.friend-suggestion-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .9rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  transition: var(--ease);
}
.friend-suggestion-card:hover { border-color: var(--border-primary); background: var(--bg-hover); }
.friend-suggestion-card .info { min-width:0; overflow:hidden; }
.friend-suggestion-card .name {
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.88rem;
  line-height:1.35;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  margin-bottom:.1rem;
}
.friend-suggestion-card .mutual { font-size:.75rem; color:var(--text-muted); }
.friend-suggestion-card .btn-brand,
.friend-suggestion-card .btn-ghost {
  white-space: nowrap;
}

/* ============================================================
   WEATHER WIDGET
   ============================================================ */
.weather-widget {
  background: var(--weather-bg);
  border: 1px solid var(--weather-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  position:relative;
  overflow:hidden;
  color: var(--weather-text);
  box-shadow: var(--shadow-sm);
}
.weather-widget::before {
  content:'';
  position:absolute;right:-20px;top:-20px;
  width:100px;height:100px;
  background: var(--weather-glow);
}
.weather-greeting { font-family:var(--font-primary); font-weight:700; font-size:1rem; color: var(--weather-text); }
.weather-sub { font-size:.78rem; color:var(--weather-subtext); margin-bottom:.75rem; }
.weather-row { display:flex;align-items:center;gap:.75rem; }
.weather-icon { font-size:2.5rem; }
.weather-temp { font-family:var(--font-primary); font-weight:800; font-size:2rem; line-height:1; color: var(--weather-text); }
.weather-desc { font-size:.78rem; color:var(--weather-subtext); }
.weather-location { font-size:.75rem; color:var(--weather-muted); }

/* ============================================================
   RIGHT SIDEBAR WIDGETS
   ============================================================ */
.widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.widget-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: .88rem;
  margin-bottom: .85rem;
  display:flex;align-items:center;justify-content:space-between;
}
.widget-title a { font-size:.75rem; color:var(--primary-light); font-weight:500; }
.widget-title a:hover { color:var(--primary); }

.trending-item {
  display:flex;align-items:center;gap:.65rem;
  padding:.5rem 0;
  border-bottom:1px solid var(--border);
  cursor:pointer;
  transition:var(--ease-fast);
}
.trending-item:last-child { border:none; }
.trending-item:hover { color:var(--primary-light); }
.trending-item .num { font-family:var(--font-primary); font-weight:700; font-size:.72rem; color:var(--text-muted); width:16px; }
.trending-item .tag { font-family:var(--font-primary); font-weight:600; font-size:.85rem; flex:1; }
.trending-item .count { font-size:.72rem; color:var(--text-muted); }

.event-item {
  display:flex;gap:.75rem;align-items:flex-start;
  padding:.6rem 0;
  border-bottom:1px solid var(--border);
}
.event-item:last-child { border:none; }
.event-date-box {
  text-align:center;
  background:var(--gradient-brand);
  border-radius:var(--radius-sm);
  padding:.3rem .5rem;
  min-width:42px;
}
.event-date-box .month { font-size:.62rem; font-weight:600; color:rgba(255,255,255,.8); text-transform:uppercase; }
.event-date-box .day { font-family:var(--font-primary); font-weight:800; font-size:1rem; color:#fff; line-height:1; }
.event-info .title { font-family:var(--font-primary); font-weight:600; font-size:.85rem; }
.event-info .location { font-size:.75rem; color:var(--text-muted); }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-cover {
  height: 340px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow:hidden;
  position:relative;
}
.profile-cover img { width:100%; height:100%; object-fit:cover; }
.profile-cover-overlay {
  position:absolute;inset:0;
  background:linear-gradient(to bottom, transparent 40%, rgba(8,8,18,.9) 100%);
}
.profile-cover-actions {
  position:absolute;bottom:1rem;right:1rem;
  display:flex;gap:.5rem;
}

.profile-info-card {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:0 0 var(--radius-lg) var(--radius-lg);
  padding:1.25rem 1.5rem 1.5rem;
  margin-bottom:1.25rem;
}

.profile-avatar-area {
  display:flex;align-items:flex-end;gap:1rem;
  margin-bottom:1rem;
}
.profile-avatar-wrap {
  position:relative;
  padding:3px;
  background:var(--gradient-brand);
  border-radius:50%;
  flex-shrink:0;
  margin-top:-68px;
}
.profile-avatar-wrap img {
  width:110px;height:110px;
  border-radius:50%;
  border:3px solid var(--bg-card);
  object-fit:cover;
  display:block;
}
.profile-avatar-edit {
  position:absolute;bottom:4px;right:4px;
  width:30px;height:30px;
  background:var(--bg-card);
  border:2px solid var(--bg-card);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  font-size:.8rem;
  color:var(--text-secondary);
  transition:var(--ease);
}
.profile-avatar-edit:hover { background:var(--primary); color:#fff; }

.profile-name-area { flex:1; padding-bottom:.5rem; }
.profile-name { font-family:var(--font-primary); font-weight:800; font-size:1.5rem; display:flex;align-items:center;gap:.4rem; }
.profile-handle { color:var(--text-muted); font-size:.88rem; }

.profile-stats { display:flex;gap:2rem;margin:1rem 0; }
.profile-stat { text-align:center; cursor:pointer; }
.profile-stat:hover .stat-num { color:var(--primary-light); }
.profile-stat .stat-num { font-family:var(--font-primary); font-weight:800; font-size:1.2rem; display:block; }
.profile-stat .stat-label { font-size:.75rem; color:var(--text-muted); }

.profile-bio { font-size:.9rem; color:var(--text-secondary); line-height:1.7; max-width:600px; }

.profile-tabs {
  display:flex;gap:.2rem;
  border-bottom:1px solid var(--border);
  margin-top:1rem;
}
.profile-about-card {
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.profile-about-header {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:1rem;
  padding-bottom:.15rem;
}
.profile-about-title {
  margin:0;
  font-family:var(--font-primary);
  font-weight:800;
  font-size:1rem;
}
.profile-about-subtitle {
  font-size:.75rem;
  color:var(--text-muted);
}
.profile-about-list {
  display:flex;
  flex-direction:column;
  gap:.8rem;
}
.profile-about-item {
  display:flex;
  align-items:center;
  gap:.9rem;
  padding:.9rem 1rem;
  border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius-md);
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}
.profile-about-icon {
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color:var(--primary-light);
  background:linear-gradient(135deg, rgba(139,92,246,.2), rgba(244,114,182,.14));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);
}
.profile-about-copy {
  min-width:0;
}
.profile-about-label {
  font-size:.73rem;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--text-muted);
}
.profile-about-value {
  margin-top:.18rem;
  font-size:.93rem;
  line-height:1.5;
  color:var(--text-secondary);
  word-break:break-word;
}
.profile-tab-btn {
  padding:.6rem 1.1rem;
  border-radius:var(--radius-sm) var(--radius-sm) 0 0;
  background:transparent;
  border:none;
  color:var(--text-muted);
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.88rem;
  cursor:pointer;
  transition:var(--ease-fast);
  position:relative;
}
.profile-tab-btn.active { color:var(--primary-light); }
.profile-tab-btn.active::after {
  content:'';position:absolute;bottom:-1px;left:0;right:0;
  height:2px;background:var(--gradient-brand);border-radius:99px;
}
.profile-tab-btn:hover:not(.active) { color:var(--text-secondary); background:var(--bg-hover); }

/* ============================================================
   GROUP / PAGE CARDS
   ============================================================ */
.group-card {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
  transition:var(--ease);
  cursor:pointer;
}
.group-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--border-primary); }
.group-card-cover { height:130px;position:relative;overflow:hidden; }
.group-card-cover img { width:100%;height:100%;object-fit:cover;transition:var(--ease-slow); }
.group-card:hover .group-card-cover img { transform:scale(1.05); }
.group-card-cover-overlay { position:absolute;inset:0;background:linear-gradient(to bottom,transparent 40%,rgba(0,0,0,.5)); }

.group-card-avatar {
  width:52px;height:52px;
  border-radius:var(--radius-sm);
  border:3px solid var(--bg-card);
  position:absolute;
  bottom:-20px;left:1rem;
  object-fit:cover;
}

.group-card-body { padding:1.5rem 1rem 1rem; }
.group-card-name { font-family:var(--font-primary); font-weight:700; font-size:.95rem; margin-bottom:.2rem; }
.group-card-meta { font-size:.78rem; color:var(--text-muted); display:flex;align-items:center;gap:.4rem; }
.group-card-meta i { font-size:.7rem; }
.group-card-footer { padding:.75rem 1rem; border-top:1px solid var(--border); display:flex;align-items:center;justify-content:space-between; }
.group-card-members { display:flex;align-items:center; }
.group-card-members .avatar { width:24px;height:24px;border:2px solid var(--bg-card);margin-left:-6px;object-fit:cover; }
.group-card-members .avatar:first-child { margin-left:0; }

/* ============================================================
   MARKETPLACE
   ============================================================ */
.marketplace-header {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:1.5rem;
  margin-bottom:1.25rem;
  background-image:linear-gradient(135deg,rgba(139,92,246,.1) 0%,rgba(34,211,238,.05) 100%);
}

.product-card {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
  transition:var(--ease);
  cursor:pointer;
}
.product-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--border-primary); }
.product-card-img { position:relative;overflow:hidden;height:210px; }
.product-card-img img { width:100%;height:100%;object-fit:cover;transition:var(--ease-slow); }
.product-card:hover .product-card-img img { transform:scale(1.06); }
.product-card-badge { position:absolute;top:.6rem;left:.6rem;z-index:1; }
.product-card-wishlist {
  position:absolute;top:.6rem;right:.6rem;z-index:1;
  width:32px;height:32px;
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(8px);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:#fff;cursor:pointer;
  transition:var(--ease);
}
.product-card-wishlist:hover { background:var(--secondary); }
.product-card-body { padding:1rem; }
.product-card-title { font-family:var(--font-primary); font-weight:700; font-size:.92rem; margin-bottom:.25rem;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.product-card-price { font-family:var(--font-primary); font-weight:800; font-size:1.1rem; color:var(--accent); }
.product-card-price .old { font-size:.8rem; color:var(--text-muted); text-decoration:line-through; font-weight:400; margin-left:.3rem; }
.product-card-seller { font-size:.75rem; color:var(--text-muted); margin-top:.3rem; display:flex;align-items:center;gap:.3rem; }

/* ============================================================
   MESSAGES / CHAT
   ============================================================ */
.messages-layout {
  display:grid;
  grid-template-columns:340px 1fr;
  gap:0;
  height:calc(100vh - var(--header-h));
  overflow:hidden;
}

.chat-list-panel {
  border-right:1px solid var(--border);
  background:var(--bg-surface);
  display:flex;flex-direction:column;
  overflow:hidden;
}

.chat-list-header {
  padding:1.25rem 1rem .75rem;
  border-bottom:1px solid var(--border);
}

.chat-list-scroll { flex:1;overflow-y:auto;scrollbar-width:none; }
.chat-list-scroll::-webkit-scrollbar { display:none; }

.chat-list-item {
  display:flex;align-items:center;gap:.7rem;
  padding:.75rem 1rem;
  cursor:pointer;
  transition:var(--ease-fast);
  position:relative;
}
.chat-list-item:hover { background:var(--bg-hover); }
.chat-list-item.active { background:rgba(139,92,246,.12); }
.chat-list-item.active::before {
  content:'';
  position:absolute;left:0;top:0;bottom:0;
  width:3px;background:var(--gradient-brand);
}
.chat-list-item .info { flex:1;overflow:hidden; }
.chat-list-item .name { font-family:var(--font-primary); font-weight:600; font-size:.88rem; display:flex;justify-content:space-between; }
.chat-list-item .preview { font-size:.78rem; color:var(--text-muted); white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.chat-list-item .time { font-size:.72rem; color:var(--text-muted); }

.chat-panel {
  display:flex;flex-direction:column;
  background:var(--bg-dark);
  overflow:hidden;
}
.chat-header {
  padding:1rem 1.25rem;
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:.75rem;
  background:var(--bg-surface);
}
.chat-messages {
  flex:1;overflow-y:auto;
  padding:1rem 1.25rem 1.25rem;
  display:flex;flex-direction:column;
  gap:.75rem;
  scrollbar-width:none;
}
.chat-messages::-webkit-scrollbar { display:none; }

.chat-date-separator {
  text-align:center;
  font-size:.72rem;
  color:var(--text-muted);
  padding:.25rem 0 .75rem;
  position:relative;
}
.chat-date-separator span {
  background:var(--bg-dark);
  padding:0 .75rem;
  position:relative;
  z-index:1;
}
.chat-date-separator::before {
  content:'';
  position:absolute;
  top:calc(50% - 6px);
  left:0;
  right:0;
  height:1px;
  background:var(--border);
}

.chat-bubble-wrap { display:flex; gap:.6rem; align-items:flex-end; max-width:78%; }
.chat-bubble-wrap.outgoing { flex-direction:row-reverse; margin-left:auto; }

.chat-bubble {
  max-width:100%;
  padding:.65rem 1rem;
  border-radius:var(--radius-lg);
  font-size:.88rem;
  line-height:1.6;
  position:relative;
}
.chat-bubble.incoming {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-bottom-left-radius:4px;
}
.chat-bubble.outgoing {
  background:var(--gradient-brand);
  color:#fff;
  border-bottom-right-radius:4px;
}
.chat-bubble-time { font-size:.68rem; color:var(--text-muted); margin-top:.25rem; }
.chat-bubble-wrap.outgoing .chat-bubble-time { text-align:right; color:rgba(255,255,255,.6); }

.audio-message {
  display:flex;
  align-items:center;
  gap:.75rem;
  min-width:180px;
}
.audio-play-btn {
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--gradient-brand);
  border:none;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink:0;
}
.audio-play-btn i {
  font-size:.72rem;
  margin-left:1px;
}

.chat-input-area {
  padding:.75rem 1.25rem;
  border-top:1px solid var(--border);
  background:var(--bg-surface);
  display:flex;align-items:center;gap:.6rem;
}
.chat-input {
  flex:1;
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius-full);
  padding:.55rem 1.1rem;
  color:var(--text-primary);
  font-family:var(--font-secondary);
  font-size:.9rem;
  outline:none;
  transition:var(--ease);
}
.chat-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-glow); }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-item {
  display:flex;gap:.85rem;align-items:flex-start;
  padding:1rem 1.25rem;
  border-bottom:1px solid var(--border);
  transition:var(--ease-fast);
  position:relative;
  cursor:pointer;
}
.notif-item:hover { background:var(--bg-hover); }
.notif-item.unread { background:rgba(139,92,246,.06); }
.notif-item.unread::before {
  content:'';
  position:absolute;left:0;top:0;bottom:0;
  width:3px;background:var(--gradient-brand);
}
.notif-icon {
  width:38px;height:38px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;font-size:.95rem;
}
.notif-icon.like { background:rgba(244,114,182,.15); color:var(--secondary); }
.notif-icon.comment { background:rgba(139,92,246,.15); color:var(--primary-light); }
.notif-icon.follow { background:rgba(34,211,238,.15); color:var(--accent); }
.notif-icon.mention { background:rgba(245,158,11,.15); color:var(--warning); }
.notif-icon.share { background:rgba(16,185,129,.15); color:var(--success); }
.notif-content { flex:1; }
.notif-content .text { font-size:.88rem; line-height:1.5; }
.notif-content .text strong { color:var(--text-primary); }
.notif-content .time { font-size:.75rem; color:var(--text-muted); margin-top:.2rem; }
.notif-img { width:46px;height:46px;border-radius:var(--radius-sm);object-fit:cover;flex-shrink:0; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-layout {
  display:grid;
  grid-template-columns:240px 1fr;
  gap:1.25rem;
  max-width:960px;
  margin:0 auto;
}

.settings-nav-card {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:.75rem;
  height:fit-content;
  position:sticky;
  top:calc(var(--header-h) + 1.5rem);
}
.settings-nav-item {
  display:flex;align-items:center;gap:.65rem;
  padding:.6rem .8rem;
  border-radius:var(--radius-md);
  color:var(--text-secondary);
  font-family:var(--font-primary);
  font-weight:500;
  font-size:.86rem;
  cursor:pointer;
  transition:var(--ease-fast);
  margin-bottom:.1rem;
}
.settings-nav-item i { width:18px;text-align:center; }
.settings-nav-item:hover { background:var(--bg-hover); color:var(--text-primary); }
.settings-nav-item.active { background:rgba(139,92,246,.15); color:var(--primary-light); }

.settings-section {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:1.5rem;
  margin-bottom:1.25rem;
}
.settings-section-title { font-family:var(--font-primary); font-weight:700; font-size:1rem; margin-bottom:1.25rem; padding-bottom:.75rem; border-bottom:1px solid var(--border); }

.settings-input {
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:.6rem 1rem;
  color:var(--text-primary);
  font-family:var(--font-secondary);
  font-size:.9rem;
  width:100%;
  outline:none;
  transition:var(--ease);
}
.settings-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-glow); }

.settings-label { font-family:var(--font-primary); font-weight:600; font-size:.83rem; color:var(--text-secondary); margin-bottom:.4rem; display:block; }

.settings-toggle {
  position:relative;
  display:inline-block;
  width:46px;height:26px;
}
.settings-toggle input { opacity:0;width:0;height:0; }
.settings-toggle-slider {
  position:absolute;inset:0;
  background:var(--bg-hover);
  border:1px solid var(--border);
  border-radius:var(--radius-full);
  cursor:pointer;
  transition:var(--ease);
}
.settings-toggle-slider::before {
  content:'';
  position:absolute;
  height:18px;width:18px;
  left:3px;bottom:3px;
  background:#fff;
  border-radius:50%;
  transition:var(--ease);
}
.settings-toggle input:checked + .settings-toggle-slider { background:var(--gradient-brand); border-color:var(--primary); }
.settings-toggle input:checked + .settings-toggle-slider::before { transform:translateX(20px); }

.theme-option-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.75rem;
  margin-bottom:1rem;
}

.theme-option-card {
  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:1rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:.35rem;
  cursor:pointer;
  transition:var(--ease);
}
.theme-option-card:hover {
  border-color:var(--border-primary);
  transform:translateY(-2px);
}
.theme-option-card.active {
  border-color:var(--primary);
  box-shadow:var(--shadow-glow);
  background:rgba(139,92,246,.08);
}
.theme-option-icon {
  width:48px;
  height:48px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.15rem;
  margin-bottom:.25rem;
  border:1px solid var(--border);
}
.theme-option-card[data-theme-option="dark"] .theme-option-icon {
  background:linear-gradient(135deg, #111122 0%, #231942 100%);
  color:#F8FAFC;
}
.theme-option-card[data-theme-option="light"] .theme-option-icon {
  background:linear-gradient(135deg, #FFFFFF 0%, #E8EEF8 100%);
  color:#475569;
}
.theme-option-title {
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.88rem;
}
.theme-option-sub {
  font-size:.76rem;
  color:var(--text-muted);
}

.emoji-picker-popup {
  position:absolute;
  z-index:1200;
  width:352px;
  max-width:calc(100vw - 24px);
  padding:.35rem;
  border-radius:var(--radius-xl);
  background:var(--glass-bg);
  border:1px solid var(--border);
  box-shadow:var(--shadow-lg);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.emoji-picker-popup emoji-picker {
  width:100%;
  height:420px;
  --border-color: var(--border);
  --background: var(--bg-card);
  --input-border-color: var(--border);
  --input-font-color: var(--text-primary);
  --input-placeholder-color: var(--text-muted);
  --outline-color: var(--primary);
  --category-font-color: var(--text-secondary);
  --button-active-background: rgba(139,92,246,.16);
  --button-hover-background: var(--bg-hover);
  --indicator-color: var(--primary);
}

.theme-quick-toggle {
  position:fixed;
  right:1.25rem;
  bottom:1.25rem;
  z-index:1100;
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  padding:.72rem .95rem;
  border-radius:var(--radius-full);
  background:var(--glass-bg);
  color:var(--text-primary);
  border:1px solid var(--border);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  box-shadow:var(--shadow-md);
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.82rem;
  cursor:pointer;
  transition:var(--ease);
}
.theme-quick-toggle:hover {
  transform:translateY(-2px);
  border-color:var(--border-primary);
}
.theme-quick-toggle i { color:var(--primary-light); }

.nav-theme-toggle {
  border: 1px solid var(--border);
}
.nav-theme-toggle i {
  color: var(--primary-light);
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-filter-tabs {
  display:flex;gap:.35rem;
  flex-wrap:wrap;
  margin-bottom:1.25rem;
}
.search-filter-btn {
  display:inline-flex;align-items:center;gap:.4rem;
  padding:.4rem .95rem;
  border-radius:var(--radius-full);
  background:var(--bg-card);
  border:1px solid var(--border);
  color:var(--text-secondary);
  font-family:var(--font-primary);
  font-weight:500;
  font-size:.82rem;
  cursor:pointer;
  transition:var(--ease);
}
.search-filter-btn:hover { border-color:var(--primary); color:var(--primary-light); }
.search-filter-btn.active { background:var(--gradient-brand); border-color:transparent; color:#fff; }

.search-result-user {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:1.25rem;
  display:flex;align-items:center;gap:1rem;
  margin-bottom:.85rem;
  transition:var(--ease);
}
.search-result-user:hover { border-color:var(--border-primary); transform:translateX(3px); }
.search-result-user .info { flex:1; }
.search-result-user .name { font-family:var(--font-primary); font-weight:700; font-size:.95rem; display:flex;align-items:center;gap:.35rem; }
.search-result-user .handle { font-size:.8rem; color:var(--text-muted); }
.search-result-user .bio { font-size:.82rem; color:var(--text-secondary); margin-top:.3rem; }
.search-result-user .mutual { font-size:.77rem; color:var(--accent); margin-top:.25rem; }

/* ============================================================
   FORMS (Login / Register)
   ============================================================ */
.auth-wrapper {
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr 1fr;
  overflow:hidden;
}

.auth-hero {
  background:var(--gradient-dark-bg);
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:3rem;
}
.auth-hero-bg {
  position:absolute;inset:0;
  background:radial-gradient(ellipse 80% 60% at 50% 40%, rgba(139,92,246,.25) 0%, transparent 70%),
             radial-gradient(ellipse 60% 50% at 80% 80%, rgba(244,114,182,.15) 0%, transparent 70%),
             radial-gradient(ellipse 50% 50% at 20% 90%, rgba(34,211,238,.1) 0%, transparent 70%);
}

.floating-posts {
  position:absolute;inset:0;
  pointer-events:none;
}
.floating-card {
  position:absolute;
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:.75rem 1rem;
  font-size:.82rem;
  animation:floatCard 6s ease-in-out infinite;
  max-width:220px;
}
.floating-card:nth-child(1) { top:15%; left:5%; animation-delay:0s; }
.floating-card:nth-child(2) { top:45%; right:5%; animation-delay:-2s; }
.floating-card:nth-child(3) { bottom:20%; left:8%; animation-delay:-4s; }

@keyframes floatCard {
  0%,100% { transform:translateY(0px) rotate(-1deg); }
  50% { transform:translateY(-12px) rotate(1deg); }
}

.auth-form-side {
  background:var(--bg-dark);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:3rem 2.5rem;
  overflow-y:auto;
}

.auth-form-card {
  width:100%;
  max-width:440px;
}

.auth-form-title { font-family:var(--font-primary); font-weight:800; font-size:1.75rem; margin-bottom:.3rem; }
.auth-form-sub { font-size:.9rem; color:var(--text-muted); margin-bottom:2rem; }

.form-control-custom {
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:.7rem 1rem;
  color:var(--text-primary);
  font-family:var(--font-secondary);
  font-size:.92rem;
  width:100%;
  outline:none;
  transition:var(--ease);
  display:block;
}
.form-control-custom:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-glow); }
.form-control-custom::placeholder { color:var(--text-muted); }

.form-label-custom { font-family:var(--font-primary); font-weight:600; font-size:.83rem; color:var(--text-secondary); margin-bottom:.35rem; display:block; }

.form-group-custom { margin-bottom:1.1rem; }

.input-icon-wrap { position:relative; }
.input-icon-wrap .input-icon { position:absolute; left:.95rem; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:.9rem; pointer-events:none; }
.input-icon-wrap .form-control-custom { padding-left:2.6rem; }
.input-icon-wrap .input-icon-right { position:absolute; right:.95rem; top:50%; transform:translateY(-50%); color:var(--text-muted); cursor:pointer; font-size:.9rem; }
.input-icon-wrap .input-icon-right:hover { color:var(--text-secondary); }

.divider-text {
  text-align:center;
  position:relative;
  margin:1.25rem 0;
  font-size:.82rem;
  color:var(--text-muted);
}
.divider-text::before { content:''; position:absolute; top:50%; left:0; right:0; height:1px; background:var(--border); }
.divider-text span { background:var(--bg-dark); padding:0 .8rem; position:relative;z-index:1; }

.social-auth-btn {
  display:flex;align-items:center;justify-content:center;gap:.65rem;
  padding:.65rem 1rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  background:var(--bg-input);
  color:var(--text-secondary);
  font-family:var(--font-primary);
  font-weight:600;
  font-size:.88rem;
  cursor:pointer;
  transition:var(--ease);
  width:100%;
}
.social-auth-btn:hover { border-color:var(--border-primary); background:var(--bg-hover); color:var(--text-primary); }
.social-auth-btn img { width:20px;height:20px; }

/* ============================================================
   STEP PROGRESS (Register)
   ============================================================ */
.step-progress {
  display:flex;align-items:center;
  margin-bottom:2rem;
  gap:0;
}
.step-dot {
  width:36px;height:36px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-primary);
  font-weight:700;
  font-size:.85rem;
  flex-shrink:0;
  position:relative;
  z-index:1;
  transition:var(--ease);
}
.step-dot.done { background:var(--gradient-brand); color:#fff; box-shadow:var(--shadow-glow); }
.step-dot.active { background:transparent; border:2px solid var(--primary); color:var(--primary-light); box-shadow:var(--shadow-glow); }
.step-dot.pending { background:var(--bg-card-2); border:2px solid var(--border); color:var(--text-muted); }
.step-line { flex:1; height:2px; background:var(--border); margin:0 4px; }
.step-line.done { background:var(--gradient-brand); }

/* ============================================================
   PAGE DETAIL (Groups/Pages)
   ============================================================ */
.page-detail-cover { height:280px;border-radius:var(--radius-lg) var(--radius-lg) 0 0;overflow:hidden;position:relative; }
.page-detail-cover img { width:100%;height:100%;object-fit:cover; }
.page-detail-cover-overlay { position:absolute;inset:0;background:linear-gradient(to bottom,transparent 30%,rgba(0,0,0,.7)); }

.page-detail-info {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-top:none;
  border-radius:0 0 var(--radius-lg) var(--radius-lg);
  padding:1.5rem;
}

/* ============================================================
   ADD PRODUCT FORM
   ============================================================ */
.product-image-upload {
  border:2px dashed var(--border-strong);
  border-radius:var(--radius-lg);
  padding:2.5rem;
  text-align:center;
  cursor:pointer;
  transition:var(--ease);
  background:var(--bg-input);
}
.product-image-upload:hover { border-color:var(--primary); background:rgba(139,92,246,.05); }
.product-image-upload .upload-icon { font-size:3rem; color:var(--text-muted); margin-bottom:.75rem; }
.product-image-upload .upload-text { font-family:var(--font-primary); font-weight:600; font-size:.92rem; color:var(--text-secondary); }
.product-image-upload .upload-hint { font-size:.78rem; color:var(--text-muted); margin-top:.3rem; }

.image-preview-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:.5rem; margin-top:1rem; }
.image-preview-item { position:relative; border-radius:var(--radius-sm); overflow:hidden; aspect-ratio:1; }
.image-preview-item img { width:100%;height:100%;object-fit:cover; }
.image-preview-item .remove-btn {
  position:absolute;top:.25rem;right:.25rem;
  width:22px;height:22px;
  background:rgba(0,0,0,.7);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:.65rem;cursor:pointer;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.bg-card-custom { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); }
.bg-card-2-custom { background:var(--bg-card-2); border:1px solid var(--border); border-radius:var(--radius-md); }
.gradient-border {
  position:relative;
  border-radius:var(--radius-lg);
  padding:1px;
  background:var(--gradient-brand);
}
.gradient-border-inner { background:var(--bg-card); border-radius:calc(var(--radius-lg) - 1px); }

.pulse-dot {
  width:8px;height:8px;
  background:var(--success);
  border-radius:50%;
  display:inline-block;
  position:relative;
}
.pulse-dot::after {
  content:'';
  position:absolute;inset:-3px;
  border-radius:50%;
  background:var(--success);
  opacity:.4;
  animation:pulseDot 2s ease infinite;
}
@keyframes pulseDot { 0%,100% { transform:scale(1); opacity:.4; } 50% { transform:scale(1.6); opacity:0; } }

.glow-primary { box-shadow:var(--shadow-glow); }
.glow-pink { box-shadow:var(--shadow-pink); }
.glow-cyan { box-shadow:var(--shadow-cyan); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity:0; transform:translateX(-20px); }
  to   { opacity:1; transform:translateX(0); }
}
@keyframes scaleIn {
  from { opacity:0; transform:scale(.9); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes shimmer {
  from { background-position:-400px 0; }
  to   { background-position:400px 0; }
}

.animate-fade-up  { animation:fadeInUp .5s ease both; }
.animate-fade-up-d1 { animation:fadeInUp .5s ease .1s both; }
.animate-fade-up-d2 { animation:fadeInUp .5s ease .2s both; }
.animate-fade-up-d3 { animation:fadeInUp .5s ease .3s both; }
.animate-scale-in { animation:scaleIn .4s ease both; }

/* Skeleton Loader */
.skeleton {
  background:linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-2) 50%, var(--bg-card) 75%);
  background-size:400px 100%;
  animation:shimmer 1.4s ease-in-out infinite;
  border-radius:var(--radius-sm);
}

/* ============================================================
   DROPDOWN MENUS
   ============================================================ */
.custom-dropdown {
  position:absolute;
  right:0;top:calc(100% + 6px);
  min-width:180px;
  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:.35rem;
  box-shadow:var(--shadow-lg);
  z-index:500;
  animation:scaleIn .2s ease;
}
.custom-dropdown-item {
  display:flex;align-items:center;gap:.65rem;
  padding:.52rem .8rem;
  border-radius:var(--radius-sm);
  font-family:var(--font-primary);
  font-size:.84rem;
  color:var(--text-secondary);
  cursor:pointer;
  transition:var(--ease-fast);
}
.custom-dropdown-item:hover { background:var(--bg-hover); color:var(--text-primary); }
.custom-dropdown-item.danger { color:var(--danger); }
.custom-dropdown-item.danger:hover { background:rgba(239,68,68,.1); }
.custom-dropdown-divider { height:1px; background:var(--border); margin:.3rem 0; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-custom .modal-content {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-lg);
}
.modal-custom .modal-header {
  border-bottom:1px solid var(--border);
  padding:1.25rem 1.5rem;
}
.modal-custom .modal-title { font-family:var(--font-primary); font-weight:700; }
.modal-custom .btn-close { filter:invert(1) opacity(.5); }
.modal-custom .modal-body { padding:1.5rem; }
.modal-custom .modal-footer { border-top:1px solid var(--border); padding:1rem 1.5rem; }

/* ============================================================
   FEATURE PAGES
   ============================================================ */
.feature-shell {
  max-width:1320px;
  margin:0 auto;
  padding:calc(var(--header-h) + 1.5rem) 1.25rem 3rem;
}
.feature-hero {
  position:relative;
  overflow:hidden;
  padding:1.5rem;
  border-radius:var(--radius-2xl);
  border:1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(244,114,182,.16), transparent 36%),
    radial-gradient(circle at left center, rgba(34,211,238,.12), transparent 30%),
    linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  box-shadow:var(--shadow-lg);
}
.feature-hero::after {
  content:'';
  position:absolute;
  inset:auto -80px -80px auto;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(139,92,246,.18), transparent 70%);
  pointer-events:none;
}
.feature-hero-title {
  margin:0;
  font-family:var(--font-primary);
  font-size:clamp(1.7rem, 2.6vw, 2.6rem);
  font-weight:800;
  line-height:1.05;
}
.feature-hero-text {
  max-width:700px;
  margin:.6rem 0 0;
  color:var(--text-muted);
  font-size:.94rem;
  line-height:1.75;
}
.feature-chip-row {
  display:flex;
  gap:.55rem;
  flex-wrap:wrap;
  margin-top:1rem;
}
.feature-pill {
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.45rem .8rem;
  border-radius:var(--radius-full);
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text-secondary);
  font-family:var(--font-primary);
  font-size:.78rem;
  font-weight:600;
}
.feature-grid {
  display:grid;
  grid-template-columns:280px minmax(0, 1fr) 300px;
  gap:1.25rem;
  margin-top:1.35rem;
}
.feature-grid.two-col {
  grid-template-columns:300px minmax(0, 1fr);
}
.feature-sidebar,
.feature-card {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-md);
}
.feature-sidebar {
  padding:1rem;
  height:fit-content;
}
.feature-main-stack {
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.feature-card {
  padding:1rem 1.05rem;
}
.feature-card-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.9rem;
}
.feature-card-title {
  margin:0;
  font-family:var(--font-primary);
  font-size:1rem;
  font-weight:800;
}
.feature-card-subtitle {
  margin-top:.2rem;
  color:var(--text-muted);
  font-size:.8rem;
}
.feature-list {
  display:flex;
  flex-direction:column;
  gap:.8rem;
}
.feature-list-item {
  display:flex;
  align-items:center;
  gap:.8rem;
  padding:.8rem;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:rgba(255,255,255,.03);
}
.feature-thumb {
  width:56px;
  height:56px;
  border-radius:var(--radius-md);
  object-fit:cover;
  flex-shrink:0;
}
.feature-thumb.lg {
  width:84px;
  height:84px;
  border-radius:var(--radius-lg);
}
.feature-kicker {
  color:var(--primary-light);
  font-family:var(--font-primary);
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.feature-meta {
  color:var(--text-muted);
  font-size:.78rem;
  line-height:1.7;
}
.feature-stat-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:.8rem;
}
.feature-stat {
  padding:.9rem;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:rgba(255,255,255,.03);
}
.feature-stat-value {
  font-family:var(--font-primary);
  font-size:1.3rem;
  font-weight:800;
  color:var(--text-primary);
}
.feature-stat-label {
  margin-top:.25rem;
  color:var(--text-muted);
  font-size:.76rem;
}
.feature-action-row {
  display:flex;
  gap:.65rem;
  flex-wrap:wrap;
  margin-top:1rem;
}
.feature-progress {
  height:10px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
}
.feature-progress > span {
  display:block;
  height:100%;
  border-radius:inherit;
  background:var(--gradient-brand);
}
.feature-form-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.9rem;
}
.feature-input,
.feature-textarea,
.feature-select {
  width:100%;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:var(--bg-input);
  color:var(--text-primary);
  padding:.75rem .9rem;
  font-size:.88rem;
  outline:none;
}
.feature-textarea {
  min-height:160px;
  resize:vertical;
}
.feature-input:focus,
.feature-textarea:focus,
.feature-select:focus {
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(139,92,246,.14);
}
.feature-banner {
  padding:1rem;
  border-radius:var(--radius-xl);
  border:1px solid rgba(34,211,238,.2);
  background:linear-gradient(135deg, rgba(34,211,238,.12), rgba(139,92,246,.12));
}
.feature-empty {
  text-align:center;
  padding:1.4rem;
  border:1px dashed var(--border);
  border-radius:var(--radius-lg);
  color:var(--text-muted);
  background:rgba(255,255,255,.02);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1400px) {
  :root { --sidebar-w: 272px; --right-sidebar-w: 306px; }
}
@media (max-width:1200px) {
  :root { --right-sidebar-w: 0px; --sidebar-w: 236px; }
  .right-sidebar { display:none; }
  .main-content { margin-right:0; }
  .feature-grid { grid-template-columns:260px minmax(0, 1fr); }
  .feature-grid > .feature-sidebar:last-child { display:none; }
}
@media (max-width:992px) {
  :root { --sidebar-w: 0px; }
  .left-sidebar { display:none; }
  .main-content { margin-left:0; }
  .feature-grid,
  .feature-grid.two-col,
  .feature-form-grid { grid-template-columns:1fr; }
  .feature-grid > .feature-sidebar:last-child { display:block; }
  .auth-wrapper { grid-template-columns:1fr; }
  .auth-hero { display:none; }
  .messages-layout { grid-template-columns:1fr; }
  .chat-list-panel { display:none; }
  .settings-layout { grid-template-columns:1fr; }
  .settings-nav-card { display:none; }
}
@media (max-width:768px) {
  .nav-links { display:none; }
  .post-type-tabs { gap:.25rem; }
  .post-type-btn span { display:none; }
  .theme-quick-toggle {
    right:.85rem;
    bottom:.85rem;
    padding:.72rem;
  }
  .theme-quick-toggle .theme-toggle-label { display:none; }
}
