/* ===========================
   ROOT VARIABLES
   =========================== */
:root {
  /* Colors */
  --primary: #28a745;
  --primary-dark: #218838;
  --primary-light: rgba(40, 167, 69, 0.1);
  --primary-ultra-light: rgba(40, 167, 69, 0.05);
  
  --secondary: #007bff;
  --secondary-dark: #0056b3;
  
  --white: #ffffff;
  --black: #000000;
  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  --red: #ef4444;
  --red-dark: #dc2626;
  --red-light: rgba(239, 68, 68, 0.1);
  
  --green: #10b981;
  --yellow: #f59e0b;
  --blue: #3b82f6;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Typography */
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ===========================
   RESET & BASE STYLES
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  overflow-x: hidden;
}

body.no-scroll,
body.sidebar-open {
  overflow: hidden;
}

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-900);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--primary-dark);
}

/* ===========================
   UTILITIES
   =========================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ===========================
   TOAST MESSAGES
   =========================== */
.toast-message {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  font-size: var(--text-sm);
  font-weight: 500;
  max-width: 90%;
  text-align: center;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-message.show {
  bottom: 24px;
}

/* ===========================
   SCROLLBAR STYLING
   =========================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ===========================
   SKELETON LOADERS
   =========================== */
.skeleton {
  background: #fff;
  
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

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

.skeleton-profile-pic {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-full);
  margin: 0 auto;
}

.skeleton-username {
  width: 180px;
  height: 32px;
  margin: 1rem auto;
}

.skeleton-stats-text {
  width: 80px;
  height: 16px;
  margin: 0 auto 0.5rem;
}

.skeleton-stats-number {
  width: 60px;
  height: 28px;
  margin: 0 auto;
}

.skeleton-post {
  width: 100%;
  height: 300px;
  margin-bottom: 1rem;
  border-radius: var(--radius-xl);
}

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */

/* Mobile First - Default styles are for mobile */

/* Small screens (≥640px) */
@media (min-width: 640px) {
  :root {
    --text-2xl: 1.625rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
  }
}

/* Medium screens (≥768px) */
@media (min-width: 768px) {
  :root {
    --text-2xl: 1.75rem;
    --text-3xl: 2.125rem;
    --text-4xl: 2.75rem;
  }
}

/* Large screens (≥1024px) */
@media (min-width: 1024px) {
  :root {
    --text-2xl: 1.875rem;
    --text-3xl: 2.25rem;
    --text-4xl: 3rem;
  }
}

/* Extra large screens (≥1280px) */
@media (min-width: 1280px) {
  :root {
    --text-2xl: 2rem;
    --text-3xl: 2.5rem;
    --text-4xl: 3.25rem;
  }
}

/* ===========================
   ACCESSIBILITY
   =========================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

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

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
  .menu-icon,
  .modern-sidebar,
  .sidebar-overlay {
    display: none !important;
  }
}

/* Add to existing profile-base.css */

/* ===========================
   RESPONSIVE TYPOGRAPHY
   =========================== */
@media (min-width: 1024px) {
  .desktop-profile-card .profile-username {
    font-size: 1.75rem;
  }
  
  .desktop-stats-section .stats-item h3 {
    font-size: 1.75rem;
  }
}

/* ===========================
   PROFILE PICTURE CONTAINER FIXES
   =========================== */
.profile-picture-container {
  position: relative;
  flex-shrink: 0;
}

/* Ensure profile picture is visible on all screens */
.profile-picture {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 5px solid var(--white);
  box-shadow: var(--shadow-xl);
  background: var(--gray-100);
  display: block;
}

/* ===========================
   FILE INPUT ICON
   =========================== */
.file-input-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  background: var(--primary);
  border: 3px solid var(--white);
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 2;
}

.file-input-icon.show {
  display: flex;
}

.file-input-icon:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.file-input-icon i {
  color: white;
  font-size: 16px;
}

/* ===========================
   STATS ITEM RESPONSIVE FIXES
   =========================== */
.stats-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  cursor: pointer;
}

.stats-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.stats-item i {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.stats-item:hover i {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.stats-item p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0 0 0.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-item h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1;
}

@media (min-width: 768px) {
  .stats-item {
    padding: 1.5rem;
  }
  
  .stats-item i {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .stats-item h3 {
    font-size: 2rem;
  }
}

/* Desktop specific */
@media (min-width: 1024px) {
  .desktop-stats-section .stats-item {
    padding: 1rem;
  }
  
  .desktop-stats-section .stats-item i {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .desktop-stats-section .stats-item h3 {
    font-size: 1.5rem;
  }
}

/* ===========================
   DARK MODE SUPPORT
   =========================== */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #1a1a1a;
    --black: #ffffff;
    --gray-50: #0f0f0f;
    --gray-100: #1a1a1a;
    --gray-200: #2d2d2d;
    --gray-300: #3d3d3d;
    --gray-400: #5a5a5a;
    --gray-500: #7a7a7a;
    --gray-600: #999999;
    --gray-700: #b3b3b3;
    --gray-800: #d4d4d4;
    --gray-900: #e5e5e5;
  }

  body {
    background: var(--gray-50);
    color: var(--gray-900);
  }

  .profile-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border-bottom-color: var(--gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  .profile-header h1,
  .profile-header .menu-icon div {
    background-color: var(--gray-800);
  }

  .sidebar-desktop {
    background: var(--gray-100);
    border-right-color: var(--gray-200);
  }

  .sidebar-nav a {
    color: var(--gray-800);
  }

  .sidebar-nav a:hover {
    background: var(--gray-200);
    color: var(--primary);
  }

  .sidebar-nav a.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
  }

  .content-area {
    background: var(--gray-50);
  }

  .profile-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border-bottom-color: var(--gray-200);
  }

  .profile-hero-username {
    color: var(--gray-900);
  }

  .stats-section {
    background: var(--gray-100);
    border-color: var(--gray-200);
  }

  .stats-item {
    background: var(--gray-200);
    border-color: var(--gray-300);
  }

  .stats-item i {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
  }

  .stats-item h3,
  .stats-item p {
    color: var(--gray-900);
  }

  .tab-nav {
    background: var(--gray-100);
    border-bottom-color: var(--gray-200);
  }

  .tab-btn {
    color: var(--gray-600);
    border-bottom-color: transparent;
  }

  .tab-btn:hover {
    color: var(--gray-800);
    background: var(--gray-200);
  }

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

  .tab-content {
    background: transparent;
  }

  /* Modern Sidebar Dark Mode */
  .modern-sidebar {
    background: var(--gray-100);
    border-right-color: var(--gray-200);
  }

  .modern-sidebar-header {
    border-bottom-color: var(--gray-200);
  }

  .close-sidebar-btn {
    color: var(--gray-800);
  }

  .close-sidebar-btn:hover {
    background: var(--gray-200);
  }

  .sidebar-menu li a {
    color: var(--gray-800);
  }

  .sidebar-menu li a:hover {
    background: var(--gray-200);
    color: var(--primary);
  }

  .sidebar-menu li a.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
  }

  .sidebar-logout {
    color: var(--red);
    border-top-color: var(--gray-200);
  }

  .sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1);
  }
}