/* ==========================================
   LIGHTBOX: Full-screen image/gallery viewer
   ========================================== */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 95vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
  user-select: none;
  transition: transform 0.3s ease;
}

.lightbox-img.zoomed {
  cursor: grab;
  transform: scale(1.8);
}

.lightbox-img.zoomed.dragging {
  cursor: grabbing;
}

/* Close button */
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 5002;
}

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

/* Navigation arrows */
.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 5002;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

/* Counter */
.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-family: var(--font-body);
  z-index: 5002;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 16px;
  border-radius: 20px;
}

/* Caption */
.lightbox-caption {
  position: fixed;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-family: var(--font-body);
  text-align: center;
  max-width: 80vw;
  z-index: 5002;
}

/* Thumbnail strip */
.lightbox-thumbs {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  max-width: 90vw;
  overflow-x: auto;
  padding: 6px;
  z-index: 5002;
}

.lightbox-thumb {
  width: 56px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.4;
  border: 2px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}

.lightbox-thumb:hover {
  opacity: 0.7;
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--color-teal, #4A9B93);
}

/* Mobile */
@media (max-width: 768px) {
  .lightbox-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  .lightbox-thumbs {
    bottom: 50px;
  }

  .lightbox-thumb {
    width: 44px;
    height: 32px;
  }
}

/* ==========================================
   USER PROFILE PAGE (Public)
   ========================================== */

.user-profile-page {
  max-width: 700px;
  margin: 0 auto;
}

