/* ===== SOCIAL NETWORK STYLES ===== */

/* Friends list spacing: ensure friend cards/items have breathing room */
.friend-card,
.friend-item,
.sidebar-friend {
  display: block;
  margin-bottom: 12px; /* space between friend cards */
}



.friend-card:last-child,
.friend-item:last-child,
.sidebar-friend:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .friend-card,
  .friend-item,
  .sidebar-friend {
    margin-bottom: 10px;
  }
}

/*
  Compatibility fallbacks for older browsers (IE11 / legacy WebKit / old Edge)
  Provide explicit fallback colors and basic properties before CSS variables
  or advanced features so the layout remains usable when vars/backdrop-filter
  or other modern features are unsupported.
*/
/* Core fallbacks */
body { background-color: #0a0e27; color: #ffffff; }
header { background-color: rgba(10,14,39,0.95); }
.logo { color: #00d4ff; /* fallback when gradient text-clip not supported */ }

/* Bottom nav fallback (used on many responsive breakpoints) */
.social-nav { background-color: rgba(10,14,39,0.98); }
.social-nav .nav-item { color: #bdbdbd; }
.social-nav .nav-item.active { background-color: rgba(0,212,255,0.12); color: #00d4ff; }

/* Floating button fallback */
.floating-edit-btn { background-color: #00d4ff; }

/* Notification toast fallback */
.notification-toast { background-color: #1a1a2e; border-color: rgba(0,212,255,0.12); }

/* Provide basic flex/grid fallbacks using vendor-prefixed declarations where useful */
/* Many components redeclare prefixed rules later; these ensure minimal layout stability */
.social-layout { display: -webkit-box; display: -ms-flexbox; display: flex; }


/* Body class to prevent scrolling when modal is open */
body.modal-open {
  overflow: hidden !important;
}

body.modal-open .social-main,
body.modal-open .social-layout,
body.modal-open .social-sidebar,
body.modal-open .main-content {
  overflow: hidden !important;
}

/* Auth Section */
.auth-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* ===== TOGGLE SWITCH STYLES ===== */
.toggle-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.toggle-text {
  display: flex;
  align-items: center;
  color: var(--light-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.toggle-description {
  color: var(--gray-text);
  font-size: 0.8rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  margin-left: 1rem;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #00d4ff, #0066ff);
  border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

/* ===== PRIVACY BADGE STYLES ===== */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Sidebar Count Badge (next to headings like "Friends") */
.sidebar-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 0.5rem;
  background: linear-gradient(135deg, #00d4ff, #0066ff);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 10px;
  vertical-align: middle;
}

.privacy-badge.private {
  background: rgba(255, 152, 0, 0.15);
  color: #ffb300;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.privacy-badge.public {
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.privacy-badge svg {
  width: 14px;
  height: 14px;
}

/* Small privacy badge for profile card */
.profile-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.profile-privacy-badge.private {
  background: rgba(255, 152, 0, 0.12);
  color: #ffb300;
}

.profile-privacy-badge.public {
  background: rgba(76, 175, 80, 0.12);
  color: #4CAF50;
}

.profile-privacy-badge svg {
  width: 12px;
  height: 12px;
}

/* ===== LAST ACTIVE / ONLINE STATUS ===== */
.friend-last-active {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.last-active-text {
  color: var(--gray-text);
}

.online-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.online-status.online {
  color: #4CAF50;
  font-weight: 500;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #4CAF50;
  border-radius: 50%;
  animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

/* Sidebar friend online status */
.sidebar-friend .online-dot {
  width: 6px;
  height: 6px;
}

.sidebar-friend .friend-last-active {
  font-size: 0.7rem;
}

/* Toggle switch responsive */
@media (max-width: 480px) {
  .toggle-group {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .toggle-label {
    flex-basis: 100%;
  }
  
  .toggle-switch {
    margin-left: auto;
    margin-top: 0.5rem;
  }
  
  .toggle-text {
    font-size: 0.9rem;
  }
  
  .toggle-description {
    font-size: 0.75rem;
  }
  
  .privacy-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    margin-left: 0.35rem;
  }
  
  .privacy-badge svg {
    width: 12px;
    height: 12px;
  }
}

/* Bell Animation for Notifications */
@keyframes bellShake {
  0% { transform: rotate(0); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-15deg); }
  30% { transform: rotate(12deg); }
  40% { transform: rotate(-12deg); }
  50% { transform: rotate(8deg); }
  60% { transform: rotate(-8deg); }
  70% { transform: rotate(4deg); }
  80% { transform: rotate(-4deg); }
  90% { transform: rotate(2deg); }
  100% { transform: rotate(0); }
}

@keyframes bellPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes bellGlow {
  0%, 100% { 
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.5));
  }
  50% { 
    filter: drop-shadow(0 0 14px rgba(0, 212, 255, 1));
  }
}

.nav-item[data-view="notifications"].has-new-notifications .nav-icon,
.nav-item[data-view="notifications"].has-new-notifications .nav-svg {
  animation: bellShake 0.8s ease-in-out, bellPulse 1.5s ease-in-out infinite, bellGlow 2s ease-in-out infinite !important;
  color: #00d4ff !important;
}

.nav-item[data-view="notifications"].has-new-notifications {
  position: relative;
}

.nav-item[data-view="notifications"] .notif-badge {
  position: absolute;
  top: 6px;
  left: 26px; /* Overlapping the bell icon */
  min-width: 18px;
  width: auto;
  max-width: 28px;
  height: 18px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5);
  animation: badgePop 0.3s ease-out;
  z-index: 10;
  line-height: 18px;
  text-align: center;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.nav-item[data-view="notifications"].has-new-notifications .notif-badge {
  display: flex;
}

/* Notification toast */
.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card-bg, #1a1a2e);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.15);
  z-index: 999999;
  animation: toastSlideIn 0.4s ease-out;
  max-width: 360px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.notification-toast:hover {
  transform: translateX(-5px);
}

.notification-toast.hiding {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.notification-toast .toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff, #0066ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-toast .toast-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.notification-toast .toast-content {
  flex: 1;
  min-width: 0;
}

.notification-toast .toast-title {
  font-weight: 600;
  color: var(--light-text, #fff);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.notification-toast .toast-message {
  color: var(--gray-text, #888);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-toast .toast-close {
  background: none;
  border: none;
  color: var(--gray-text, #888);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
}

.notification-toast .toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== RESPONSIVE NOTIFICATION STYLES ===== */

/* Tablet styles */
@media (max-width: 1024px) {
  .notification-toast {
    right: 15px;
    max-width: 320px;
  }
  
  .nav-item[data-view="notifications"] .notif-badge {
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    font-size: 0.65rem;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .notification-toast {
    top: auto;
    bottom: 80px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    width: 100%;
    animation: toastSlideInMobile 0.4s ease-out;
  }
  
  .notification-toast:hover {
    transform: translateX(-50%) translateY(-2px);
  }
  
  .notification-toast.hiding {
    animation: toastSlideOutMobile 0.3s ease-in forwards;
  }
  
  @keyframes toastSlideInMobile {
    from {
      transform: translateX(-50%) translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }
  }
  
  @keyframes toastSlideOutMobile {
    from {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }
    to {
      transform: translateX(-50%) translateY(100%);
      opacity: 0;
    }
  }
  
  .notification-toast .toast-icon {
    width: 36px;
    height: 36px;
  }
  
  .notification-toast .toast-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .notification-toast .toast-title {
    font-size: 0.85rem;
  }
  
  .notification-toast .toast-message {
    font-size: 0.75rem;
  }
  
  /* Mobile bottom nav bell animation */
  .social-nav .nav-item[data-view="notifications"].has-new-notifications .nav-icon,
  .social-nav .nav-item[data-view="notifications"].has-new-notifications .nav-svg {
    animation: bellShake 0.8s ease-in-out, bellPulse 1.5s ease-in-out infinite, bellGlow 2s ease-in-out infinite !important;
    color: #00d4ff !important;
  }
  
  .social-nav .nav-item[data-view="notifications"] .notif-badge {
    position: absolute;
    top: -6px;
    right: 50%;
    transform: translateX(50%) translateX(12px);
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }
}

/* Small mobile styles */
@media (max-width: 480px) {
  .notification-toast {
    bottom: 75px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
  }
  
  .notification-toast .toast-icon {
    width: 32px;
    height: 32px;
  }
  
  .notification-toast .toast-icon svg {
    width: 16px;
    height: 16px;
  }
  
  .notification-toast .toast-title {
    font-size: 0.8rem;
  }
  
  .notification-toast .toast-message {
    font-size: 0.7rem;
  }
  
  .notification-toast .toast-close {
    padding: 2px;
  }
  
  .notification-toast .toast-close svg {
    width: 14px;
    height: 14px;
  }
}

/* Floating edit profile button */
.floating-edit-btn {
  position: fixed !important;
  bottom: 100px !important;
  right: 24px !important;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff, #0066ff);
  color: white;
  border: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 999999 !important;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-edit-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.5), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.floating-edit-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.floating-edit-btn.visible {
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Mobile adjustments for floating edit button */
@media (max-width: 768px) {
  .floating-edit-btn {
    bottom: 90px !important;
    right: 20px !important;
    width: 52px;
    height: 52px;
  }
  
  .floating-edit-btn svg {
    width: 22px;
    height: 22px;
  }
}

/* Hide any floating "back to top" / scroll-to-top buttons on the social page */
/* Covers common class and id names used for these widgets */
a.back-to-top,
.back-to-top,
#backToTop,
#back-to-top,
.scroll-top,
.to-top,
.toTop,
.go-top,
.goTop,
.scroll-up,
.scroll-to-top,
.scrollToTop,
.floating-top,
.floating-back-to-top,
.floating-back-top,
.floating-up,
.backtop,
.top-button,
.scroll-to-top-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Exclude floating edit button from the hide rule */
#floatingEditBtn.visible {
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Additionally hide any inline fixed-position bottom-floating element inside the social page
   This targets elements created dynamically with inline styles (e.g. position: fixed; bottom: 20px;) */
.social-main *[style*="position: fixed"][style*="bottom"]:not(#floatingEditBtn) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


.auth-container {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-text);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.auth-tab.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form h2 {
  margin-bottom: 0.5rem;
  color: var(--light-text);
}

.auth-subtitle {
  color: var(--gray-text);
  margin-bottom: 1.5rem;
}

.auth-error {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

.btn-full {
  width: 100%;
}

/* Danger Button - Angular Cyberpunk Style */
.btn-danger {
  background: transparent;
  color: var(--text-primary, white);
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}

.btn-danger::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #ff0040, #ff6600);
  z-index: -2;
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}

.btn-danger::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: var(--bg-dark, #0a0a0f);
  z-index: -1;
  transition: all 0.3s ease;
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
}

.btn-danger:hover::after {
  background: linear-gradient(135deg, rgba(255, 0, 64, 0.3), rgba(255, 102, 0, 0.2));
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 0 20px rgba(255, 0, 64, 0.4),
    0 0 40px rgba(255, 102, 0, 0.2);
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Delete Account Section */
.delete-account-section {
  margin-top: 1.5rem;
  padding-top: 0;
}

.delete-account-section p {
  line-height: 1.5;
}

#deleteAccountConfirm input:focus {
  outline: none;
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

/* Ensure Edit Profile modal is scrollable - right-side panel style */
#editProfileModal {
  justify-content: flex-end;
  align-items: stretch;
}

#editProfileModal .modal-content {
  width: 100%;
  max-width: 400px;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  border-radius: 16px 0 0 16px;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.5) rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #0a0e1a 0%, #0d1220 100%);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-right: none;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

#editProfileModal .modal-content::-webkit-scrollbar {
  width: 8px;
}

#editProfileModal .modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

#editProfileModal .modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00d4ff, #0066ff);
  border-radius: 4px;
}

#editProfileModal .modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00e5ff, #0077ff);
}

/* Edit Profile modal header */
#editProfileModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

#editProfileModal .modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin: 0;
}

#editProfileModal .modal-close {
  background: transparent;
  border: none;
  color: var(--gray-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

#editProfileModal .modal-close:hover {
  color: var(--light-text);
}

/* Edit Profile form styling */
#editProfileModal .avatar-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#editProfileModal .avatar-upload img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

#editProfileModal .form-group {
  margin-bottom: 1.25rem;
}

#editProfileModal .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--light-text);
  font-size: 0.9rem;
}

#editProfileModal .form-group input,
#editProfileModal .form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--light-text);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#editProfileModal .form-group input:focus,
#editProfileModal .form-group textarea:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Style select elements in Edit Profile modal */
#editProfileModal select,
#editProfileModal #autoDeleteDuration {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #0d1220 !important;
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 8px;
  color: #ffffff !important;
  font-size: 0.95rem;
  cursor: pointer;
  color-scheme: dark;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300d4ff'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

#editProfileModal select:focus,
#editProfileModal #autoDeleteDuration:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

#editProfileModal select option {
  background-color: #0d1220 !important;
  color: #ffffff !important;
  padding: 0.5rem;
}

#editProfileModal .form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

#editProfileModal .form-actions .btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

#editProfileModal .form-actions .btn-secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--light-text);
}

#editProfileModal .form-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

#editProfileModal .form-actions .btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0066ff);
  border: none;
  color: white;
}

#editProfileModal .form-actions .btn-primary:hover {
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
  transform: translateY(-1px);
}

/* Mobile responsive for Edit Profile modal */
@media (max-width: 480px) {
  #editProfileModal .modal-content {
    max-width: 100%;
    border-radius: 0;
  }
}

/* Make delete button more visible */
#showDeleteAccountBtn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Scroll indicator for Edit Profile modal */
#editProfileModal .modal-content::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to top, var(--card-bg) 0%, transparent 100%);
  pointer-events: none;
  display: block;
  margin-top: -30px;
}

/* Social Layout */
.social-main {
  padding-top: 100px;
  min-height: 100vh;
  padding-bottom: 2rem;
}

.social-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.social-layout {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

/* Sidebars */
.social-sidebar {
  position: sticky;
  top: 100px;
  z-index: 10;
  height: fit-content;
}

.left-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* Profile Card */
.profile-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
}


.profile-avatar {
  width: 90px;
  height: 90px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5),
              0 0 40px rgba(0, 212, 255, 0.3),
              0 0 60px rgba(0, 212, 255, 0.2);
  animation: avatarGlow 3s ease-in-out infinite;
  position: relative;
}

/* Clickable Avatar for Edit */
.profile-avatar.clickable-avatar {
  cursor: pointer;
}

.profile-avatar .avatar-edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  gap: 0.25rem;
}

.profile-avatar .avatar-edit-overlay svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.profile-avatar .avatar-edit-overlay span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-avatar.clickable-avatar:hover .avatar-edit-overlay {
  opacity: 1;
}

.profile-avatar.clickable-avatar:hover {
  border-color: #fff;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.8),
              0 0 50px rgba(0, 212, 255, 0.5);
}

@keyframes avatarGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5),
                0 0 40px rgba(0, 212, 255, 0.3),
                0 0 60px rgba(0, 212, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.7),
                0 0 50px rgba(0, 212, 255, 0.5),
                0 0 80px rgba(0, 212, 255, 0.3);
  }
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h3 {
  color: var(--light-text);
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.profile-card .username {
  color: var(--gray-text);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}


.profile-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
}

.profile-stats .stat {
  text-align: center;
}

.profile-stats .stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.profile-stats .stat-label {
  font-size: 0.7rem;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Edit Profile Button */
.profile-card .btn-secondary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.profile-card .btn-secondary:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  filter: brightness(1.08);
  transition: all 0.2s;
  cursor: pointer;
}

/* DM nav item uses standard nav-item styling */

