/* LAYOUT */
  #main-app {
    display: none;
    padding-bottom: 76px;
  }

  .app-header {
    background: var(--bg-main);
    padding: 11px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 200;
  }

  .header-logo {
    max-height: 42px;
  }

  .logout-btn {
    border: none;
    background: #fff1f2;
    color: #e11d48;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
  }

  .logout-btn:hover {
    background: #fecdd3;
  }

  /* PAGES */
  .page {
    display: none;
    padding: 16px 14px;
    max-width: 650px;
    margin: 0 auto;
  }

  .page.active {
    display: block;
    animation: slideUp .4s ease;
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(18px)
    }

    to {
      opacity: 1;
      transform: translateY(0)
    }
  }

  @keyframes fadeInUp {
    0% {
      opacity: 0;
      transform: translateY(18px)
    }

    100% {
      opacity: 1;
      transform: translateY(0)
    }
  }

  .animate-in {
    opacity: 0;
    animation: fadeInUp .5s cubic-bezier(.2, .8, .2, 1) forwards;
  }

/* PROFILE HEADER (Facebook Inspired) */
.profile-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.profile-cover {
  display: none;
}

.profile-content {
  padding: 20px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.profile-top-row {
  display: flex;
  align-items: center; /* Center text vertically with the circle */
  gap: 20px;
  margin-bottom: 20px;
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  background: #f1f5f9;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.avatar-edit-btn {
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.2s;
}

.avatar-edit-btn:hover {
  background: #e2e8f0;
  transform: scale(1.05);
}

.profile-info {
  flex: 1;
  padding-bottom: 5px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 1px;
}

.profile-name-row h2 {
  font-size: 22px;
  font-weight: 900;
  color: #1e293b;
  margin: 0;
}

.profile-verified {
  color: #1877f2;
  font-size: 16px;
}

.profile-stats {
  display: none;
}

.profile-stats b {
  color: #1e293b;
  font-weight: 700;
}

.profile-bio {
  font-size: 13px;
  color: #475569;
  margin-bottom: 18px;
  line-height: 1.6;
  font-weight: 500;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 14px;
  border-right: 4px solid var(--teal);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: #64748b;
}

.profile-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-meta i {
  color: #94a3b8;
  font-size: 13px;
}

.profile-actions {
  display: flex;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.btn-fb {
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Cairo';
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  transition: all 0.2s;
  flex: 1;
}

.btn-fb-primary {
  background: var(--blue);
  color: #fff;
  flex: 2;
}

.btn-fb-primary:hover { background: #252361; transform: translateY(-1px); }

.btn-fb-secondary {
  background: rgba(49, 46, 129, 0.1);
  color: var(--blue);
}

.btn-fb-secondary:hover { background: rgba(49, 46, 129, 0.15); transform: translateY(-1px); }

.btn-fb-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e4e6eb;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1c1e21;
  transition: all 0.2s;
}

.btn-fb-icon:hover { background: #d8dadf; transform: translateY(-1px); }

/* Dark mode adjustment for profile card */
body.dark-mode .profile-card {
  background: #1e1e1e;
  border-color: rgba(255,255,255,0.05);
}
body.dark-mode .profile-avatar { border-color: #1e1e1e; }
body.dark-mode .profile-name-row h2 { color: #f8fafc; }
body.dark-mode .profile-bio { color: #cbd5e1; }
body.dark-mode .profile-actions { border-top-color: rgba(255,255,255,0.05); }
body.dark-mode .btn-fb-secondary, body.dark-mode .btn-fb-icon {
  background: #3a3b3c;
  color: #e4e6eb;
}
body.dark-mode .avatar-edit-btn { background: #3a3b3c; color: #e4e6eb; }

  