.user-profile-card {
  background: var(--bg-dark-secondary, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.user-profile-banner {
  height: 160px;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  position: relative;
}

.user-profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-avatar-wrap {
  position: relative;
  text-align: center;
  margin-top: -50px;
}

.user-profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-dark-secondary, #1a1a1a);
  background: var(--bg-dark, #121111);
}

.user-profile-info {
  padding: 16px 32px 32px;
  text-align: center;
}

.user-profile-name {
  font-size: 1.6rem;
  color: var(--color-cream, #EBE7D3);
  font-family: var(--font-heading, 'Outfit', sans-serif);
  margin-bottom: 4px;
}

.user-profile-role-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.user-profile-role-badge.viewer {
  background: rgba(74, 155, 147, 0.15);
  color: var(--color-teal, #4A9B93);
}

.user-profile-role-badge.dev {
  background: rgba(224, 179, 58, 0.15);
  color: var(--color-mustard, #E0B33A);
}

.user-profile-bio {
  color: var(--text-muted, #a0a0a0);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.user-profile-joined {
  font-size: 0.8rem;
  color: var(--text-muted, #a0a0a0);
  opacity: 0.7;
}

/* Profile Edit Form */
.profile-edit-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-edit-section h3 {
  font-size: 1.1rem;
  color: var(--color-cream, #EBE7D3);
  margin-bottom: 16px;
}

.profile-form-group {
  margin-bottom: 16px;
}

.profile-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #a0a0a0);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-form-input,
.profile-form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main, #EBE7D3);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.profile-form-input:focus,
.profile-form-textarea:focus {
  border-color: var(--color-teal, #4A9B93);
}

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

.profile-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--color-teal, #4A9B93);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.profile-save-btn:hover {
  background: #3d8a83;
  transform: translateY(-1px);
}

.profile-save-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Profile Form Row (two columns) */
.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .profile-form-row { grid-template-columns: 1fr; }
}

/* Profile Dynamic Fields (experience, portfolio) */
.profile-dynamic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.profile-dynamic-header .profile-section-title { margin-bottom: 0; }
.profile-add-btn {
  background: rgba(74,155,147,0.12);
  border: 1px solid rgba(74,155,147,0.25);
  color: var(--color-teal, #4A9B93);
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.profile-add-btn:hover {
  background: rgba(74,155,147,0.2);
  border-color: rgba(74,155,147,0.4);
}
.profile-dynamic-item {
  position: relative;
  margin-bottom: 8px;
}
.profile-dynamic-item .profile-form-input {
  width: 100%;
}
.profile-remove-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted, #a0a0a0);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s;
}
.profile-remove-btn:hover {
  color: #ff4757;
  background: rgba(255,71,87,0.08);
}

/* Upload Button (public profile) */
.profile-upload-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-muted, #a0a0a0);
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.profile-upload-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Profile Section Cards (theme picker, badge selector, etc.) */
.profile-section-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}
.profile-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-cream, #EBE7D3);
  margin-bottom: 4px;
}
.profile-section-desc {
  font-size: 0.78rem;
  color: var(--text-muted, #a0a0a0);
  margin-bottom: 14px;
}

/* Theme Picker Grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}
.theme-option {
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 6px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.theme-option:hover {
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.theme-option.active {
  border-color: var(--color-teal, #4A9B93);
  background: rgba(74,155,147,0.1);
  box-shadow: 0 0 12px rgba(74,155,147,0.15);
}
.theme-preview {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 6px;
}
.theme-color {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
}
.theme-name {
  font-size: 0.7rem;
  color: var(--text-muted, #a0a0a0);
  font-weight: 500;
  text-transform: capitalize;
}
.theme-option.active .theme-name {
  color: var(--color-teal, #4A9B93);
}

/* Badge Selector Grid */
.badge-selector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge-selector-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted, #a0a0a0);
}
.badge-selector-item:hover {
  background: rgba(255,255,255,0.08);
}
.badge-selector-item.selected {
  border-color: var(--color-teal, #4A9B93);
  background: rgba(74,155,147,0.15);
  color: var(--color-teal, #4A9B93);
}

/* Profile Badges Display (shown in header) */
.profile-badges-display {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}
.profile-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 500;
}

/* Follow Stats */
.profile-follow-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 10px;
}
.profile-follow-stats span {
  font-size: 0.85rem;
  color: var(--text-muted, #a0a0a0);
}
.profile-follow-stats strong {
  color: var(--color-cream, #EBE7D3);
}

/* Profile Team Role */
.profile-team-role {
  font-size: 0.85rem;
  color: var(--text-muted, #a0a0a0);
  margin-top: 6px;
}

/* Profile Social Links */
.profile-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}
.profile-social-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--color-teal, #4A9B93);
  background: rgba(74,155,147,0.08);
  border: 1px solid rgba(74,155,147,0.2);
  text-decoration: none;
  transition: all 0.2s;
}
.profile-social-link:hover {
  background: rgba(74,155,147,0.15);
  border-color: rgba(74,155,147,0.4);
}

/* Profile Detail Sections */
.profile-detail-section {
  margin-top: 12px;
  text-align: left;
}
.profile-detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #a0a0a0);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.profile-detail-item {
  font-size: 0.85rem;
  color: var(--color-cream, #EBE7D3);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.profile-portfolio-link {
  color: var(--color-teal, #4A9B93);
  text-decoration: none;
  font-size: 0.85rem;
}
.profile-portfolio-link:hover {
  text-decoration: underline;
}

/* Admin Redirect (dev profile) */
.profile-admin-redirect {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(224,179,58,0.08);
  border: 1px solid rgba(224,179,58,0.2);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.profile-admin-redirect:hover {
  background: rgba(224,179,58,0.15);
  border-color: rgba(224,179,58,0.4);
}
.profile-admin-icon {
  font-size: 1.8rem;
}
.profile-admin-redirect h4 {
  font-size: 0.9rem;
  color: var(--color-mustard, #E0B33A);
  margin-bottom: 2px;
}
.profile-admin-redirect p {
  font-size: 0.75rem;
  color: var(--text-muted, #a0a0a0);
}

/* Avatar Section */
.avatar-section {
  margin-top: 16px;
}
.avatar-section-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #a0a0a0);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.avatar-pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.avatar-pick-grid img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.avatar-pick-grid img:hover,
.avatar-pick-grid img.selected {
  border-color: var(--color-teal, #4A9B93);
  transform: scale(1.08);
}
.avatar-pick-locked {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 2px dashed rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: default;
  opacity: 0.5;
}
.avatar-gif-note {
  font-size: 0.72rem;
  color: var(--color-mustard, #E0B33A);
  margin-bottom: 6px;
}
.avatar-upload-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.avatar-size-note {
  font-size: 0.72rem;
  color: var(--text-muted, #a0a0a0);
  margin-top: 4px;
}
.banner-preview-img {
  width: 100%;
  max-height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 6px;
}

/* Profile Form Hint */
.profile-form-hint {
  font-size: 0.72rem;
  color: var(--text-muted, #a0a0a0);
  margin-top: 4px;
}

/* Profile Check Button (badge check mark) */
.profile-check-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
}

/* Community Profile Follow Button */
.community-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
  margin-top: 10px;
}
.community-follow-btn.follow {
  background: var(--color-teal, #4A9B93);
  color: #fff;
}
.community-follow-btn.follow:hover {
  background: #3d8a83;
}
.community-follow-btn.following {
  background: rgba(255,255,255,0.08);
  color: var(--text-muted, #a0a0a0);
  border: 1px solid rgba(255,255,255,0.15);
}
.community-follow-btn.following:hover {
  background: rgba(210,70,40,0.15);
  border-color: rgba(210,70,40,0.4);
  color: var(--color-rust, #D24628);
}

/* Community Profile Stats in modal */
.community-profile-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
}
.community-profile-stats span {
  font-size: 0.82rem;
  color: var(--text-muted, #a0a0a0);
}
.community-profile-stats strong {
  color: var(--color-cream, #EBE7D3);
}

/* Follow List Modal */
.follow-list-card {
  background: var(--bg-dark-secondary, #1a1a1e);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  width: 400px;
  max-width: 92vw;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: communityProfileIn 0.2s ease;
  position: relative;
}
.follow-list-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 40px 0 0;
  position: relative;
}
.follow-list-tab {
  flex: 1;
  padding: 14px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted, #a0a0a0);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.follow-list-tab:hover {
  color: var(--color-cream, #EBE7D3);
}
.follow-list-tab.active {
  color: var(--color-teal, #4A9B93);
  border-bottom-color: var(--color-teal, #4A9B93);
}
#follow-list-content {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.follow-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.follow-list-item:last-child { border-bottom: none; }
.follow-list-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
}
.follow-list-info {
  flex: 1;
  min-width: 0;
}
.follow-list-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-cream, #EBE7D3);
}
.follow-list-role {
  font-size: 0.72rem;
  color: var(--text-muted, #a0a0a0);
  text-transform: uppercase;
}
.btn-follow-action {
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted, #a0a0a0);
  font-family: inherit;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-follow-action:hover {
  background: rgba(210,70,40,0.15);
  border-color: rgba(210,70,40,0.4);
  color: var(--color-rust, #D24628);
}

/* ==========================================
   NOTIFICATIONS (Bell icon + dropdown)
   ========================================== */

.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted, #a0a0a0);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  flex-shrink: 0;
}

.notif-bell:hover {
  background: rgba(74, 155, 147, 0.2);
  color: var(--color-teal, #4A9B93);
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--color-rust, #D24628);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  background: var(--bg-dark-secondary, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  z-index: 1100;
}

.notif-dropdown.open {
  display: block;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-dropdown-header h4 {
  font-size: 0.95rem;
  color: var(--color-cream, #EBE7D3);
  font-family: var(--font-heading, 'Outfit', sans-serif);
}

.notif-mark-read {
  background: none;
  border: none;
  color: var(--color-teal, #4A9B93);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.notif-mark-read:hover {
  text-decoration: underline;
}

.notif-list {
  overflow-y: auto;
  max-height: 350px;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.2s;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
  background: rgba(74, 155, 147, 0.06);
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

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

.notif-item-title {
  font-size: 0.85rem;
  color: var(--color-cream, #EBE7D3);
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-msg {
  font-size: 0.78rem;
  color: var(--text-muted, #a0a0a0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 0.7rem;
  color: var(--text-muted, #a0a0a0);
  opacity: 0.6;
  margin-top: 2px;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted, #a0a0a0);
  font-size: 0.85rem;
}

/* Mobile notifications */
@media (max-width: 768px) {
  .notif-dropdown {
    position: fixed;
    top: var(--nav-height, 56px);
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100vh - var(--nav-height, 56px) - 20px);
    border-radius: 0 0 12px 12px;
  }
}

/* ==========================================
   COMMUNITY FORUM (Redesigned v2)
   ========================================== */

/* Hero Header */
.community-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.community-hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-cream, #EBE7D3);
  font-family: var(--font-heading, 'Outfit', sans-serif);
  letter-spacing: -0.5px;
}
.community-hero-desc {
  font-size: 0.9rem;
  color: var(--text-muted, #a0a0a0);
  margin-top: 4px;
}

/* Search */
.community-search-wrap {
  flex-shrink: 0;
}
.community-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}
.community-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted, #666);
  pointer-events: none;
}
.community-search {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 14px 10px 36px;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  width: 260px;
  outline: none;
  transition: all 0.25s;
}
.community-search:focus {
  border-color: var(--color-teal, #4A9B93);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(74,155,147,0.1);
}

/* Layout */
.community-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
.community-main {
  min-width: 0;
}

/* Sidebar */
.community-sidebar {
  position: sticky;
  top: 80px;
}
.community-sidebar-card {
  background: var(--bg-dark-secondary, rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(8px);
}
.community-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-cream, #EBE7D3);
  margin-bottom: 14px;
  font-family: var(--font-heading, 'Outfit', sans-serif);
}
.community-sidebar-title svg {
  color: var(--color-teal, #4A9B93);
}

/* Trending items */
.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: default;
}
.trending-item:last-child { border-bottom: none; }
.trending-rank {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-teal, #4A9B93);
  min-width: 24px;
  padding-top: 2px;
  font-family: var(--font-heading, 'Outfit', sans-serif);
}
.trending-info { flex: 1; min-width: 0; }
.trending-title {
  font-size: 0.82rem;
  color: var(--color-cream, #EBE7D3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trending-meta {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-muted, #a0a0a0);
  margin-top: 4px;
}

/* Empty state */
.community-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 30vh;
  text-align: center;
  gap: 12px;
  padding: 40px 20px;
}
.community-empty-icon { font-size: 2.5rem; opacity: 0.3; }
.community-empty-title {
  font-size: 1.2rem;
  color: var(--color-cream, #EBE7D3);
  font-family: var(--font-heading, 'Outfit', sans-serif);
}
.community-empty-desc {
  color: var(--text-muted, #a0a0a0);
  font-size: 0.9rem;
  max-width: 360px;
}

/* Compose box */
.community-compose {
  background: var(--bg-dark-secondary, rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s;
}
.community-compose:focus-within {
  border-color: rgba(74,155,147,0.3);
}
.community-compose-header {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.community-type-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted, #a0a0a0);
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  transition: all 0.2s;
}
.community-type-btn svg { flex-shrink: 0; }
.community-type-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.community-type-btn.active {
  background: rgba(74,155,147,0.15);
  border-color: rgba(74,155,147,0.3);
  color: var(--color-teal, #4A9B93);
}
.community-textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  font-family: inherit;
  resize: vertical;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s;
  box-sizing: border-box;
}
.community-textarea:focus {
  border-color: rgba(74,155,147,0.4);
}
.community-field {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.community-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.12);
  color: var(--text-muted, #a0a0a0);
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.community-upload-label:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.community-field-hint {
  font-size: 0.72rem;
  color: var(--text-muted, #a0a0a0);
  margin-left: 8px;
}
.community-field input[type="file"] {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.community-url-input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.25s;
  box-sizing: border-box;
}
.community-url-input:focus {
  border-color: rgba(74,155,147,0.4);
}
.community-compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
.community-status { color: var(--text-muted); font-size: 0.82rem; }
.community-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-teal, #4A9B93);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.community-post-btn svg { flex-shrink: 0; }
.community-post-btn:hover {
  background: #3d8a83;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74,155,147,0.25);
}
.community-post-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Muted notice */
.community-muted {
  background: rgba(255,71,87,0.06);
  border: 1px solid rgba(255,71,87,0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #ff4757;
  font-size: 0.88rem;
}

/* ====== Post cards ====== */
.community-post {
  background: var(--bg-dark-secondary, rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.25s ease;
}
.community-post:hover {
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.community-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.community-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}
.community-avatar.clickable:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--color-teal, #4A9B93);
}
.clickable { cursor: pointer; }
.community-post-author { flex: 1; min-width: 0; }
.community-author-name {
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-cream, #EBE7D3);
}
.community-author-name .clickable:hover {
  color: var(--color-teal, #4A9B93);
}
.community-dev-badge {
  background: rgba(61,220,132,0.1);
  color: #3ddc84;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.community-dev-badge.small {
  font-size: 0.62rem;
  padding: 1px 6px;
}
.community-post-time {
  font-size: 0.75rem;
  color: var(--text-muted, #a0a0a0);
  margin-top: 1px;
}
.community-delete-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.4;
  transition: all 0.2s;
  padding: 4px;
  border-radius: 6px;
}
.community-delete-btn:hover {
  opacity: 1;
  color: #ff4757;
  background: rgba(255,71,87,0.08);
}

/* Post body */
.community-post-body { margin-bottom: 14px; }
.community-post-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  font-size: 0.93rem;
  color: var(--color-cream, #e4e4e7);
}
.community-post-media {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
}
.community-post-media img {
  max-width: 100%;
  max-height: 450px;
  display: block;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.2s;
}
.community-post-media img:hover {
  transform: scale(1.01);
}

/* Video embeds */
.community-embed {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  padding-bottom: 42%;
  height: 0;
  background: #000;
  max-width: 480px;
}
.community-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.community-embed-tiktok {
  padding-bottom: 90%;
  max-width: 280px;
}

/* Link pill */
.community-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(74,155,147,0.06);
  border: 1px solid rgba(74,155,147,0.15);
  padding: 7px 14px;
  border-radius: 10px;
  color: var(--color-teal, #4A9B93);
  margin-top: 10px;
  text-decoration: none;
  font-size: 0.84rem;
  transition: all 0.2s;
}
.community-link-pill:hover {
  background: rgba(74,155,147,0.12);
  border-color: rgba(74,155,147,0.3);
}
.community-link-pill.small {
  padding: 4px 10px;
  font-size: 0.78rem;
  margin-top: 6px;
}
.community-link-arrow { font-weight: 700; }

/* Actions bar */
.community-post-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.community-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #a0a0a0);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-family: inherit;
  transition: all 0.15s;
}
.community-action-btn:hover {
  background: rgba(255,255,255,0.05);
}
.community-action-btn.active-like { color: #3ddc84; }
.community-action-btn.active-dislike { color: #ff4757; }
.community-action-btn.tiny {
  padding: 4px 8px;
  font-size: 0.76rem;
  gap: 3px;
}
.community-action-btn svg {
  vertical-align: middle;
}

/* Replies section */
.community-replies-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.community-show-all-btn {
  background: none;
  border: none;
  color: var(--color-teal, #4A9B93);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  padding: 4px 0;
  margin-bottom: 8px;
  transition: opacity 0.2s;
}
.community-show-all-btn:hover { opacity: 0.8; }

/* Reply items */
.community-reply {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.community-reply:last-child { border-bottom: none; }
.community-reply-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.community-reply-avatar.clickable:hover { transform: scale(1.1); }
.community-reply-body { flex: 1; min-width: 0; }
.community-reply-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.community-reply-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--color-cream, #EBE7D3);
}
.community-reply-name.clickable:hover { color: var(--color-teal); }
.community-reply-time {
  font-size: 0.72rem;
  color: var(--text-muted, #a0a0a0);
}
.community-reply-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.4;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}
.community-reply-delete:hover { opacity: 1; color: #ff4757; }
.community-reply-content {
  font-size: 0.85rem;
  color: var(--color-cream, #e4e4e7);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 3px;
}
.community-reply-image {
  max-width: 200px;
  max-height: 160px;
  border-radius: 8px;
  margin-top: 6px;
  cursor: pointer;
  transition: transform 0.15s;
}
.community-reply-image:hover { transform: scale(1.02); }
.community-reply-embed .community-embed {
  max-width: 260px;
  margin-top: 6px;
  padding-bottom: 35%;
}
.community-reply-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* Reply compose box */
.community-reply-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.community-reply-textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  resize: none;
  outline: none;
  transition: border-color 0.25s;
  box-sizing: border-box;
}
.community-reply-textarea:focus {
  border-color: rgba(74,155,147,0.4);
}
.community-reply-extras {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.community-reply-upload-label {
  cursor: pointer;
  font-size: 1rem;
  padding: 5px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  transition: all 0.2s;
  color: var(--text-muted, #a0a0a0);
}
.community-reply-upload-label:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.community-reply-url {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 7px 10px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.25s;
}
.community-reply-url:focus {
  border-color: rgba(74,155,147,0.4);
}
.community-reply-send {
  background: var(--color-teal, #4A9B93);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.community-reply-send:hover { background: #3d8a83; }

/* Pagination */
.community-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}
.community-page-btn {
  padding: 8px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.2s;
}
.community-page-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}
.community-page-info {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Profile Modal Overlay */
.community-profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.community-profile-card {
  background: var(--bg-dark-secondary, #1a1a1e);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  width: 400px;
  max-width: 92vw;
  max-height: min(520px, 80vh);
  overflow: hidden;
  overflow-y: auto;
  position: relative;
  animation: communityProfileIn 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
@keyframes communityProfileIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.community-profile-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}
.community-profile-close:hover { background: rgba(255,71,87,0.5); }
.community-profile-banner {
  height: 110px;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  background-size: cover;
  background-position: center;
}

/* Community responsive */
@media (max-width: 900px) {
  .community-layout {
    grid-template-columns: 1fr;
  }
  .community-sidebar {
    position: static;
  }
  .community-sidebar-card {
    display: flex;
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .community-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .community-search-wrap {
    width: 100%;
  }
  .community-search {
    width: 100%;
  }
  .community-post { padding: 14px; }
  .community-embed-tiktok { max-width: 100%; }
  .community-reply-extras {
    flex-wrap: wrap;
  }
  .community-reply-url { width: 100%; }
}