/* ==========================================
   RESPONSIVE NAVIGATION - ALL SCREEN SIZES
   ========================================== */

/* Base Navigation - Desktop/Large screens */
.social-nav {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  gap: 0.25rem;
  align-items: stretch;
}

.social-nav .nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  color: var(--gray-text);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s ease;
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
}

.social-nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--light-text);
  transform: translateX(3px);
}

.social-nav .nav-item.active {
  background: rgba(0, 212, 255, 0.15);
  color: var(--primary-color);
}

.social-nav .nav-item.active .nav-svg {
  color: var(--primary-color);
}

/* Nav item text - can be hidden on small screens */
.social-nav .nav-item span:not(.notification-badge):not(.notif-badge) {
  transition: opacity 0.2s ease;
}

/* DM nav item inherits standard nav-item styling */

.social-nav .nav-icon {
  font-size: 1.25rem;
}

/* SVG Icons */
.nav-svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

/* Tablet - Sidebar becomes icon-only */
@media (max-width: 1200px) and (min-width: 769px) {
  .social-nav {
    padding: 0.5rem;
    align-items: center;
  }
  
  .social-nav .nav-item {
    justify-content: center;
    padding: 0.75rem;
    gap: 0;
  }
  
  .social-nav .nav-item span:not(.notification-badge):not(.notif-badge) {
    display: none;
  }
  
  .social-nav .nav-item:hover {
    transform: scale(1.05);
  }
  
  .notification-badge,
  #notifBadge,
  .notif-badge {
    top: 4px !important;
    left: 50% !important;
    transform: translateX(4px) !important;
  }
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.sidebar-card h3 {
  display: flex;
  align-items: center;
}

.notification-badge,
#notifBadge,
.notif-badge {
  position: absolute;
  top: 8px;
  left: 28px; /* Position overlapping the bell icon */
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  color: white;
  font-size: 0.6rem;
  padding: 0;
  border-radius: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  width: auto;
  max-width: 28px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5);
  animation: badgePop 0.3s ease-out;
  z-index: 10;
}

/* Override for notifBadge specifically */
#notifBadge {
  top: 8px;
  left: 28px;
  transform: none;
}

/* Small indicator dot on notification nav item */
.social-nav .nav-item.has-notifications::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  background: #ff6b6b;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255,107,107,0.6);
}

/* Create Post Card */
.create-post-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.create-post-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.small-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3),
              0 0 20px rgba(0, 212, 255, 0.15);
}

.create-post-header textarea {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.875rem;
  color: var(--light-text);
  font-size: 1rem;
  resize: none;
  min-height: 50px;
  max-height: 300px;
  overflow-y: hidden;
  font-family: inherit;
  line-height: 1.5;
}

.create-post-header textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.create-post-header textarea::placeholder {
  color: var(--gray-text);
}

.create-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.post-options {
  display: flex;
  gap: 0.75rem;
}

.post-option {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
}

.post-option:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25);
}

.post-option:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.post-option svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  transition: all 0.3s;
}

.post-option:hover svg {
  filter: drop-shadow(0 2px 4px rgba(0, 212, 255, 0.4));
  transform: scale(1.1);
}

/* Color-coded post option buttons */
#addMediaBtn:hover {
  background: rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
  color: #2196F3;
}


#addVoiceNoteBtn:hover {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
  color: #4CAF50;
}

#addVideoNoteBtn:hover {
  background: rgba(255, 152, 0, 0.15);
  border-color: rgba(255, 152, 0, 0.3);
  color: #FF9800;
}

/* Recording state */
.post-option.recording {
  background: rgba(255, 68, 68, 0.2);
  border-color: rgba(255, 68, 68, 0.4);
  color: #ff4444;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
  animation: recording-pulse 2s ease-in-out infinite;
}

@keyframes recording-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.6);
  }
}

.char-count {
  color: var(--gray-text);
  font-size: 0.85rem;
}

.image-preview {
  margin-top: 1rem;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
}

.remove-image {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

/* Feed Container */
.feed-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 200px;
}

/* Responsive spacing for posts on computer and tablet */
@media (max-width: 900px) {
  .profile-posts,
  .feed-container {
    gap: 0.75rem;
  }
}
@media (max-width: 600px) {
  .profile-posts,
  .feed-container {
    gap: 0.5rem;
  }
}

/* Main Social Content Area */
.social-content {
  min-width: 0;
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Explore, Notifications, Profile containers */
.explore-container,
.notifications-container,
.profile-container {
  min-height: 200px;
}

.explore-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Post Card */
.post-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.post-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid rgba(0, 212, 255, 0.4);
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3),
              0 0 20px rgba(0, 212, 255, 0.2);
}

.post-avatar:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.6),
              0 0 30px rgba(0, 212, 255, 0.4);
  transform: scale(1.05);
}

.post-user-info {
  flex: 1;
}

.post-user-info .display-name {
  color: var(--light-text);
  font-weight: 600;
  cursor: pointer;
}

.post-user-info .display-name:hover {
  color: var(--primary-color);
}

.post-user-info .username {
  color: var(--gray-text);
  font-size: 0.85rem;
}

.post-time {
  color: var(--gray-text);
  font-size: 0.8rem;
}

.post-menu {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.25rem;
  line-height: 1;
}

.post-menu:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.25);
}

/* Post Visibility Badge */
.post-visibility-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.post-visibility-badge.public {
  background: rgba(23, 191, 99, 0.15);
  color: #17bf63;
}

.post-visibility-badge.public:hover {
  background: rgba(23, 191, 99, 0.25);
  transform: scale(1.1);
}

.post-visibility-badge.private {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gray-text);
}

.post-visibility-badge.private:hover {
  background: rgba(0, 212, 255, 0.15);
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Create Post Public Toggle */
.create-post-visibility {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.create-post-visibility label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--gray-text);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.create-post-visibility label:hover {
  color: var(--light-text);
}

.create-post-visibility input[type="checkbox"] {
  display: none;
}

.create-post-visibility .visibility-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.create-post-visibility .visibility-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.create-post-visibility input[type="checkbox"]:checked + .visibility-toggle {
  background: linear-gradient(135deg, #17bf63 0%, #0d8a47 100%);
}

.create-post-visibility input[type="checkbox"]:checked + .visibility-toggle::after {
  left: 18px;
}

.create-post-visibility .visibility-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.create-post-visibility .visibility-text svg {
  width: 16px;
  height: 16px;
}

.create-post-visibility input[type="checkbox"]:checked ~ .visibility-text {
  color: #17bf63;
}

.post-content {
  color: var(--light-text);
  line-height: 1.6;
  margin-bottom: 1rem;
  word-wrap: break-word;
}

.post-content a {
  color: var(--primary-color);
}

.post-content .hashtag {
  color: var(--primary-color);
  cursor: pointer;
}

.post-content .hashtag:hover {
  text-decoration: underline;
}

.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
  cursor: pointer;
}

.post-video {
  width: 100%;
  max-height: 500px;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: #000;
}

/* Video Note / Voice Note Preview and Post Video Note Styling */
.video-note-preview,
.post-video-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.video-note-preview-container,
.video-note-container {
  position: relative;
  width: 240px;
  height: 135px; /* 16:9 */
  min-width: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.video-note-preview-container video,
.video-note-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-note-overlay,
.video-note-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.35));
  color: white;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}

.video-note-overlay svg,
.video-note-play-overlay svg {
  width: 48px;
  height: 48px;
  opacity: 0.95;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.6));
}

.video-note-overlay:hover,
.video-note-play-overlay:hover {
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.25));
  transform: translateY(-2px);
}

.video-note-duration {
  font-size: 0.85rem;
  color: var(--light-text);
  background: rgba(0,0,0,0.45);
  padding: 4px 8px;
  border-radius: 10px;
  align-self: flex-start;
}

.remove-video-note {
  margin-left: auto;
  background: rgba(255,255,255,0.06);
  color: var(--light-text);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Compact layout on small screens */
@media (max-width: 720px) {
  .video-note-preview-container,
  .video-note-container {
    width: 180px;
    height: 102px;
  }
  .video-note-overlay svg,
  .video-note-play-overlay svg { width: 36px; height: 36px; }
}


/* Post Document Attachment */
.post-document {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  margin: 0.5rem 0;
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.2s ease;
}

.post-document:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.post-document svg {
  flex-shrink: 0;
  stroke: var(--primary-color);
}

.post-document span {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-actions {
  display: flex;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.post-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
}

.post-action svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.post-action:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
}

.post-action:hover svg {
  transform: scale(1.1);
}

.post-action.liked {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
}

.post-action.liked:hover {
  background: rgba(255, 107, 107, 0.25);
  border-color: rgba(255, 107, 107, 0.4);
}

.post-action.liked .action-icon {
  animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Repost Action Button */
.post-action.reposted {
  background: rgba(23, 191, 99, 0.15);
  border-color: rgba(23, 191, 99, 0.3);
  color: #17bf63;
}

.post-action.reposted:hover {
  background: rgba(23, 191, 99, 0.25);
  border-color: rgba(23, 191, 99, 0.4);
}

.post-action.reposted .action-icon {
  animation: repostAnimation 0.4s ease;
}

@keyframes repostAnimation {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-15deg) scale(1.1); }
  50% { transform: rotate(15deg) scale(1.2); }
  75% { transform: rotate(-10deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Repost Header - shown at top of reposted posts */
.repost-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #17bf63;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 0 0.75rem 0;
  margin-bottom: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.repost-header:hover {
  color: #1ed760;
}

.repost-header svg {
  flex-shrink: 0;
}

.repost-comment {
  font-size: 0.9rem;
  color: var(--light-text);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: rgba(23, 191, 99, 0.08);
  border-left: 3px solid #17bf63;
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

/* Reposted Post Card Styling */
.post-card.is-repost {
  border-left: 3px solid #17bf63;
  background: linear-gradient(
    135deg,
    rgba(23, 191, 99, 0.03) 0%,
    var(--card-bg) 100%
  );
}

/* Repost Indicator */
.repost-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-text);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.repost-indicator svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.repost-indicator .repost-user {
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.repost-indicator .repost-user:hover {
  color: #00d4ff;
  text-decoration: underline;
}

/* Reposted Post Card */
.post-card.reposted-post {
  border-left: 3px solid var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.05) 0%,
    var(--card-bg) 100%
  );
}

/* Original Post in Repost */
.original-post-container {
  margin-top: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.original-post-container:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.repost-with-comment .repost-comment-text {
  color: var(--light-text);
  line-height: 1.6;
  margin-bottom: 1rem;
  word-wrap: break-word;
  font-size: 1rem;
}

/* Repost Modal */
.repost-modal-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
}

.repost-option-btn {
  background: transparent;
  border: none;
  color: var(--light-text);
  padding: 1rem 1.5rem;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.repost-option-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.repost-option-btn svg {
  flex-shrink: 0;
  color: var(--primary-color);
  width: 24px;
  height: 24px;
}

.repost-option-btn .option-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.repost-option-btn .option-title {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--light-text);
  line-height: 1.3;
}

.repost-option-btn .option-description {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-text);
  line-height: 1.3;
}

.repost-option-btn.quick-repost:hover {
  border-left-color: #00d4ff;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.15) 0%, transparent 100%);
}

.repost-option-btn.quick-repost:hover svg {
  color: #00d4ff;
  transform: scale(1.1);
}

.repost-option-btn.repost-with-comment:hover {
  border-left-color: #00d4ff;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.1) 0%, transparent 100%);
}

.repost-option-btn.repost-with-comment:hover svg {
  color: #00d4ff;
  transform: scale(1.1);
}

.repost-option-btn.cancel-repost {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.25rem;
  padding-top: 1.25rem;
}

.repost-option-btn.cancel-repost svg {
  color: var(--gray-text);
}

.repost-option-btn.cancel-repost:hover {
  background: rgba(255, 255, 255, 0.03);
}

.repost-option-btn.cancel-repost:hover svg {
  color: #ff6b6b;
  transform: scale(1.1);
}

/* Repost with Comment Form */
.repost-comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.repost-comment-form textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.875rem;
  color: var(--light-text);
  font-size: 1rem;
  resize: none;
  min-height: 100px;
  max-height: 300px;
  font-family: inherit;
  line-height: 1.5;
  width: 100%;
  box-sizing: border-box;
}

.repost-comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.repost-comment-form textarea::placeholder {
  color: var(--gray-text);
}

.repost-preview-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.repost-preview-card .post-header {
  margin-bottom: 0.75rem;
}

.repost-preview-card .post-content {
  margin-bottom: 0.5rem;
}

.repost-char-count {
  text-align: right;
  color: var(--gray-text);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Waveform bars (voice/music) - responsive and prevent overflow on small screens */
.voice-note-waveform,
.music-note-waveform {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* prevent horizontal overflow */
  -webkit-overflow-scrolling: touch;
}

.voice-note-bar,
.music-wave-bar {
  /* make waveform bars green to match repost accent */
  background: rgba(23, 191, 99, 0.35) !important;
  border-radius: 2px;
  height: 16px; /* default height overridden inline */
  flex: 1 1 4px; /* allow bars to shrink to fit container */
  max-width: 14px;
  min-width: 2px;
  transition: height 120ms linear;
}

/* Make bars slimmer on very small screens */
@media (max-width: 600px) {
  .voice-note-waveform,
  .music-note-waveform {
    gap: 4px;
  }
  .voice-note-bar,
  .music-wave-bar {
    max-width: 10px;
  }
  .music-note-meta { font-size: 0.85rem; }
}

/* Ensure post music/voice note container doesn't cause page overflow */
.post-music-note,
.post-voice-note {
  width: 100%;
  overflow: hidden;
}

.repost-char-count.limit-warning {
  color: #ff9800;
}

.repost-char-count.limit-exceeded {
  color: #ff4444;
}

/* Comments Section */
.comments-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comment {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.comment-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.3),
              0 0 15px rgba(0, 212, 255, 0.15);
}

.comment-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.75rem;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.comment-header .display-name {
  color: var(--light-text);
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-header .comment-time {
  color: var(--gray-text);
  font-size: 0.75rem;
}

.comment-text {
  color: var(--light-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.add-comment {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.add-comment input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0.625rem 1rem;
  color: var(--light-text);
  font-size: 0.9rem;
}

.add-comment input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.add-comment button {
  padding: 0.625rem 1rem;
  border-radius: 20px;
}

/* Right Sidebar */
.right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-card h3 {
  color: var(--light-text);
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trending-item {
  color: var(--primary-color);
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.trending-item:hover {
  background: rgba(0, 212, 255, 0.1);
}

/* Who to Follow */
.who-to-follow {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.follow-suggestion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.follow-suggestion img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.follow-suggestion .user-info {
  flex: 1;
}

.follow-suggestion .display-name {
  color: var(--light-text);
  font-size: 0.9rem;
  display: block;
}

.follow-suggestion .username {
  color: var(--gray-text);
  font-size: 0.8rem;
}

.follow-btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.8rem;
  border-radius: 20px;
}

.follow-btn.following {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

/* Community Stats */
.community-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.comm-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.comm-stat-label {
  color: var(--gray-text);
  font-size: 0.8rem;
}

/* Search Box */
.search-box {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 0;
  background: transparent;
}

.search-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 0.875rem 1.25rem;
  color: var(--light-text);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-box input::placeholder {
  color: var(--gray-text);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-box button {
  padding: 0.875rem 1.5rem;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  min-width: 50px;
}

.search-results {
  margin-bottom: 2rem;
}

.section-heading {
  color: var(--light-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 1.1rem;
  font-weight: 600;
}

.search-results {
  margin-bottom: 1.5rem;
}

.suggested-users {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* User Card */
.user-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-card:hover {
  transform: translateX(5px);
  border-color: var(--primary-color);
}

.user-card img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.user-card .user-info {
  flex: 1;
}

.user-card .display-name {
  color: var(--light-text);
  font-weight: 600;
}

.user-card .username {
  color: var(--gray-text);
  font-size: 0.85rem;
}

.user-card .bio {
  color: var(--gray-text);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Profile View */
.profile-container {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.profile-banner {
  height: 200px;
  background: var(--accent-gradient);
  position: relative;
  transition: opacity 0.3s ease;
}

/* Change cover photo button */
.change-cover-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}

.change-cover-btn:hover {
  background: rgba(0, 212, 255, 0.8);
  border-color: rgba(0, 212, 255, 0.5);
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.change-cover-btn svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.profile-info {
  padding: 0 2rem 2rem;
  position: relative;
}

.profile-info .profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  margin-top: -60px;
  object-fit: cover;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.6),
              0 0 50px rgba(0, 212, 255, 0.4),
              0 0 75px rgba(0, 212, 255, 0.2);
  animation: avatarGlow 3s ease-in-out infinite;
}

/* Clickable Profile Avatar (Large - in Profile View) */
.profile-avatar-large-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-top: -60px;
  border-radius: 50%;
  overflow: hidden;
}

.profile-avatar-large-wrapper.clickable-avatar {
  cursor: pointer;
}

.profile-avatar-large-wrapper .profile-avatar-large {
  width: 100%;
  height: 100%;
  margin-top: 0;
}

.profile-avatar-large-wrapper .avatar-edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  gap: 0.35rem;
  border-radius: 50%;
}

.profile-avatar-large-wrapper .avatar-edit-overlay svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.profile-avatar-large-wrapper .avatar-edit-overlay span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-avatar-large-wrapper.clickable-avatar:hover .avatar-edit-overlay {
  opacity: 1;
}

.profile-avatar-large-wrapper.clickable-avatar:hover {
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.9),
              0 0 60px rgba(0, 212, 255, 0.6);
}

.profile-avatar-large-wrapper.clickable-avatar:hover .profile-avatar-large {
  border-color: #fff;
}

.profile-info h2 {
  color: var(--light-text);
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.profile-info .username {
  color: var(--gray-text);
  margin-bottom: 1rem;
}

.profile-info .bio {
  color: var(--light-text);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.profile-info .follow-btn {
  position: absolute;
  top: 1rem;
  right: 2rem;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--gray-text);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.profile-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-meta svg {
  flex-shrink: 0;
  color: var(--primary-color);
}

.profile-stats-large {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-stats-large .stat {
  cursor: pointer;
  text-align: center;
}

.profile-stats-large .stat-num {
  font-weight: 700;
  color: var(--light-text);
  display: block;
  font-size: 1.25rem;
}

.profile-stats-large .stat-label {
  color: var(--gray-text);
  font-size: 0.85rem;
}

.profile-posts {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-posts h3 {
  color: var(--light-text);
  margin-bottom: 1rem;
}

/* Notifications */
.notifications-container h2 {
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-item:hover {
  border-color: var(--primary-color);
}

.notification-item.unread {
  border-left: 3px solid var(--primary-color);
}

.notification-item img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.notification-item .notif-content {
  flex: 1;
}

.notification-item .notif-text {
  color: var(--light-text);
}

.notification-item .notif-text strong {
  color: var(--primary-color);
}

.notification-item .notif-time {
  color: var(--gray-text);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Follow Requests Section */
.follow-requests-section,
.group-requests-section {
  margin-bottom: 1.5rem;
}

.follow-requests-section .section-heading,
.group-requests-section .section-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--light-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.follow-requests-section .section-heading svg,
.group-requests-section .section-heading svg {
  color: var(--primary-color);
}

.request-badge {
  background: #ff4757;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.follow-request-item,
.group-request-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.follow-request-item:hover,
.group-request-item:hover {
  border-color: var(--primary-color);
}

.request-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid rgba(0, 212, 255, 0.3);
  transition: all 0.2s ease;
}

.request-avatar:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.request-info {
  flex: 1;
  min-width: 0;
}

.request-info .display-name,
.request-info .request-name {
  color: var(--light-text);
  font-weight: 600;
  display: block;
  cursor: pointer;
}

.request-info .display-name:hover,
.request-info .request-name:hover {
  color: var(--primary-color);
}

.request-info .username {
  color: var(--gray-text);
  font-size: 0.85rem;
  display: block;
}

.request-info .request-detail {
  color: var(--gray-text);
  font-size: 0.85rem;
  display: block;
  margin-top: 0.25rem;
}

.request-info .request-detail strong {
  color: var(--primary-color);
}

.request-info .request-time {
  color: var(--gray-text);
  font-size: 0.75rem;
  display: block;
  margin-top: 0.25rem;
}

.request-info .bio {
  color: var(--gray-text);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

.request-actions {
  display: flex;
  gap: 0.5rem;
}

.request-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Requested button state */
.follow-btn.requested {
  background: transparent;
  border: 1px solid var(--gray-text);
  color: var(--gray-text);
}

.follow-btn.requested:hover {
  border-color: #ff4757;
  color: #ff4757;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  overflow-y: auto;
}


.modal-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.5) rgba(255, 255, 255, 0.1);
}



/* Webkit scrollbar styling for modal-content */
.modal-content::-webkit-scrollbar {
  width: 10px;
}
.modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.4);
  border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.6);
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.4);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.6);
}

/* Responsive: Edit Profile Modal on Mobile */
@media (max-width: 600px) {
  .modal-content {
    padding: 1rem 0.5rem;
    max-width: 98vw;
  }
  #editProfileModal .modal-content {
    padding: 1rem 0.5rem;
    max-width: 98vw;
  }
  #editProfileModal .form-group {
    margin-bottom: 1.1rem;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
  #editProfileModal .form-group label {
    margin-bottom: 0.3rem;
    font-size: 1rem;
  }
  #editProfileModal .avatar-upload {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  #editProfileModal .avatar-upload img {
    width: 64px;
    height: 64px;
  }
  #editProfileModal .form-actions {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    margin-top: 1rem;
    padding-top: 0.5rem;
  }
}

.modal-large {
  max-width: 700px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
  color: var(--light-text);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--gray-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--light-text);
}

.avatar-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-upload img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5),
              0 0 30px rgba(0, 212, 255, 0.3);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Loading */
.loading-spinner {
  text-align: center;
  padding: 3rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner p {
  color: var(--gray-text);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--gray-text);
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.empty-state .empty-icon {
  margin-bottom: 1rem;
}

.empty-state .empty-icon svg {
  color: var(--gray-text);
}

.empty-state h3 {
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--gray-text);
}

/* Responsive */
@media (min-width: 901px) {
  .social-nav {
    flex-direction: column;
  }
  .social-nav .nav-item {
    flex-direction: row;
  }
}

@media (max-width: 1200px) {
  .social-layout {
    grid-template-columns: 250px 1fr;
  }
  .right-sidebar {
    display: none;
  }
}

@media (max-width: 900px) {
  .social-layout {
    grid-template-columns: 1fr !important;
  }
  
  .social-section .social-layout .left-sidebar,
  .left-sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    flex-direction: row !important;
    background: rgba(10, 14, 39, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 0.5rem 0.75rem !important;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
    border-top: 1px solid rgba(0, 212, 255, 0.2) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
    z-index: 9999 !important;
    height: auto !important;
    width: 100% !important;
  }
  
  .profile-card {
    display: none !important;
  }
  
  /* Mobile Bottom Navigation Bar */
  .social-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.5rem 0.25rem !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
  }
  
  .social-nav .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 0.35rem !important;
    font-size: 0.6rem !important;
    gap: 0.2rem !important;
    text-align: center !important;
    border-radius: 10px !important;
    min-width: 0 !important;
    width: auto !important;
    flex: 1 !important;
    max-width: 70px !important;
    transition: all 0.2s ease !important;
    color: var(--gray-text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  
  .social-nav .nav-item span:not(.notification-badge):not(.notif-badge) {
    display: block !important;
    font-size: 0.6rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  
  .social-nav .nav-item:hover {
    background: rgba(0, 212, 255, 0.1) !important;
    transform: none !important;
    color: var(--light-text) !important;
  }
  
  .social-nav .nav-item.active {
    background: rgba(0, 212, 255, 0.15) !important;
    color: var(--primary-color) !important;
  }
  
  .social-nav .nav-item.active .nav-svg {
    color: var(--primary-color) !important;
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.5)) !important;
  }
  
  .social-nav .nav-svg {
    width: 20px !important;
    height: 20px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
  }
  
  .social-nav .notification-badge,
  .social-nav .notif-badge,
  .social-nav #notifBadge {
    position: absolute !important;
    top: 0px !important;
    right: 50% !important;
    left: auto !important;
    transform: translateX(12px) !important;
    font-size: 0.5rem !important;
    padding: 1px 3px !important;
    min-width: 12px !important;
    height: 12px !important;
    line-height: 10px !important;
  }
  
  .social-content {
    padding-bottom: 85px !important;
  }
  
  .profile-info .follow-btn {
    position: static !important;
    margin-top: 1rem !important;
  }
  
  .right-sidebar {
    display: none !important;
  }
  
  /* Profile View Mobile Fixes */
  .profile-container {
    border-radius: 12px;
  }
  
  .profile-banner {
    height: 120px !important;
  }
  
  .profile-info {
    padding: 0 1rem 1rem !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .profile-info .profile-avatar-large {
    width: 80px !important;
    height: 80px !important;
    margin-top: -40px !important;
    border-width: 3px !important;
  }
  
  .profile-avatar-large-wrapper {
    width: 80px !important;
    height: 80px !important;
    margin-top: -40px !important;
  }
  
  .profile-avatar-large-wrapper .profile-avatar-large {
    width: 100% !important;
    height: 100% !important;
    margin-top: 0 !important;
  }
  
  .profile-avatar-large-wrapper .avatar-edit-overlay {
    border-radius: 50%;
  }
  
  .profile-avatar-large-wrapper .avatar-edit-overlay svg {
    width: 20px !important;
    height: 20px !important;
  }
  
  .profile-avatar-large-wrapper .avatar-edit-overlay span {
    font-size: 0.6rem !important;
  }
  
  .profile-info h2 {
    font-size: 1.1rem !important;
    margin-top: 0.75rem !important;
  }
  
  .profile-info .username {
    font-size: 0.85rem !important;
  }
  
  .profile-info .bio {
    font-size: 0.9rem !important;
  }
  
  .profile-meta {
    flex-direction: column !important;
    gap: 0.5rem !important;
    font-size: 0.8rem !important;
    width: 100%;
  }
  
  .profile-stats-large {
    gap: 1.5rem !important;
    width: 100%;
    justify-content: flex-start !important;
  }
  
  .profile-stats-large .stat-num {
    font-size: 1rem !important;
  }
  
  .profile-stats-large .stat-label {
    font-size: 0.75rem !important;
  }
  
  .profile-posts {
    padding: 1rem 0.75rem !important;
  }
  
  .profile-posts h3 {
    font-size: 1rem !important;
  }
}

@media (max-width: 600px) {
  .create-post-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
  }
  .create-post-header .small-avatar {
    display: block;
    width: 45px;
    height: 45px;
    margin-right: 0.5rem;
  }
  #postContent {
    min-height: 70px !important;
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.875rem;
  }
  .post-actions {
    justify-content: space-between;
  }
  .profile-banner {
    height: 100px !important;
  }
  .profile-info {
    padding: 0 0.75rem 1rem !important;
  }
  .profile-info .profile-avatar-large {
    width: 70px !important;
    height: 70px !important;
    margin-top: -35px !important;
    border-width: 3px !important;
  }
  
  .profile-avatar-large-wrapper {
    width: 70px !important;
    height: 70px !important;
    margin-top: -35px !important;
  }
  
  .profile-avatar-large-wrapper .profile-avatar-large {
    width: 100% !important;
    height: 100% !important;
    margin-top: 0 !important;
    border-width: 3px !important;
  }
  
  .profile-avatar-large-wrapper .avatar-edit-overlay svg {
    width: 18px !important;
    height: 18px !important;
  }
  
  .profile-avatar-large-wrapper .avatar-edit-overlay span {
    font-size: 0.5rem !important;
  }

  /* Make the 'What's on your mind?' box taller on mobile */
  #postContent {
    min-height: 110px !important;
    font-size: 1.08rem;
    line-height: 1.6;
  }
}

/* ===== VOICE & VIDEO NOTES ===== */

/* Recording UI Overlay */
.social-recording-ui {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.recording-modal {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  min-width: 300px;
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recording-dot {
  width: 12px;
  height: 12px;
  background: #ff4444;
  border-radius: 50%;
  animation: recordingPulse 1s ease-in-out infinite;
}

@keyframes recordingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.recording-type {
  font-size: 14px;
  font-weight: 600;
  color: #ff4444;
}

.recording-time {
  font-size: 14px;
  color: var(--gray-text);
  font-family: monospace;
}

.recording-preview {
  display: none;
  justify-content: center;
  align-items: center;
}

.recording-preview.active {
  display: flex;
}

.recording-preview video {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ff4444;
  background: #000;
}

.recording-controls {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.recording-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.recording-btn:hover {
  transform: scale(1.1);
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-text);
}

.cancel-btn:hover {
  background: #ff4444;
}

.send-recording-btn {
  background: var(--primary-color);
  color: white;
}

.send-recording-btn:hover {
  background: var(--secondary-color);
}

/* Voice Note Button Active State */
#addVoiceNoteBtn.recording,
#addVideoNoteBtn.recording {
  background: #ff4444 !important;
  color: white !important;
  animation: recordingPulse 1s ease-in-out infinite;
}

/* Voice Note Preview in Create Post */
.voice-note-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  margin-top: 12px;
}

.voice-note-preview-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.voice-note-play-btn {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.voice-note-play-btn:hover {
  background: var(--secondary-color);
  transform: scale(1.05);
}

.voice-note-play-btn.playing {
  background: #ff4444;
}

.voice-note-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  flex: 1;
}

.voice-note-bar {
  width: 3px;
  background: rgba(0, 212, 255, 0.3);
  border-radius: 2px;
  transition: all 0.1s;
}

.voice-note-bar.active {
  background: #17bf63 !important;
}

/* Ensure music-wave-bar active state also uses repost green */
.music-wave-bar.active {
  background: #17bf63 !important;
}

.voice-note-duration {
  font-size: 12px;
  color: var(--gray-text);
  font-family: monospace;
  min-width: 40px;
}

.remove-voice-note,
.remove-video-note {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--gray-text);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.remove-voice-note:hover,
.remove-video-note:hover {
  background: #ff4444;
  color: white;
}

/* Video Note Preview in Create Post */
.video-note-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(123, 47, 247, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(123, 47, 247, 0.2);
  margin-top: 12px;
}

.video-note-preview-container {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--primary-color);
  flex-shrink: 0;
}

.video-note-preview-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-note-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
  color: white;
}

.video-note-preview-container:hover .video-note-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.video-note-overlay.playing {
  opacity: 0;
}

/* Unified Audio Player for Posts (Voice Notes & Music) - matches DM style */
.post-audio-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.75rem;
  margin-bottom: 1rem; /* spacing from divider line below */
  min-width: 220px;
  max-width: 100%;
}

.post-audio-note:hover {
  background: rgba(0, 212, 255, 0.12);
}

.post-audio-note.playing {
  background: rgba(0, 212, 255, 0.15);
}

.post-audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.post-audio-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.post-audio-btn.playing {
  animation: postAudioPulse 1.5s ease-in-out infinite;
}

@keyframes postAudioPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3); }
  50% { box-shadow: 0 4px 16px rgba(0, 212, 255, 0.5); }
}

.post-audio-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-audio-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.post-wave-bar {
  width: 3px;
  background: rgba(0, 212, 255, 0.4);
  border-radius: 2px;
  transition: all 0.1s ease;
  min-height: 4px;
}

.post-wave-bar.active {
  background: #00d4ff;
  box-shadow: 0 0 4px rgba(0, 212, 255, 0.5);
}

.post-audio-note.playing .post-wave-bar {
  animation: postWaveBarPulse 0.5s ease-in-out infinite alternate;
}

.post-audio-note.playing .post-wave-bar:nth-child(odd) {
  animation-delay: 0.1s;
}

.post-audio-note.playing .post-wave-bar:nth-child(3n) {
  animation-delay: 0.2s;
}

@keyframes postWaveBarPulse {
  0% { transform: scaleY(0.7); opacity: 0.6; }
  100% { transform: scaleY(1); opacity: 1; }
}

.post-audio-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.post-audio-time {
  color: #00d4ff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.post-audio-name {
  color: var(--gray-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* Post audio download button */
.post-audio-download {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--gray-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-left: 0.5rem;
}

.post-audio-download:hover {
  background: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
  transform: scale(1.1);
}

.post-audio-download:active {
  transform: scale(0.95);
}

.post-audio-download svg {
  flex-shrink: 0;
}

/* Legacy Voice Note in Posts - kept for backwards compatibility */
.post-voice-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 255, 0.15);
  margin-top: 12px;
  max-width: 300px;
}

.post-voice-note .voice-note-btn {
  width: 44px;
  height: 44px;
  background: #2196f3;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.post-voice-note .voice-note-btn:hover {
  background: #1565c0;
  transform: scale(1.05);
}

.post-voice-note .voice-note-btn.playing {
  background: #ff4444;
}

.post-voice-note .voice-note-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-voice-note .voice-note-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.post-voice-note .voice-note-bar {
  width: 3px;
  background: rgba(0, 212, 255, 0.3);
  border-radius: 2px;
  transition: all 0.1s;
}

.post-voice-note .voice-note-bar.active {
  background: #2196f3;
}

.post-voice-note .music-note-time {
  font-size: 12px;
  color: var(--gray-text);
  font-family: monospace;
  min-width: 40px;
}

.post-voice-note .music-note-title {
  font-size: 13px;
  color: var(--light-text);
  font-weight: 500;
  margin-top: 2px;
  word-break: break-word;
}

/* Responsive for Voice/Video Notes */
@media (max-width: 768px) {
  .recording-modal {
    width: 90%;
    max-width: 320px;
    padding: 1.5rem;
  }
  
  .recording-preview video {
    width: 120px;
    height: 120px;
  }
  
  .post-video-note .video-note-container {
    width: 160px;
    height: 160px;
  }
  
  .post-voice-note {
    max-width: 100%;
  }
}

/* ===== POST MENU MODAL ===== */
.post-menu-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-menu-option {
  background: transparent;
  border: none;
  color: var(--text-color);
  padding: 1rem 1.5rem;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.post-menu-option:last-child {
  border-bottom: none;
}

.post-menu-option:hover {
  background: rgba(255,255,255,0.05);
}

.post-menu-option.edit-post-btn {
  color: var(--primary-color);
}

.post-menu-option.edit-post-btn:hover {
  background: rgba(0,212,255,0.1);
}

.post-menu-option.delete-post-btn {
  color: #ff4444;
}

.post-menu-option.delete-post-btn:hover {
  background: rgba(255,68,68,0.1);
}

.post-menu-option.cancel-menu-btn {
  color: var(--gray-text);
}

.post-menu-option svg {
  flex-shrink: 0;
}

/* Edit Post Form */
#editPostModal .form-group {
  margin-bottom: 1rem;
}

#editPostModal label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
}

#editPostModal textarea {
  font-family: inherit;
}

#editPostModal .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}


/* ===== UPLOAD PROGRESS BAR ===== */
.upload-progress {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  animation: fadeIn 0.3s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-text {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.9rem;
}

.progress-percentage {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff 0%, #0066ff 100%);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.progress-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-text);
}

.progress-speed {
  color: var(--primary-color);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
  }
}

.progress-bar-fill.uploading {
  animation: progressPulse 2s ease-in-out infinite;
}


/* ===== LINK PREVIEW STYLES ===== */

/* Link preview container */
.link-preview-container {
  margin-top: 1rem;
}

/* Link preview card (in create post) */
.link-preview-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.link-preview-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
}

/* Remove button */
.remove-link-preview {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.2s ease;
}

.remove-link-preview:hover {
  background: #ff4444;
  transform: scale(1.1);
}

/* Link preview image */
.link-preview-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Link preview content */
.link-preview-content {
  padding: 1rem;
}

.link-preview-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-preview-description {
  font-size: 0.9rem;
  color: var(--gray-text);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-preview-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-text);
}

.link-preview-favicon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

/* Link preview in posts (feed) */
.post-link-preview {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.3s ease;
}

.post-link-preview:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
  transform: translateY(-2px);
}

.post-link-preview .link-preview-image {
  height: 250px;
}

/* Compact link preview (no image) */
.post-link-preview.no-image .link-preview-content {
  padding: 1.5rem;
}

.post-link-preview.no-image .link-preview-title {
  font-size: 1.1rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .link-preview-image,
  .post-link-preview .link-preview-image {
    height: 180px;
  }
  
  .link-preview-title {
    font-size: 0.95rem;
  }
  
  .link-preview-description {
    font-size: 0.85rem;
  }
}


/* ===== COMMENT REPLIES STYLING ===== */

/* Reply button */
.reply-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.5rem;
  margin-top: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.reply-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
}

.reply-btn svg {
  transition: transform 0.2s ease;
}

.reply-btn:hover svg {
  transform: translateX(-2px);
}

/* Reply input container */
.reply-input-container {
  margin-top: 0.75rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reply-input {
  width: 100%;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--light-text);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.reply-input:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
}

.reply-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}


/* Nested replies */
.comment-replies {
  margin-left: 2.5rem;
  margin-top: 0.75rem;
  padding-left: 1rem;
  border-left: none; /* remove full-width card divider */
  position: relative;
}

.comment-reply {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0.25rem; /* reduce padding to emphasize bubbles */
  background: transparent; /* remove card background */
  border-radius: 8px;
  border-left: none;
  animation: fadeIn 0.3s ease;
  position: relative;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.comment-reply .comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0,212,255,0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.comment-reply .comment-content {
  flex: 1;
}

.comment-reply .display-name {
  font-size: 0.9rem;
}

.comment-reply .comment-text {
  font-size: 0.9rem;
}

.comment-reply .comment-time {
  font-size: 0.75rem;
}

.comment-reply .reply-btn {
  font-size: 0.8rem;
}

/* Vertical connector line between reply bubbles */
.comment-replies::before {
  content: '';
  position: absolute;
  left: 16px; /* align under avatars */
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(0,212,255,0.18), rgba(0,212,255,0.06));
  border-radius: 2px;
}

.comment-reply::after {
  /* small connector from vertical line to this reply's avatar */
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: rgba(0,212,255,0.18);
  transform: translateY(-50%);
  border-radius: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .comment-replies {
    margin-left: 1.5rem;
    padding-left: 0.5rem;
  }
  
  .comment-reply {
    padding: 0.5rem;
  }
  
  .reply-input {
    font-size: 0.85rem;
  }
}


/* ===== COMMENT MEDIA STYLES ===== */

/* Media buttons in comments */
.comment-media-buttons {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.comment-media-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.comment-media-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  transform: scale(1.05);
}

/* Add comment layout */
.add-comment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.add-comment input[type="text"] {
  flex: 1;
  min-width: 200px;
}

/* Media preview in comments */
.comment-media-preview {
  width: 100%;
  margin-top: 0.75rem;
  animation: slideDown 0.3s ease;
}

.media-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.media-preview-item img,
.media-preview-item video {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.remove-media-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s ease;
}

.remove-media-btn:hover {
  background: #ff4444;
  transform: scale(1.1);
}

/* Comment images and videos */
.comment-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.comment-video {
  width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin-top: 0.5rem;
  background: #000;
}

/* Reply media adjustments */
.comment-reply .comment-image,
.comment-reply .comment-video {
  max-height: 200px;
}

.reply-input-container .comment-media-buttons {
  margin-left: 0;
  margin-top: 0.5rem;
}

.reply-input-container .comment-media-preview {
  margin-bottom: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .add-comment {
    flex-direction: column;
    align-items: stretch;
  }
  
  .add-comment input[type="text"] {
    width: 100%;
  }
  
  .comment-media-buttons {
    justify-content: flex-start;
    margin-left: 0;
  }
  
  .comment-image,
  .comment-video {
    max-height: 250px;
  }
  
  .comment-reply .comment-image,
  .comment-reply .comment-video {
    max-height: 180px;
  }
}


/* ===== CROSS-BROWSER & RESPONSIVE COMPATIBILITY ===== */

/* Ensure proper box-sizing across all browsers */
*,
*::before,
*::after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/* Touch action for mobile devices */
.social-main {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Smooth scrolling with fallback */
@supports (scroll-behavior: smooth) {
  html {
    scroll-behavior: smooth;
  }
}

/* Safe area insets for notched devices (iPhone X+) */
@supports (padding: max(0px)) {
  .social-main {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
  
  .left-sidebar {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }
}

/* Flexbox fallbacks for older browsers */
.social-layout {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  display: grid;
}

.profile-card,
.social-nav,
.sidebar-card,
.post-card,
.create-post-card {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}

/* Button and input touch target sizing (minimum 44x44px for accessibility) */
.btn,
.post-option,
.post-action,
.nav-item,
button,
input[type="submit"],
input[type="button"] {
  min-height: 44px;
  min-width: 44px;
}

/* Ensure inputs are properly styled on iOS */
input,
textarea,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  font-size: 16px; /* Prevents zoom on focus in iOS */
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Disable default iOS button styles */
button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Remove tap highlight on mobile */
a,
button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

/* ===== TABLET RESPONSIVE (768px - 1024px) ===== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .social-layout {
    grid-template-columns: 220px 1fr;
    gap: 1rem;
  }
  
  .right-sidebar {
    display: none;
  }
  
  .profile-card {
    padding: 1.25rem;
  }
  
  .profile-avatar {
    width: 70px;
    height: 70px;
  }
  
  .profile-card h3 {
    font-size: 1rem;
  }
  
  .profile-stats .stat-num {
    font-size: 1rem;
  }
  
  .social-nav .nav-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .nav-svg {
    width: 20px;
    height: 20px;
  }
  
  .post-card {
    padding: 1rem;
  }
  
  .create-post-card {
    padding: 1rem;
  }
  
  
  .sidebar-card {
    padding: 1rem;
  }
}

/* ===== TABLET BOTTOM NAVIGATION (Portrait & Landscape) ===== */
/* Tablet Portrait Mode (768px - 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .social-layout {
    grid-template-columns: 1fr !important;
    padding-bottom: 80px;
  }
  
  .social-section .social-layout .left-sidebar,
  .left-sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    flex-direction: row !important;
    background: rgba(10, 14, 39, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 0.5rem 1rem !important;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
    border-top: 1px solid rgba(0, 212, 255, 0.2) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
    z-index: 9999 !important;
    height: auto !important;
    width: 100% !important;
  }
  
  .left-sidebar .profile-card {
    display: none !important;
  }
  
  .left-sidebar .social-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    gap: 0.5rem !important;
  }
  
  .left-sidebar .social-nav .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.7rem !important;
    gap: 0.3rem !important;
    text-align: center !important;
    border-radius: 10px !important;
    min-width: 60px !important;
    color: var(--gray-text) !important;
  }
  
  .left-sidebar .social-nav .nav-item:hover {
    background: rgba(0, 212, 255, 0.1) !important;
  }
  
  .left-sidebar .social-nav .nav-item.active {
    background: rgba(0, 212, 255, 0.15) !important;
    color: var(--primary-color) !important;
  }
  
  .left-sidebar .social-nav .nav-svg {
    width: 24px !important;
    height: 24px !important;
  }
  
  .social-content {
    padding-bottom: 90px !important;
  }
  
  .right-sidebar {
    display: none !important;
  }
}

/* Tablet Landscape Mode (768px - 1024px height, wider screens) */
@media screen and (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) and (max-height: 900px) {
  .social-layout {
    grid-template-columns: 1fr !important;
    padding-bottom: 80px;
  }
  
  .social-section .social-layout .left-sidebar,
  .left-sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    flex-direction: row !important;
    background: rgba(10, 14, 39, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 0.5rem 1rem !important;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
    border-top: 1px solid rgba(0, 212, 255, 0.2) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
    z-index: 9999 !important;
    height: auto !important;
    width: 100% !important;
  }
  
  .left-sidebar .profile-card {
    display: none !important;
  }
  
  .left-sidebar .social-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    gap: 0.5rem !important;
  }
  
  .left-sidebar .social-nav .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.7rem !important;
    gap: 0.3rem !important;
    text-align: center !important;
    border-radius: 10px !important;
    min-width: 60px !important;
    color: var(--gray-text) !important;
  }
  
  .left-sidebar .social-nav .nav-item:hover {
    background: rgba(0, 212, 255, 0.1) !important;
  }
  
  .left-sidebar .social-nav .nav-item.active {
    background: rgba(0, 212, 255, 0.15) !important;
    color: var(--primary-color) !important;
  }
  
  .left-sidebar .social-nav .nav-svg {
    width: 24px !important;
    height: 24px !important;
  }
  
  .social-content {
    padding-bottom: 90px !important;
  }
  
  .right-sidebar {
    display: none !important;
  }
}

/* ===== SMALL TABLET / LARGE PHONE (600px - 768px) ===== */
@media screen and (max-width: 768px) and (min-width: 601px) {
  .social-main {
    padding-top: 80px;
  }
  
  .social-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .left-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    flex-direction: row;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 1rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 212, 255, 0.15);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    height: auto;
  }
  
  .profile-card {
    display: none;
  }
  
  .social-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    gap: 0;
  }
  
  .social-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    gap: 0.3rem;
    text-align: center;
    border-radius: 12px;
    min-height: auto;
    min-width: 65px;
    transition: all 0.2s ease;
  }
  
  .social-nav .nav-item:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: none;
  }
  
  .social-nav .nav-item.active {
    background: rgba(0, 212, 255, 0.15);
  }
  
  .social-nav .nav-svg {
    width: 24px;
    height: 24px;
  }
  
  .social-content {
    padding-bottom: 90px;
  }
  
  .profile-info .follow-btn {
    position: static;
    margin-top: 1rem;
  }
  
  .right-sidebar {
    display: none;
  }
  
  .profile-container {
    border-radius: 12px;
  }
  
  .profile-banner {
    height: 120px;
  }
  
  .profile-info {
    padding: 0 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .profile-info .profile-avatar-large {
    width: 100px;
    height: 100px;
    margin-top: -50px;
  }
}

/* ===== REPOST MOBILE RESPONSIVE ===== */
@media screen and (max-width: 768px) {
  .repost-indicator {
    font-size: 0.8rem;
    gap: 0.35rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .repost-indicator svg {
    width: 16px;
    height: 16px;
  }
  
  .original-post-container {
    padding: 0.75rem;
  }
  
  /* Repost modal content adjustments */
  #repostModal .modal-content {
    max-width: calc(100vw - 24px);
    width: calc(100vw - 24px);
    margin: 12px;
    padding: 0 !important;
    border-radius: 16px;
    overflow: hidden;
  }
  
  .repost-modal-options {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0.75rem 0;
  }
  
  .repost-option-btn {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    gap: 1rem;
    width: 100%;
    text-align: left;
    align-items: center;
  }
  
  .repost-option-btn svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }
  
  .repost-option-btn .option-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }
  
  .repost-option-btn .option-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.3;
  }
  
  .repost-option-btn .option-description {
    font-size: 0.875rem;
    line-height: 1.25;
    opacity: 0.85;
    margin: 0;
  }
  
  .repost-option-btn.cancel-repost {
    margin-top: 0.5rem;
    padding-top: 1rem;
  }
  
  .repost-comment-form {
    padding: 1.25rem !important;
  }
  
  .repost-comment-form textarea {
    min-height: 90px;
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 0.875rem;
  }
  
  .repost-preview-card {
    max-height: 250px;
    padding: 0.875rem;
    margin-top: 1rem;
  }
  
  .repost-comment-form .modal-header {
    margin: -1.25rem -1.25rem 1rem !important;
    padding: 1rem 1.25rem !important;
  }
  
  .repost-comment-form .modal-header h2 {
    font-size: 1.15rem;
  }
  
  .repost-char-count {
    margin-top: 0.5rem;
    font-size: 0.875rem;
  }
  
  .repost-comment-form .form-actions {
    margin-top: 1rem;
    gap: 0.75rem;
  }
  
  .repost-comment-form .form-actions button {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }
}

/* ===== MOBILE RESPONSIVE (max-width: 600px) ===== */
@media screen and (max-width: 600px) {
  .social-main {
    padding-top: 70px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .social-section {
    padding: 0 0.5rem;
  }
  
  .social-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  /* Auth section mobile */
  .auth-section {
    padding: 1rem 0.5rem;
    min-height: auto;
  }
  
  .auth-container {
    padding: 1.5rem 1rem;
    border-radius: 16px;
    max-width: 100%;
  }
  
  .auth-tabs {
    gap: 0.25rem;
  }
  
  .auth-tab {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
  
  .auth-form h2 {
    font-size: 1.25rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.75rem;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Create post mobile */
  .create-post-card {
    padding: 0.75rem;
    border-radius: 12px;
    margin-bottom: 1rem;
  }
  
  .create-post-header {
    gap: 0.75rem;
  }
  
  .create-post-header .small-avatar {
    width: 40px;
    height: 40px;
  }
  
  .create-post-header textarea {
    padding: 0.75rem;
    font-size: 16px;
    min-height: 80px;
  }
  
  .create-post-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
  }
  
  .post-options {
    gap: 0.5rem;
    order: 1;
    flex: 1;
  }
  
  .post-option {
    width: 36px;
    height: 36px;
  }
  
  .char-count {
    order: 2;
    font-size: 0.8rem;
  }
  
  .create-post-footer .btn {
    order: 3;
    padding: 0.5rem 1rem;
    min-width: 70px;
  }
  
  /* Post card mobile */
  .post-card {
    padding: 0.875rem;
    border-radius: 12px;
  }
  
  .post-header {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .post-avatar {
    width: 40px;
    height: 40px;
  }
  
  .post-user-info .display-name {
    font-size: 0.9rem;
  }
  
  .post-user-info .username {
    font-size: 0.8rem;
  }
  
  .post-time {
    font-size: 0.75rem;
  }
  
  .post-content {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }
  
  .post-image {
    max-height: 300px;
    border-radius: 10px;
    margin-bottom: 0.75rem;
  }
  
  .post-video {
    max-height: 350px;
    border-radius: 10px;
    margin-bottom: 0.75rem;
  }
  
  .post-actions {
    gap: 0.5rem;
    padding-top: 0.75rem;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .post-action {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    gap: 0.35rem;
    flex: 1;
    min-width: auto;
    justify-content: center;
  }
  
  .post-action svg {
    width: 16px;
    height: 16px;
  }
  
  /* Comments mobile */
  .comments-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }
  
  .comment {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .comment-avatar {
    width: 30px;
    height: 30px;
  }
  
  .comment-content {
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
  }
  
  .comment-header .display-name {
    font-size: 0.85rem;
  }
  
  .comment-text {
    font-size: 0.85rem;
  }
  
  .add-comment {
    gap: 0.5rem;
    padding: 0.75rem 0;
  }
  
  .add-comment input {
    padding: 0.5rem 0.75rem;
    font-size: 16px;
  }
  
  .add-comment button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  /* Profile view mobile */
  .profile-container {
    border-radius: 12px;
  }
  
  .profile-banner {
    height: 120px;
  }
  
  .profile-info {
    padding: 0 0.75rem 1rem;
  }
  
  .profile-info .profile-avatar-large {
    width: 80px;
    height: 80px;
    margin-top: -40px;
    border-width: 3px;
  }
  
  .profile-info h2 {
    font-size: 1.1rem;
    margin-top: 0.75rem;
  }
  
  .profile-info .username {
    font-size: 0.85rem;
  }
  
  .profile-info .bio {
    font-size: 0.9rem;
  }
  
  .profile-meta {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
  }
  
  .profile-stats-large {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .profile-stats-large .stat-num {
    font-size: 1.1rem;
  }
  
  .profile-stats-large .stat-label {
    font-size: 0.8rem;
  }
  
  .profile-posts {
    padding: 1rem 0.75rem;
  }
  
  
  
  /* Explore container mobile */
  .search-box {
    flex-direction: row;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .search-box input {
    padding: 0.75rem 1rem;
    font-size: 16px;
    flex: 1;
    min-width: 0;
  }
  
  .search-box button {
    width: auto;
    min-width: 48px;
    padding: 0.75rem;
    flex-shrink: 0;
  }
  
  .search-box button svg {
    width: 20px;
    height: 20px;
  }
  
  .user-card {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .user-card img {
    width: 45px;
    height: 45px;
  }
  
  .user-card .display-name {
    font-size: 0.9rem;
  }
  
  /* Notifications mobile */
  .notifications-container h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .notification-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .notification-item img {
    width: 40px;
    height: 40px;
  }
  
  .notif-text {
    font-size: 0.9rem;
  }
  
  /* Follow requests mobile */
  .follow-request-item {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .request-avatar {
    width: 45px;
    height: 45px;
  }
  
  .request-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .request-actions .btn {
    flex: 1;
    max-width: 100px;
    text-align: center;
  }
  
  /* Modal mobile */
  .modal {
    padding: 0.5rem;
    align-items: flex-end;
  }
  
  .modal-content {
    padding: 1rem;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    max-width: 100%;
  }
  
  .modal-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
  
  .modal-header h2 {
    font-size: 1.1rem;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .form-actions .btn {
    width: 100%;
  }
  
  /* Voice/Video notes mobile */
  .voice-note-preview,
  .video-note-preview {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .voice-note-play-btn {
    width: 36px;
    height: 36px;
  }
  
  .video-note-preview-container {
    width: 60px;
    height: 60px;
  }
  
  .post-voice-note {
    padding: 0.75rem;
    max-width: 100%;
  }
  
  .post-video-note .video-note-container {
    width: 140px;
    height: 140px;
  }
  
  /* Recording UI mobile */
  .recording-modal {
    border-radius: 16px;
    max-width: 400px;
  }
}

/* ===== HIGH DPI / RETINA DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .profile-avatar img,
  .post-avatar,
  .comment-avatar,
  .small-avatar {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  /* Already dark themed, but ensure consistency */
  :root {
    color-scheme: dark;
  }
}

/* ===== REDUCED MOTION PREFERENCE ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .profile-avatar,
  .post-avatar,
  .recording-dot {
    animation: none !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .social-sidebar,
  .hamburger,
  .create-post-card,
  .post-actions,
  .add-comment,
  .recording-ui,
  .modal {
    display: none !important;
  }
  
  .social-layout {
    display: block;
  }
  
  .social-content {
    padding: 0;
  }
  
  .post-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
  }
}

/* ===== BROWSER-SPECIFIC FIXES ===== */

/* Firefox scrollbar styling */
@-moz-document url-prefix() {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.5) rgba(255, 255, 255, 0.1);
  }
}

/* WebKit scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.6);
}

/* Hide scrollbar on mobile but keep functionality */
@media screen and (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }
  
  .feed-container,
  .modal-content {
    -webkit-overflow-scrolling: touch;
  }
}

/* IE11 and Edge Legacy flexbox fixes */
@supports (-ms-ime-align: auto) {
  .social-layout {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }
  
  .social-content {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
  }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
  /* Fix for iOS momentum scrolling */
  .feed-container,
  .modal-content,
  .notifications-list {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix for Safari flexbox gaps */
  .post-actions {
    margin: -0.25rem;
  }
  
  .post-actions > * {
    margin: 0.25rem;
  }
}

/* Focus visible for keyboard navigation (accessibility) */
.btn:focus-visible,
.post-option:focus-visible,
.post-action:focus-visible,
.nav-item:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Ensure interactive elements are visible on focus */
a:focus,
button:focus {
  outline: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== MUSIC NOTE (AUDIO POST) UI ===== */
.post-music-note {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(33, 150, 243, 0.08);
  border-radius: 20px;
  border: 1px solid rgba(33, 150, 243, 0.15);
  margin-top: 12px;
  width: 100%; /* make full width of container for a longer look */
  max-width: 100%;
  box-sizing: border-box;
}
.post-music-note .music-note-btn {
  width: 56px;
  height: 56px;
  background: #2196f3;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.post-music-note .music-note-btn:hover {
  background: #1565c0;
  transform: scale(1.06);
}
.post-music-note .music-note-btn.playing {
  background: #ff4444;
}
.post-music-note .music-note-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-music-note .music-note-waveform {
  display: flex;
  align-items: flex-end; /* anchor bars to bottom */
  gap: 5px;
  height: 34px; /* slightly smaller waveform to fit mobile */
  align-self: flex-start;
  overflow: hidden;
}
.post-music-note .voice-note-bar {
  width: 4px; /* slimmer bars to prevent overflow */
  /* use repost green for music waveform base */
  background: rgba(23, 191, 99, 0.22);
  border-radius: 3px;
  transition: all 0.1s ease;
  transform-origin: bottom center;
}
.post-music-note .voice-note-bar.active {
  background: linear-gradient(180deg, #17bf63 0%, #118f3f 100%);
  box-shadow: 0 2px 6px rgba(23,191,99,0.15);
}
.post-music-note .music-note-time {
  font-size: 13px;
  color: var(--gray-text);
  font-family: monospace;
  min-width: 56px;
}
.post-music-note .music-note-track {
  font-size: 14px;
  color: var(--light-text);
  font-weight: 600;
  margin-left: 8px;
}
.post-music-note .music-note-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Waveform animation when playing */
@keyframes waveGrow {
  from { transform: scaleY(0.28); opacity: 0.72; }
  to { transform: scaleY(1); opacity: 1; }
}

.post-music-note .music-wave-bar {
  transform-origin: bottom center;
}

.post-music-note.playing .music-wave-bar {
  animation-name: waveGrow;
  animation-duration: 0.9s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

/* Stagger delays for natural look */
.post-music-note.playing .music-wave-bar:nth-child(3n) { animation-delay: 0.04s; }
.post-music-note.playing .music-wave-bar:nth-child(4n) { animation-delay: 0.08s; }
.post-music-note.playing .music-wave-bar:nth-child(5n) { animation-delay: 0.12s; }
.post-music-note.playing .music-wave-bar:nth-child(7n) { animation-delay: 0.18s; }

/* Ensure track name wraps and is visible */
.post-music-note .music-note-track {
  display: block;
  line-height: 1.1;
}

/* ===== CLEAR ALL NOTIFICATIONS BUTTON ===== */
.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.notifications-header .section-heading {
  margin: 0;
  flex: 1;
}

.clear-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: #ff6b6b;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}

.clear-all-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #ff6b6b, #ff4444);
  z-index: -2;
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}

.clear-all-btn::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: var(--bg-dark, #0a0a0f);
  z-index: -1;
  transition: all 0.3s ease;
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
}

.clear-all-btn:hover::after {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 68, 68, 0.2));
}

.clear-all-btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 
    0 0 20px rgba(255, 107, 107, 0.4),
    0 0 40px rgba(255, 68, 68, 0.2);
}

.clear-all-btn:active {
  transform: translateY(0);
}

.clear-all-btn svg {
  transition: transform 0.2s ease;
}

.clear-all-btn:hover svg {
  transform: rotate(90deg);
}

.clear-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .notifications-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .notifications-header .section-heading {
    margin-bottom: 0.25rem;
  }
  
  .clear-all-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .notifications-header {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .clear-all-btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 16px;
  }
  
  .clear-all-btn svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 360px) {
  .notifications-header {
    gap: 0.4rem;
  }
  
  .clear-all-btn {
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }
  
  .clear-all-btn svg {
    width: 12px;
    height: 12px;
  }
}

/* ===== FRIENDS LIST STYLES ===== */

.friends-container {
  padding: 0 1rem;
}

.friends-container h2 {
  margin-bottom: 0.5rem;
  color: var(--light-text);
}

.friends-subtitle {
  margin-bottom: 1.5rem;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.friend-card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.friend-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.friend-card .friend-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.friend-card .friend-name {
  font-weight: 600;
  color: var(--light-text);
  font-size: 1rem;
}

.friend-card .friend-username {
  color: var(--gray-text);
  font-size: 0.85rem;
}

.friend-card .friend-bio {
  color: var(--gray-text);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.friend-actions {
  display: flex;
  gap: 0.5rem;
}

/* Unfollow button styles */
.unfollow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(238, 90, 90, 0.05) 100%) !important;
  border: 1px solid rgba(255, 107, 107, 0.25) !important;
  color: #ff6b6b !important;
  transition: all 0.2s ease;
}

.unfollow-btn:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(238, 90, 90, 0.1) 100%) !important;
  border-color: rgba(255, 107, 107, 0.4) !important;
  transform: translateY(-1px);
}

.unfollow-btn svg {
  width: 14px;
  height: 14px;
}

/* Sidebar Friends */
.sidebar-friends-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 150px;
}

/* Empty state for sidebar friends */
.sidebar-friends-list .empty-state {
  padding: 1rem 0.5rem;
  text-align: center;
  color: var(--gray-text);
  font-size: 0.85rem;
}

.sidebar-friend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sidebar-friend:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-friend img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-friend .friend-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-friend .friend-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--light-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-friend .friend-username {
  font-size: 0.75rem;
  color: var(--gray-text);
}

.view-all-link {
  display: block;
  text-align: center;
  padding: 0.75rem;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0.5rem;
  transition: all 0.2s ease;
}

.view-all-link:hover {
  color: var(--light-text);
  background: rgba(0, 212, 255, 0.05);
}

/* DM nav item uses standard styling - no overrides needed */

/* Friends badge */
.friends-badge {
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

/* Mobile responsive friends */
@media (max-width: 768px) {
  .friend-card {
    padding: 0.85rem;
  }
  
  .friend-avatar {
    width: 48px;
    height: 48px;
  }
  
  .friend-card .friend-name {
    font-size: 0.95rem;
  }
  
  .friend-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .unfollow-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .friend-card {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .friend-avatar {
    width: 44px;
    height: 44px;
  }
  
  .friend-card .friend-bio {
    display: none;
  }
}

/* ===== PRIVATE POSTS NOTICE ===== */
.posts-private-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  margin: 1rem 0;
}

.posts-private-notice .private-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 193, 7, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.posts-private-notice .private-icon svg {
  color: #ffb300;
  filter: drop-shadow(0 2px 8px rgba(255, 179, 0, 0.3));
}

.posts-private-notice h4 {
  color: var(--light-text);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.posts-private-notice p {
  color: var(--gray-text);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 320px;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .posts-private-notice {
    padding: 2rem 1.5rem;
  }
  
  .posts-private-notice .private-icon {
    width: 64px;
    height: 64px;
  }
  
  .posts-private-notice .private-icon svg {
    width: 36px;
    height: 36px;
  }
  
  .posts-private-notice h4 {
    font-size: 1rem;
  }
  
  .posts-private-notice p {
    font-size: 0.9rem;
  }
}

/* ===== POST CARD ANIMATIONS FOR INSTANT REPOST ===== */

/* Animation for new post appearing in feed */
.post-card-new {
  animation: postSlideIn 0.4s ease-out;
}

@keyframes postSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation for post being removed from feed */
.post-card-removing {
  animation: postSlideOut 0.3s ease-in forwards;
}

@keyframes postSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(30px) scale(0.95);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
}

/* Highlight effect for repost button when activated */
.post-action.reposted {
  color: #17bf63 !important;
}

.post-action.reposted .action-icon svg {
  fill: #17bf63;
}

/* Subtle pulse animation when repost is successful */
.post-action.reposted .action-icon {
  animation: repostPulse 0.3s ease-out;
}

@keyframes repostPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}


/* ===== PRIVATE MESSAGING STYLES ===== */

/* Messages Container */
.messages-container {
  padding: 0 1rem;
}

.messages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.messages-header h2 {
  color: var(--light-text);
  margin: 0;
}

.messages-header .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Conversations List */
.conversations-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.conversation-item:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.conversation-item.unread {
  border-left: 3px solid var(--primary-color);
  background: rgba(0, 212, 255, 0.05);
}

.conversation-item .conv-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.conversation-item .conv-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.conversation-item .online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #4caf50;
  border: 3px solid var(--card-bg, #1a1a2e);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}

.conversation-item .conv-info {
  flex: 1;
  min-width: 0;
}

.conversation-item .conv-name {
  font-weight: 600;
  color: var(--light-text);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.conversation-item .conv-last-message {
  color: var(--gray-text);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-item .conv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.conversation-item .conv-time {
  color: var(--gray-text);
  font-size: 0.75rem;
}

.conversation-item .conv-unread-badge {
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Conversation Modal (Chat View) */
.conversation-modal-content {
  max-width: 600px;
  height: 80vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.conversation-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.conversation-header .back-btn {
  background: transparent;
  border: none;
  color: var(--gray-text);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.conversation-header .back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-text);
}

.conversation-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  cursor: pointer;
}

.conversation-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.conversation-online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #4caf50;
  border: 2px solid var(--card-bg, #1a1a2e);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}

.conversation-user-details {
  display: flex;
  flex-direction: column;
}

.conversation-display-name {
  font-weight: 600;
  color: var(--light-text);
  font-size: 1rem;
}

.conversation-username {
  color: var(--gray-text);
  font-size: 0.8rem;
}

.conversation-status {
  font-size: 0.75rem;
  color: #4caf50;
}

.conversation-status.offline {
  color: var(--gray-text);
}

/* Messages Area */
.conversation-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
}

.message-bubble.sent {
  align-self: flex-end;
  background: #1a1f3a;
  color: var(--light-text);
  border-bottom-right-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.message-bubble.received {
  align-self: flex-start;
  background: #1a1f3a;
  color: var(--light-text);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* New message animation */
.message-bubble.message-new {
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message-content {
  font-size: 0.95rem;
  line-height: 1.4;
}

.message-time {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 0.35rem;
  text-align: right;
}

.message-bubble.sent .message-time {
  color: var(--gray-text);
}

.message-bubble.received .message-time {
  color: var(--gray-text);
}

.message-image {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

/* Message Meta (time + delete button) */
.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.message-meta .message-time {
  margin-top: 0;
}

.message-delete-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, transform 0.2s;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.message-bubble:hover .message-delete-btn {
  opacity: 1;
}

.message-delete-btn:hover {
  color: #ff6b6b;
  transform: scale(1.1);
}

.message-bubble.sent .message-delete-btn {
  color: rgba(255, 255, 255, 0.6);
}

.message-bubble.sent .message-delete-btn:hover {
  color: #ff6b6b;
}

/* Edit button */
.message-edit-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, transform 0.2s;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.message-bubble:hover .message-edit-btn {
  opacity: 1;
}

.message-edit-btn:hover {
  color: #00d4ff;
  transform: scale(1.1);
}

.message-bubble.sent .message-edit-btn {
  color: rgba(255, 255, 255, 0.6);
}

.message-bubble.sent .message-edit-btn:hover {
  color: #00d4ff;
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: 120px;
  animation: typingFadeIn 0.3s ease-out;
}

.typing-indicator.visible {
  display: flex;
}

@keyframes typingFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #00d4ff;
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.typing-text {
  font-size: 0.8rem;
  color: #00d4ff;
  font-style: italic;
}

/* Auto-Delete Badge for Messages */
.auto-delete-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: rgba(255, 152, 0, 0.15);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 10px;
  color: #ff9800;
  font-size: 0.65rem;
  font-weight: 600;
  animation: autodelete-pulse 2s ease-in-out infinite;
}

.auto-delete-badge svg {
  color: #ff9800;
  flex-shrink: 0;
}

.message-bubble.auto-delete {
  position: relative;
}

.message-bubble.auto-delete::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff9800, #ff5722);
  border-radius: 8px 8px 0 0;
  opacity: 0.6;
}

.message-bubble.sent.auto-delete::before {
  border-radius: 8px 2px 0 0;
}

.message-bubble.received.auto-delete::before {
  border-radius: 2px 8px 0 0;
}

@keyframes autodelete-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== AUTO-DELETE GHOST INDICATOR ===== */
.nav-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auto-delete-indicator {
  position: absolute;
  top: -10px;
  right: -8px;
  width: 18px;
  height: 18px;
  z-index: 10;
  display: none !important; /* Hidden by default - only shown via JS when enabled */
}

.auto-delete-indicator.show {
  display: flex !important;
  animation: ghostFloat 2s ease-in-out infinite;
}

.ghost-icon {
  width: 100%;
  height: 100%;
  fill: #ffd700;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 8px rgba(255, 193, 7, 0.5));
  animation: ghostFade 3s ease-in-out infinite;
}

/* Ghost floating animation */
@keyframes ghostFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Ghost fade in/out animation */
@keyframes ghostFade {
  0%, 100% {
    opacity: 0.8;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 8px rgba(255, 193, 7, 0.5));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 1)) drop-shadow(0 0 14px rgba(255, 193, 7, 0.8));
  }
}

/* Subtle effect on Messages nav item when enabled */
.social-nav .nav-item[data-view="messages"].auto-delete-enabled {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.12) 0%, transparent 100%);
  border-radius: 12px;
}

.social-nav .nav-item[data-view="messages"].auto-delete-enabled .nav-svg {
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

/* Mobile responsive */
@media (max-width: 768px) {
  .auto-delete-indicator {
    width: 14px;
    height: 14px;
    top: -8px;
    right: -6px;
  }
}

/* Date Separator */
.message-date-separator {
  text-align: center;
  color: var(--gray-text);
  font-size: 0.75rem;
  padding: 0.5rem 0;
  position: relative;
}

.message-date-separator::before,
.message-date-separator::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.message-date-separator::before {
  left: 0;
}

.message-date-separator::after {
  right: 0;
}

/* Message Input */
.conversation-input {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.conversation-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

/* Spacer to push send button to the right */
.conversation-input-row .input-spacer {
  flex: 1;
}

/* Attach File Button - matches voice/video buttons */
.attach-file-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--gray-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.attach-file-btn:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  transform: scale(1.05);
}

/* Message File Preview */
.message-file-preview {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: none;
}

.message-file-preview .file-preview-item {
  position: relative;
  display: inline-block;
}

.message-file-preview .file-preview-item img {
  max-width: 150px;
  max-height: 100px;
  border-radius: 8px;
  object-fit: cover;
}

.message-file-preview .remove-file-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(255, 107, 107, 0.9);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.message-file-preview .remove-file-btn:hover {
  background: #ff6b6b;
  transform: scale(1.1);
}

.message-file-preview .file-name {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-text);
  margin-top: 0.5rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* File type preview (non-image) */
.message-file-preview .file-type-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.message-file-preview .file-icon-wrapper {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.message-file-preview .file-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.message-file-preview .file-details .file-name {
  margin-top: 0;
  max-width: none;
  font-size: 0.85rem;
  color: var(--light-text);
  font-weight: 500;
}

.message-file-preview .file-details .file-size {
  font-size: 0.75rem;
  color: var(--gray-text);
}

.message-file-preview .file-type-preview .remove-file-btn {
  position: static;
  flex-shrink: 0;
}

/* Message file attachments display */
.message-file-attachment {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
}

.message-file-attachment:hover {
  background: rgba(255, 255, 255, 0.12);
}

.message-file-attachment .file-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  flex-shrink: 0;
}

.message-file-attachment .file-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.message-file-attachment .file-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--light-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-file-attachment .file-action {
  font-size: 0.7rem;
  color: var(--primary-color);
}

/* Video in messages */
.message-video-container {
  margin-bottom: 0.5rem;
}

.message-video {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  background: #000;
}

.message-video-container .message-file-name {
  font-size: 0.75rem;
  color: var(--gray-text);
  margin-top: 0.25rem;
}

/* Audio in messages */
.message-audio-container {
  margin-bottom: 0.5rem;
}

.message-audio {
  width: 100%;
  height: 40px;
  border-radius: 20px;
}

.message-audio-container .message-file-name {
  font-size: 0.75rem;
  color: var(--gray-text);
  margin-top: 0.25rem;
}

/* Message audio waveform player */
.message-audio-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
  min-width: 200px;
}

.message-audio-note:hover {
  background: rgba(0, 212, 255, 0.12);
}

.message-audio-note.playing {
  background: rgba(0, 212, 255, 0.15);
}

.message-audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.message-audio-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.message-audio-btn.playing {
  animation: audioPulse 1.5s ease-in-out infinite;
}

@keyframes audioPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3); }
  50% { box-shadow: 0 4px 16px rgba(0, 212, 255, 0.5); }
}

.message-audio-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.message-audio-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.message-wave-bar {
  width: 3px;
  background: rgba(0, 212, 255, 0.4);
  border-radius: 2px;
  transition: all 0.1s ease;
  min-height: 4px;
}

.message-wave-bar.active {
  background: #00d4ff;
  box-shadow: 0 0 4px rgba(0, 212, 255, 0.5);
}

.message-audio-note.playing .message-wave-bar {
  animation: waveBarPulse 0.5s ease-in-out infinite alternate;
}

.message-audio-note.playing .message-wave-bar:nth-child(odd) {
  animation-delay: 0.1s;
}

.message-audio-note.playing .message-wave-bar:nth-child(3n) {
  animation-delay: 0.2s;
}

@keyframes waveBarPulse {
  0% { transform: scaleY(0.7); opacity: 0.6; }
  100% { transform: scaleY(1); opacity: 1; }
}

.message-audio-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.message-audio-time {
  color: #00d4ff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.message-audio-name {
  color: var(--gray-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Message audio download button */
.message-audio-download {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--gray-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-left: 0.5rem;
}

.message-audio-download:hover {
  background: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
  transform: scale(1.1);
}

.message-audio-download:active {
  transform: scale(0.95);
}

.message-audio-download svg {
  flex-shrink: 0;
}

.conversation-input textarea {
  width: 100%;
  resize: none;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--light-text);
  font-size: 1rem;
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.5;
}

.conversation-input textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.conversation-input textarea::placeholder {
  color: var(--gray-text);
}

.send-message-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-message-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.send-message-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Message Voice/Video Note Buttons */
.msg-voice-btn,
.msg-video-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--gray-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.msg-voice-btn:hover,
.msg-video-btn:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  transform: scale(1.05);
}

.msg-voice-btn.recording,
.msg-video-btn.recording {
  background: rgba(255, 107, 107, 0.2);
  border-color: #ff6b6b;
  color: #ff6b6b;
  animation: recordingPulse 1.5s ease-in-out infinite;
}

@keyframes recordingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 107, 107, 0); }
}

/* Message Recording UI */
.message-recording-ui {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  z-index: 10;
  animation: slideUpRecording 0.3s ease;
}

@keyframes slideUpRecording {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.msg-recording-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.msg-recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.msg-recording-indicator .recording-dot {
  width: 12px;
  height: 12px;
  background: #ff6b6b;
  border-radius: 50%;
  animation: recordingDotPulse 1s ease-in-out infinite;
}

@keyframes recordingDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.msg-recording-type {
  color: var(--light-text);
  font-weight: 500;
}

.msg-recording-time {
  color: #ff6b6b;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.msg-recording-preview {
  display: none;
  justify-content: center;
}

.msg-recording-preview.active {
  display: flex;
}

.msg-recording-preview video {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ff6b6b;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.msg-recording-controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.msg-recording-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.msg-recording-btn.cancel {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.msg-recording-btn.cancel:hover {
  background: #ff6b6b;
  color: white;
  transform: scale(1.1);
}

.msg-recording-btn.send {
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  color: white;
}

.msg-recording-btn.send:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

/* Message Note Preview */
.message-note-preview {
  position: relative;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.msg-note-preview-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Audio preview in message input (unified style) */
.msg-audio-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.msg-audio-preview:hover {
  background: rgba(0, 212, 255, 0.12);
}

.msg-audio-preview.playing {
  background: rgba(0, 212, 255, 0.15);
}

.msg-audio-preview-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.msg-audio-preview-btn:hover {
  transform: scale(1.05);
}

.msg-audio-preview-btn.playing {
  animation: audioPulse 1.5s ease-in-out infinite;
}

.msg-audio-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.msg-audio-preview-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.msg-audio-preview-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.msg-audio-preview-time {
  color: #00d4ff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.msg-audio-preview-name {
  color: var(--gray-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Legacy Voice note preview in message input */
.msg-voice-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.msg-voice-preview-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-voice-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.msg-voice-preview-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}

.msg-voice-preview-time {
  font-size: 0.75rem;
  color: var(--gray-text);
}

/* Video note preview in message input */
.msg-video-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.msg-video-preview-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.msg-video-preview-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-video-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.msg-video-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.msg-video-preview-label {
  font-weight: 500;
  color: var(--light-text);
  font-size: 0.9rem;
}

.msg-video-preview-time {
  font-size: 0.75rem;
  color: var(--gray-text);
}

.msg-note-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 107, 107, 0.2);
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.msg-note-remove-btn:hover {
  background: #ff6b6b;
  color: white;
  transform: scale(1.1);
}

/* Message Voice Note Display */
.message-voice-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
  min-width: 180px;
}

.message-voice-note:hover {
  background: rgba(0, 212, 255, 0.12);
}

.message-voice-note.playing {
  background: rgba(0, 212, 255, 0.15);
}

.message-voice-note-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.message-voice-note-btn:hover {
  transform: scale(1.05);
}

.message-voice-note-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.message-voice-note-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}

.message-voice-note-time {
  font-size: 0.7rem;
  color: var(--gray-text);
}

/* Message Video Note Display */
.message-video-note {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.message-video-note-container {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #000;
}

.message-video-note-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-video-note-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: opacity 0.2s ease;
}

.message-video-note-container:hover .message-video-note-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.message-video-note-overlay.playing {
  opacity: 0;
}

.message-video-note-duration {
  font-size: 0.7rem;
  color: var(--gray-text);
  text-align: center;
}

/* New Message Modal */
.new-message-search {
  padding: 1rem 0;
}

.new-message-search input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--light-text);
  font-size: 0.95rem;
}

.new-message-search input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.new-message-search-results {
  margin-top: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

.new-message-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.new-message-user:hover {
  background: rgba(255, 255, 255, 0.08);
}

.new-message-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.new-message-user-info {
  flex: 1;
}

.new-message-user-name {
  font-weight: 600;
  color: var(--light-text);
  font-size: 0.95rem;
}

.new-message-user-username {
  color: var(--gray-text);
  font-size: 0.8rem;
}

/* Empty Messages State */
.messages-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
}

.messages-empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--gray-text);
  margin-bottom: 1rem;
}

.messages-empty-state h3 {
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

.messages-empty-state p {
  color: var(--gray-text);
  margin-bottom: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .conversation-modal-content {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .conversation-header {
    padding: 1rem;
  }
  
  .conversation-messages {
    padding: 1rem;
  }
  
  .conversation-input {
    padding: 0.875rem 1rem;
  }
  
  .conversation-input textarea {
    min-height: 60px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .conversation-input-row {
    gap: 0.4rem;
  }
  
  .attach-file-btn,
  .msg-voice-btn,
  .msg-video-btn {
    width: 40px;
    height: 40px;
  }
  
  .send-message-btn {
    width: 44px;
    height: 44px;
  }
  
  .message-bubble {
    max-width: 85%;
  }
  
  .messages-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .messages-header .btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .conversation-item {
    padding: 0.875rem;
  }
  
  .conversation-item .conv-avatar {
    width: 44px;
    height: 44px;
  }
  
  .conversation-item .conv-name {
    font-size: 0.95rem;
  }
  
  .conversation-item .conv-last-message {
    font-size: 0.8rem;
  }
}

/* Message button on profile */
.message-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 102, 255, 0.05) 100%) !important;
  border: 1px solid rgba(0, 212, 255, 0.25) !important;
  color: var(--primary-color) !important;
  transition: all 0.2s ease;
}

.message-btn:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 102, 255, 0.1) 100%) !important;
  border-color: rgba(0, 212, 255, 0.4) !important;
  transform: translateY(-1px);
}

.message-btn svg {
  width: 14px;
  height: 14px;
}

.profile-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
  .profile-actions-row {
    flex-direction: column;
    width: 100%;
  }
  
  .profile-actions-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== MESSAGE LIKES STYLES ===== */

/* Message like button */
.message-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--gray-text);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  margin-left: 4px;
}

.message-like-btn:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

.message-like-btn.liked {
  color: #ff6b6b;
}

.message-like-btn.liked svg {
  animation: heartPop 0.3s ease;
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.message-like-count {
  font-weight: 600;
  font-size: 0.7rem;
}

/* Shared post in message */
.shared-post-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 280px;
}

.shared-post-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.3);
}

.shared-post-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.shared-post-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.shared-post-user {
  display: flex;
  flex-direction: column;
}

.shared-post-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--light-text);
}

.shared-post-username {
  font-size: 0.7rem;
  color: var(--gray-text);
}

.shared-post-content {
  font-size: 0.85rem;
  color: var(--light-text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.shared-post-image {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.shared-post-video {
  width: 100%;
  max-height: 150px;
  border-radius: 8px;
}

.message-content.shared-message {
  font-size: 0.9rem;
  color: var(--gray-text);
  font-style: italic;
  margin-bottom: 0.25rem;
}

/* ===== SHARE MODAL STYLES ===== */

.share-modal-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.share-option-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.share-option-btn:hover {
  background: rgba(0, 212, 255, 0.1);
}

.share-option-btn.cancel-share {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-text);
}

.share-option-btn.cancel-share:hover {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
}

.share-option-btn svg {
  flex-shrink: 0;
  color: var(--primary-color);
}

.share-option-btn .option-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.share-option-btn .option-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.share-option-btn .option-description {
  font-size: 0.8rem;
  color: var(--gray-text);
}

/* Share to DM modal */
.share-dm-users-list {
  padding: 0.5rem 0;
}

.share-dm-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.share-dm-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Toast animation */
@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes toastSlideDown {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

/* Mobile adjustments for share modal */
@media (max-width: 480px) {
  .share-option-btn {
    padding: 0.875rem 1rem;
  }
  
  .share-option-btn svg {
    width: 22px;
    height: 22px;
  }
  
  .share-option-btn .option-title {
    font-size: 0.9rem;
  }
  
  .shared-post-card {
    max-width: 100%;
  }
}

/* ===== ENHANCED SMALL SCREEN NAVIGATION ===== */

/* Very small phones (320px - 375px) */
@media (max-width: 375px) {
  .social-section .social-layout .left-sidebar,
  .left-sidebar {
    padding: 0.35rem 0.5rem !important;
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom)) !important;
  }
  
  .social-nav {
    gap: 0 !important;
    justify-content: space-evenly !important;
  }
  
  .social-nav .nav-item {
    padding: 0.4rem 0.25rem !important;
    font-size: 0.55rem !important;
    gap: 0.15rem !important;
    min-width: 42px !important;
    max-width: 52px !important;
    flex: 1 1 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  .social-nav .nav-svg {
    width: 18px !important;
    height: 18px !important;
  }
  
  .social-nav .notification-badge,
  .social-nav .notif-badge,
  .social-nav #notifBadge {
    top: 0 !important;
    transform: translateX(10px) !important;
    font-size: 0.5rem !important;
    min-width: 12px !important;
    height: 12px !important;
    padding: 1px 3px !important;
  }
  
  .social-content {
    padding-bottom: 70px !important;
  }
}

/* Extra small phones (< 320px) */
@media (max-width: 320px) {
  .social-section .social-layout .left-sidebar,
  .left-sidebar {
    padding: 0.25rem 0.25rem !important;
  }
  
  .social-nav {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  
  .social-nav::-webkit-scrollbar {
    display: none !important;
  }
  
  .social-nav .nav-item {
    padding: 0.35rem 0.35rem !important;
    font-size: 0.5rem !important;
    min-width: 40px !important;
    flex: 0 0 auto !important;
  }
  
  .social-nav .nav-svg {
    width: 16px !important;
    height: 16px !important;
  }
  
  .social-content {
    padding-bottom: 65px !important;
  }
}

/* Hide nav text on very small screens to show only icons */
@media (max-width: 340px) {
  .social-nav .nav-item {
    font-size: 0 !important;
    padding: 0.5rem !important;
    min-width: 36px !important;
    max-width: 44px !important;
  }
  
  .social-nav .nav-svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Landscape mode on small phones */
@media (max-height: 500px) and (orientation: landscape) {
  .social-section .social-layout .left-sidebar,
  .left-sidebar {
    padding: 0.25rem 0.5rem !important;
    border-top-width: 1px !important;
  }
  
  .social-nav .nav-item {
    padding: 0.35rem 0.5rem !important;
    font-size: 0 !important;
    min-width: auto !important;
  }
  
  .social-nav .nav-svg {
    width: 20px !important;
    height: 20px !important;
  }
  
  .social-content {
    padding-bottom: 55px !important;
  }
}

/* Scrollable nav for devices with many items */
@media (max-width: 400px) {
  .social-nav {
    flex-wrap: nowrap !important;
  }
  
  .social-nav .nav-item {
    flex-shrink: 0 !important;
  }
}

/* Improved touch targets for all mobile */
@media (max-width: 768px) {
  .social-nav .nav-item {
    min-height: 48px !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  
  .social-nav .nav-item:active {
    background: rgba(0, 212, 255, 0.2) !important;
    transform: scale(0.95) !important;
  }
}

/* Fix for notch/safe area on modern phones */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .social-section .social-layout .left-sidebar,
    .left-sidebar {
      padding-left: max(0.5rem, env(safe-area-inset-left)) !important;
      padding-right: max(0.5rem, env(safe-area-inset-right)) !important;
      padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
    }
  }
}

/* High density screens - ensure crisp icons */
@media (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px),
       (min-resolution: 192dpi) and (max-width: 768px) {
  .social-nav .nav-svg {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Foldable phones - outer display */
@media (max-width: 300px) {
  .social-nav {
    justify-content: center !important;
    gap: 0.25rem !important;
  }
  
  .social-nav .nav-item {
    padding: 0.4rem !important;
    min-width: 32px !important;
    border-radius: 8px !important;
  }
  
  .social-nav .nav-svg {
    width: 16px !important;
    height: 16px !important;
  }
  
  /* Hide less important nav items on very small screens */
    .social-nav .nav-item[data-view="explore"],
    .social-nav .nav-item[data-view="friends"] {
      display: none !important;
    }
  }

  /* ===== GROUPS STYLES ===== */

  .groups-container { padding: 0; }
  .groups-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
  .groups-header h2 { margin: 0; font-size: 1.5rem; color: var(--light-text); }
  .groups-filter-bar { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
  .groups-search { position: relative; }
  .groups-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--gray-text); pointer-events: none; }
  .groups-search input { width: 100%; padding: 0.75rem 1rem 0.75rem 2.75rem; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; color: var(--light-text); font-size: 0.95rem; }
  .groups-search input:focus { outline: none; border-color: var(--primary-color); }
  .groups-tabs { display: flex; gap: 0.5rem; }
  .groups-tab { padding: 0.5rem 1rem; background: transparent; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; color: var(--gray-text); font-size: 0.875rem; cursor: pointer; transition: all 0.2s ease; }
  .groups-tab:hover { border-color: var(--primary-color); color: var(--light-text); }
  .groups-tab.active { background: var(--primary-color); border-color: var(--primary-color); color: white; }
  .groups-list { display: grid; gap: 1rem; }
  .groups-empty-state { text-align: center; padding: 3rem 1.5rem; background: var(--card-bg); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.05); }
  .groups-empty-state svg { color: var(--gray-text); margin-bottom: 1rem; }
  .groups-empty-state h3 { color: var(--light-text); margin-bottom: 0.5rem; }
  .groups-empty-state p { color: var(--gray-text); margin-bottom: 1.5rem; }
  .group-card { background: var(--card-bg); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.05); padding: 1.25rem; cursor: pointer; transition: all 0.2s ease; }
  .group-card:hover { border-color: rgba(0, 212, 255, 0.3); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); }
  .group-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
  .group-avatar { 
    width: 50px; 
    height: 50px; 
    border-radius: 12px; 
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 102, 255, 0.2) 100%); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--primary-color); 
    overflow: hidden; 
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
  }
  .group-card:hover .group-avatar {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.2), 0 6px 20px rgba(0, 0, 0, 0.3);
  }
  .group-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .group-avatar svg { width: 28px; height: 28px; }
  .group-avatar .avatar-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
  .group-info { flex: 1; min-width: 0; }
  .group-info h4 { margin: 0 0 0.25rem 0; color: var(--light-text); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .group-meta { font-size: 0.8rem; color: var(--gray-text); }
  .group-role-badge { padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; }
  .group-role-badge.admin { background: rgba(255, 107, 107, 0.2); color: #ff6b6b; }
  .group-role-badge.moderator { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
  .group-role-badge.member { background: rgba(0, 212, 255, 0.2); color: var(--primary-color); }
  
  /* Group Type Badge (Public/Private in card) */
  .group-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: auto;
  }
  .group-type-badge.private {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
  }
  .group-type-badge.public {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
  }
  
  .group-description { color: var(--gray-text); font-size: 0.875rem; margin: 0 0 1rem 0; line-height: 1.4; }
  .group-card-footer { display: flex; justify-content: flex-end; }
  .group-status { padding: 0.35rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
  .group-status.joined { background: rgba(0, 212, 255, 0.15); color: var(--primary-color); }
  .group-status.pending { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
  .group-view-header { height: 180px; background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(0, 102, 255, 0.2) 100%); border-radius: 12px 12px 0 0; display: flex; align-items: flex-end; justify-content: center; position: relative; background-size: cover; background-position: center; }
  .group-view-header.has-cover::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.2); border-radius: 12px 12px 0 0; }
  .group-view-avatar { 
    width: 100px; 
    height: 100px; 
    border-radius: 20px; 
    background: var(--card-bg); 
    border: 4px solid var(--card-bg); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--primary-color); 
    position: absolute; 
    bottom: -50px; 
    overflow: hidden; 
    transition: all 0.3s ease; 
    z-index: 2;
    box-shadow: 
      0 0 20px rgba(0, 212, 255, 0.4),
      0 0 40px rgba(0, 212, 255, 0.2),
      0 0 60px rgba(0, 212, 255, 0.1),
      0 8px 32px rgba(0, 0, 0, 0.4);
    animation: avatarGlow 3s ease-in-out infinite alternate;
  }
  
  @keyframes avatarGlow {
    0% {
      box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.4),
        0 0 40px rgba(0, 212, 255, 0.2),
        0 0 60px rgba(0, 212, 255, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.4);
    }
    100% {
      box-shadow: 
        0 0 25px rgba(0, 212, 255, 0.6),
        0 0 50px rgba(0, 212, 255, 0.3),
        0 0 75px rgba(0, 212, 255, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.4);
    }
  }
  
  .group-view-avatar:hover {
    transform: scale(1.05);
    box-shadow: 
      0 0 30px rgba(0, 212, 255, 0.7),
      0 0 60px rgba(0, 212, 255, 0.4),
      0 0 90px rgba(0, 212, 255, 0.2),
      0 12px 40px rgba(0, 0, 0, 0.5);
  }
  .group-view-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .group-view-avatar svg { color: var(--primary-color); }
  .group-view-avatar .avatar-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 102, 255, 0.2) 100%); color: var(--primary-color); }
  .group-view-avatar .avatar-edit-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s ease; color: white; cursor: pointer; border-radius: 16px; }
  .group-view-avatar:hover .avatar-edit-overlay { opacity: 1; }
  .cover-edit-btn { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; background: rgba(0,0,0,0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: white; transition: all 0.2s ease; border: none; z-index: 3; }
  .cover-edit-btn:hover { background: var(--primary-color); transform: scale(1.1); }
  .group-view-info { padding: 4rem 1.5rem 1.5rem; text-align: center; }
  .group-view-info h2 { margin: 0 0 0.75rem 0; font-size: 1.5rem; color: var(--light-text); display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
  
  /* Privacy Badge */
  .group-privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
  }
  .group-privacy-badge svg {
    flex-shrink: 0;
  }
  .group-privacy-badge.private {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(255, 60, 60, 0.1) 100%);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.2);
  }
  .group-privacy-badge.public {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.2);
  }
  
  .group-view-meta { color: var(--gray-text); font-size: 0.9rem; margin-bottom: 1rem; }
  .group-view-description { color: var(--light-text); font-size: 0.95rem; line-height: 1.5; margin-bottom: 1.5rem; }
  .group-view-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
  .group-post-form { padding: 1.25rem; background: var(--surface); border-radius: 12px; margin: 1.5rem 0; display: flex; flex-direction: column; gap: 0.75rem; }
  .group-post-form textarea { width: 100%; padding: 0.75rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: var(--light-text); font-size: 0.95rem; resize: vertical; min-height: 80px; }
  .group-post-form textarea:focus { outline: none; border-color: var(--primary-color); }
  .group-post-form button { align-self: flex-end; }
  .group-posts { padding: 0 1rem 1rem; }
  .group-posts h3 { color: var(--light-text); font-size: 1.1rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .group-post { background: var(--surface); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
  .group-post-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
  .group-post-header img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; cursor: pointer; }
  .group-post-user { flex: 1; display: flex; flex-direction: column; }
  .group-post-user .display-name { color: var(--light-text); font-weight: 600; font-size: 0.9rem; cursor: pointer; }
  .group-post-user .display-name:hover { color: var(--primary-color); }
  .group-post-user .post-time { color: var(--gray-text); font-size: 0.75rem; }
  .group-post-delete { background: transparent; border: none; color: var(--gray-text); cursor: pointer; padding: 0.25rem; border-radius: 4px; transition: all 0.2s ease; }
  .group-post-delete:hover { color: #ff6b6b; background: rgba(255, 107, 107, 0.1); }
  .group-post-content { color: var(--light-text); font-size: 0.95rem; line-height: 1.5; }
  .admin-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); flex-wrap: wrap; }
  .admin-tab { padding: 0.5rem 1rem; background: transparent; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: var(--gray-text); font-size: 0.875rem; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 0.5rem; }
  .admin-tab:hover { border-color: var(--primary-color); color: var(--light-text); }
  .admin-tab.active { background: var(--primary-color); border-color: var(--primary-color); color: white; }
  .admin-badge { background: rgba(255, 255, 255, 0.2); padding: 0.1rem 0.4rem; border-radius: 10px; font-size: 0.75rem; }
  .admin-tab.active .admin-badge { background: rgba(255, 255, 255, 0.3); }
  .join-request-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--surface); border-radius: 10px; margin-bottom: 0.75rem; }
  .join-request-item img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; cursor: pointer; }
  .join-request-info { flex: 1; display: flex; flex-direction: column; }
  .join-request-info .display-name { color: var(--light-text); font-weight: 600; }
  .join-request-info .username { color: var(--gray-text); font-size: 0.85rem; }
  .join-request-actions { display: flex; gap: 0.5rem; }
  .member-admin-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--surface); border-radius: 10px; margin-bottom: 0.75rem; }
  .member-admin-item img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; cursor: pointer; }
  .member-admin-info { flex: 1; display: flex; flex-direction: column; }
  .member-admin-info .display-name { color: var(--light-text); font-weight: 600; }
  .member-admin-info .username { color: var(--gray-text); font-size: 0.85rem; }
  .member-admin-controls { display: flex; align-items: center; gap: 0.5rem; }
  .member-admin-controls select { padding: 0.4rem 0.75rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: var(--light-text); font-size: 0.85rem; cursor: pointer; }
  .member-admin-controls select:focus { outline: none; border-color: var(--primary-color); }
  .member-admin-controls select:disabled { opacity: 0.5; cursor: not-allowed; }
  .danger-zone { padding-top: 1.5rem; border-top: 1px solid rgba(255, 107, 107, 0.2); margin-top: 2rem; }
  .danger-zone h4 { color: #ff6b6b; margin-bottom: 1rem; }
  .btn-danger { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%); border: none; color: white; }
  .btn-danger:hover { background: linear-gradient(135deg, #ff5252 0%, #e53935 100%); }

  /* Group View (inline, like feed) */
  .group-view { background: var(--card-bg); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; }
  .back-to-groups-btn { display: flex; align-items: center; gap: 0.5rem; padding: 1rem 1.25rem; background: transparent; border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: var(--primary-color); font-size: 0.95rem; cursor: pointer; width: 100%; transition: background 0.2s ease; }
  .back-to-groups-btn:hover { background: rgba(0, 212, 255, 0.1); }
  .back-to-groups-btn svg { flex-shrink: 0; }
  #groupViewContent { padding: 0; }
  .group-view .group-view-header { border-radius: 0; }
  .group-view .group-posts { padding: 1rem 1.25rem 1.25rem; }
  .group-view .group-post-form { margin: 0 1.25rem 1rem; border-radius: 12px; }
  .group-view .group-view-info { padding: 3rem 1.25rem 1.25rem; }

  @media (max-width: 600px) {
    .groups-tabs { flex-wrap: wrap; }
    .group-view-actions { flex-direction: column; }
    .group-view-actions button { width: 100%; }
        .join-request-item, .member-admin-item { flex-direction: column; text-align: center; }
        .join-request-actions, .member-admin-controls { width: 100%; justify-content: center; }
      }

    /* Group Post Form with Media */
    .group-post-form { display: flex; flex-direction: column; gap: 0.75rem; }
    .group-post-input-area { position: relative; }
    .group-post-input-area textarea { width: 100%; padding: 0.75rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: var(--light-text); font-size: 0.95rem; resize: vertical; min-height: 80px; }
    .group-post-input-area textarea:focus { outline: none; border-color: var(--primary-color); }
    .group-post-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
    .group-post-btns { display: flex; gap: 0.5rem; }
    .group-action-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 0.5rem; color: var(--gray-text); cursor: pointer; transition: all 0.2s ease; }
    .group-action-btn:hover { background: rgba(0,212,255,0.1); border-color: var(--primary-color); color: var(--primary-color); }
    .group-action-btn.recording { background: rgba(255,107,107,0.2); border-color: #ff6b6b; color: #ff6b6b; animation: pulse 1s infinite; }

    /* Group File Preview */
    .group-file-preview { display: flex; gap: 0.75rem; flex-wrap: wrap; padding: 0.75rem; background: rgba(255,255,255,0.03); border-radius: 8px; }
    .group-file-item { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; }
    .group-file-item img, .group-file-item video { width: 100%; height: 100%; object-fit: cover; }
    .group-file-item button { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: rgba(0,0,0,0.7); border: none; border-radius: 50%; color: white; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

    /* Group Note Preview */
    .group-note-preview { padding: 0.75rem; background: rgba(255,255,255,0.03); border-radius: 8px; }
    .group-note-item { display: flex; align-items: center; gap: 0.75rem; position: relative; }
    .group-note-item.voice { padding: 0.5rem 0; }
    .group-note-item.video { width: 120px; }
    .group-note-item.video video { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
    .group-note-item .remove-note { position: absolute; top: -5px; right: -5px; width: 22px; height: 22px; background: rgba(255,107,107,0.9); border: none; border-radius: 50%; color: white; font-size: 14px; cursor: pointer; }

    /* Group Recording UI */
    .group-recording-ui { background: var(--card-bg); border-radius: 12px; padding: 1.5rem; margin: 1rem 1.25rem; border: 1px solid rgba(255,107,107,0.3); }
    .group-recording-content { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
    .group-recording-indicator { display: flex; align-items: center; gap: 0.75rem; color: var(--light-text); }
    .group-recording-indicator .recording-dot { width: 12px; height: 12px; background: #ff6b6b; border-radius: 50%; animation: pulse 1s infinite; }
    .group-recording-preview { width: 150px; height: 150px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,0.05); display: none; }
    .group-recording-preview.active { display: block; }
    .group-recording-preview video { width: 100%; height: 100%; object-fit: cover; }
    .group-recording-controls { display: flex; gap: 1.5rem; }
    .group-rec-btn { width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
    .group-rec-btn.cancel { background: rgba(255,255,255,0.1); color: var(--gray-text); }
    .group-rec-btn.cancel:hover { background: rgba(255,107,107,0.2); color: #ff6b6b; }
    .group-rec-btn.send { background: var(--primary-color); color: white; }
    .group-rec-btn.send:hover { background: #00b8d9; transform: scale(1.05); }

    /* Group Post Media Display */
    .group-post-images { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
    .group-post-images img { max-width: 200px; max-height: 200px; border-radius: 8px; cursor: pointer; object-fit: cover; }
    .group-post-videos { margin-top: 0.75rem; }
    .group-post-videos video { max-width: 100%; max-height: 300px; border-radius: 8px; }

    /* Group Post Voice Note */
        .group-post-voice { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: rgba(255,255,255,0.05); border-radius: 25px; margin-top: 0.75rem; }
        .group-post-voice .voice-play-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-color); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .group-post-voice .voice-waveform { display: flex; align-items: center; gap: 2px; flex: 1; height: 24px; }
        .group-post-voice .wave-bar { width: 3px; background: var(--primary-color); border-radius: 2px; opacity: 0.6; }
        .group-post-voice .voice-duration { color: var(--gray-text); font-size: 0.8rem; flex-shrink: 0; }

        /* Group Post Video Note */
        .group-post-video-note { position: relative; width: 180px; height: 180px; margin-top: 0.75rem; }
        .group-post-video-note video { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; cursor: pointer; }
        .group-post-video-note .video-note-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
        .group-post-video-note .video-note-overlay:hover { background: rgba(0,0,0,0.5); }
        .group-post-video-note .video-note-overlay svg { color: white; }
        .group-post-video-note .video-note-duration { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.7); color: white; font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; }

        /* Waveform animation for voice note playback */
        @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

    /* ==========================================
       PROFESSIONAL MODAL SYSTEM
       ========================================== */

    /* Base Modal Improvements */
    .modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      animation: modalFadeIn 0.2s ease;
      padding: 1rem;
      box-sizing: border-box;
    }

    @keyframes modalFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes modalSlideIn {
      from { opacity: 0; transform: scale(0.9) translateY(-20px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }

    .modal-content {
      background: linear-gradient(145deg, #1a2332 0%, #141c28 100%);
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 255, 0.1);
      width: 100%;
      max-width: 500px;
      max-height: 90vh;
      overflow: hidden;
      animation: modalSlideIn 0.3s ease;
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.25rem 1.5rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(0, 0, 0, 0.2);
    }

    .modal-header h2 {
      margin: 0;
      font-size: 1.25rem;
      font-weight: 600;
      color: var(--light-text);
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .modal-header h2 svg {
      color: var(--primary-color);
    }

    .modal-close {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--gray-text);
      font-size: 1.25rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
    }

    .modal-close:hover {
      background: rgba(255, 107, 107, 0.2);
      border-color: rgba(255, 107, 107, 0.3);
      color: #ff6b6b;
      transform: rotate(90deg);
    }

    /* Modal Body */
    .modal-content form,
    .modal-content .modal-body {
      padding: 1.5rem;
    }

    /* Confirmation Modal */
    .modal-confirm,
    .modal-alert {
      max-width: 400px;
      text-align: center;
      padding: 2rem;
    }

    .confirm-icon,
    .alert-icon {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 1.5rem;
      animation: iconPop 0.4s ease;
    }

    @keyframes iconPop {
      0% { transform: scale(0); }
      50% { transform: scale(1.2); }
      100% { transform: scale(1); }
    }

    .confirm-icon {
      background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 102, 255, 0.2) 100%);
      color: var(--primary-color);
    }

    .confirm-icon.warning {
      background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
      color: #ffc107;
    }

    .confirm-icon.danger {
      background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(220, 53, 69, 0.2) 100%);
      color: #ff6b6b;
    }

    .alert-icon {
      background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 102, 255, 0.2) 100%);
      color: var(--primary-color);
    }

    .alert-icon.success {
      background: linear-gradient(135deg, rgba(40, 167, 69, 0.2) 0%, rgba(32, 201, 151, 0.2) 100%);
      color: #28a745;
    }

    .alert-icon.error {
      background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(220, 53, 69, 0.2) 100%);
      color: #ff6b6b;
    }

    .alert-icon.warning {
      background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
      color: #ffc107;
    }

    .modal-confirm h3,
    .modal-alert h3 {
      margin: 0 0 0.75rem;
      font-size: 1.5rem;
      font-weight: 600;
      color: var(--light-text);
    }

    .modal-confirm p,
    .modal-alert p {
      margin: 0 0 1.5rem;
      color: var(--gray-text);
      font-size: 1rem;
      line-height: 1.5;
    }

    .confirm-actions,
    .alert-actions {
      display: flex;
      gap: 1rem;
      justify-content: center;
    }

    .confirm-actions .btn,
    .alert-actions .btn {
      min-width: 120px;
      padding: 0.75rem 1.5rem;
      font-weight: 500;
    }

    /* Form Groups in Modals */
    .modal-content .form-group {
      margin-bottom: 1.25rem;
    }

    .modal-content .form-group label {
      display: block;
      margin-bottom: 0.5rem;
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--light-text);
    }

    .modal-content .form-group input,
    .modal-content .form-group textarea,
    .modal-content .form-group select {
      width: 100%;
      padding: 0.875rem 1rem;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      color: var(--light-text);
      font-size: 1rem;
      transition: all 0.2s ease;
      box-sizing: border-box;
    }

    .modal-content .form-group input:focus,
    .modal-content .form-group textarea:focus,
    .modal-content .form-group select:focus {
      outline: none;
      border-color: var(--primary-color);
      background: rgba(0, 212, 255, 0.05);
      box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    }

    .modal-content .form-group input::placeholder,
    .modal-content .form-group textarea::placeholder {
      color: var(--gray-text);
      opacity: 0.7;
    }

    /* Toggle Group in Modal */
    .modal-content .toggle-group {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1rem;
      background: rgba(255, 255, 255, 0.03);
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .modal-content .toggle-label {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .modal-content .toggle-text {
      font-weight: 500;
      color: var(--light-text);
      display: flex;
      align-items: center;
    }

    .modal-content .toggle-description {
      font-size: 0.8rem;
      color: var(--gray-text);
    }

    /* Toggle Switch */
    .toggle-switch {
      position: relative;
      width: 52px;
      height: 28px;
      flex-shrink: 0;
    }

    .toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .toggle-slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 28px;
      transition: all 0.3s ease;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .toggle-slider:before {
      position: absolute;
      content: "";
      height: 20px;
      width: 20px;
      left: 4px;
      bottom: 3px;
      background: white;
      border-radius: 50%;
      transition: all 0.3s ease;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    .toggle-switch input:checked + .toggle-slider {
      background: var(--primary-color);
      border-color: var(--primary-color);
    }

    .toggle-switch input:checked + .toggle-slider:before {
      transform: translateX(24px);
    }

    /* Form Actions */
    .modal-content .form-actions {
      display: flex;
      gap: 1rem;
      justify-content: flex-end;
      margin-top: 1.5rem;
      padding-top: 1.5rem;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Button Improvements */
    .modal-content .btn {
      padding: 0.75rem 1.5rem;
      border-radius: 12px;
      font-weight: 500;
      font-size: 0.95rem;
      cursor: pointer;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
    }

    .modal-content .btn-primary {
      background: linear-gradient(135deg, var(--primary-color) 0%, #0066ff 100%);
      border: none;
      color: white;
      box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    }

    .modal-content .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    }

    .modal-content .btn-secondary {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: var(--light-text);
    }

    .modal-content .btn-secondary:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.2);
    }

    .modal-content .btn-danger {
      background: linear-gradient(135deg, #ff6b6b 0%, #dc3545 100%);
      border: none;
      color: white;
      box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }

    .modal-content .btn-danger:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    }

    /* Admin Tabs in Modal */
    .admin-tabs {
      display: flex;
      gap: 0.5rem;
      padding: 1rem 1.5rem;
      background: rgba(0, 0, 0, 0.2);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      overflow-x: auto;
    }

    .admin-tab {
      padding: 0.625rem 1rem;
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 20px;
      color: var(--gray-text);
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .admin-tab:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.2);
      color: var(--light-text);
    }

    .admin-tab.active {
      background: var(--primary-color);
      border-color: var(--primary-color);
      color: white;
    }

    .admin-badge {
      background: rgba(255, 255, 255, 0.2);
      padding: 0.125rem 0.5rem;
      border-radius: 10px;
      font-size: 0.75rem;
      font-weight: 600;
    }

    .admin-tab.active .admin-badge {
      background: rgba(255, 255, 255, 0.3);
    }

    .admin-tab-content {
      padding: 1.5rem;
      max-height: 400px;
      overflow-y: auto;
    }

    /* Responsive Modal */
    @media (max-width: 600px) {
      .modal {
        padding: 0.5rem;
        align-items: flex-end;
      }
  
      .modal-content {
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        animation: modalSlideUp 0.3s ease;
      }
  
      @keyframes modalSlideUp {
        from { opacity: 0; transform: translateY(100%); }
        to { opacity: 1; transform: translateY(0); }
      }
  
      .confirm-actions,
      .alert-actions {
        flex-direction: column;
      }
  
      .confirm-actions .btn,
      .alert-actions .btn {
        width: 100%;
      }
  
      .modal-content .form-actions {
        flex-direction: column-reverse;
      }
  
      .modal-content .form-actions .btn {
        width: 100%;
      }
    }









