/* Base Styles */
:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary-color: #560bad;
    --accent-color: #f72585;
    --success-color: #4cf062;
    --warning-color: #f8961e;
    --danger-color: #e63946;

    /* Light Theme (Default) */
    --bg-color: #f8f9fa; /* var(--gray-100) */
    --text-color: #212529; /* var(--gray-900) */
    --card-bg-color: white;
    --input-bg-color: white;
    --input-border-color: var(--gray-300);
    --header-bg-color: white;
    --modal-bg-color: white;
    --text-muted-color: #6c757d; /* var(--gray-600) */

    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
  }

  /* Dark Theme Variables */
body.dark-theme {
    --bg-color: #121212; /* Even darker background for more depth */
    --text-color: #e0e0e0; /* Slightly off-white for better readability */
    --card-bg-color: #1e1e1e; /* Distinct card background */
    --input-bg-color: #2a2a2a; /* Darker input fields */
    --input-border-color: #444444; /* Lighter border for inputs */
    --header-bg-color: #1e1e1e; /* Header same as cards for consistency */
    --modal-bg-color: #252525; /* Slightly lighter modal background */
    --text-muted-color: #a0a0a0; /* Lighter muted text */

    --primary-color: #6c8cff; /* Brighter primary for dark mode */
    --primary-light: #8fa9ff;
    --primary-dark: #4a6def;
    
    --gray-100: #2b2b2b; /* Dark theme equivalent for light gray elements */
    --gray-200: #3a3a3a;
    --gray-300: #4a4a4a;
    --gray-400: #5a5a5a;
    --gray-600: #a0a0a0; /* Used for some text, ensure it's light enough */
    --gray-700: #c0c0c0; /* Used for some text, ensure it's light enough */

    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); /* More subtle shadow for dark */
}

/* System Theme - applies dark variables when OS is dark */
@media (prefers-color-scheme: dark) {
  body.system-theme {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg-color: #1e1e1e;
    --input-bg-color: #2a2a2a;
    --input-border-color: #444444;
    --header-bg-color: #1e1e1e;
    --modal-bg-color: #252525;
    --text-muted-color: #a0a0a0;
    --primary-color: #6c8cff;
    --primary-light: #8fa9ff;
    --primary-dark: #4a6def;
    --gray-100: #2b2b2b;
    --gray-200: #3a3a3a;
    --gray-300: #4a4a4a;
    --gray-400: #5a5a5a;
    --gray-600: #a0a0a0;
    --gray-700: #c0c0c0;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  }
}
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
    body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color); /* Use theme variable */
    background-color: var(--bg-color); /* Use theme variable */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth theme transition */
  }
  
  /* Utility Classes */
  .hidden {
    display: none !important;
  }
  
  /* Layout */
  .app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--header-bg-color); /* Use theme variable */
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-right: 2rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
  }
  
  .logo:hover {
    color: var(--primary-dark);
    transform: scale(1.05);
  }
  
  .logo i {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
  }
  
  .logo h1 {
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Fredoka', cursive;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-3px);
    }
    60% {
      transform: translateY(-2px);
    }
  }

  .burger-menu-btn {
    display: none; /* Hidden by default, shown in media queries */
    background: none;
    border: none;
    color: var(--gray-700);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above other header elements */
  }
  
  .main-nav {
    display: flex;
    gap: 1rem;
    position: relative; /* Added previously, ensure it's still relevant */
  }
  
  .nav-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius);
  }
  
  .nav-btn:hover {
    color: var(--primary-color);
    background-color: var(--gray-200); /* Adjusted for theme */
  }
  
  .nav-btn.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: rgba(var(--primary-rgb, 67, 97, 238), 0.1); /* Added fallback and placeholder for RGB var */
  }
  
  .notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--gray-600);
    transition: var(--transition);
  }
  
  .notification-bell:hover {
    color: var(--primary-color);
  }
  
  .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }
  
  /* =========================
     HEADER MOBILE REDESIGN
     ========================= */
  
  .header {
    padding: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--box-shadow);
  }
  
  .logo h1 {
    font-size: 1.2rem;
    font-family: 'Fredoka', cursive;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .logo i {
    font-size: 1.3rem;
    animation: bounce 2s infinite;
  }
  
  /* Afficher le burger menu */
  .burger-menu-btn {
    display: block !important;
    order: 2;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    touch-action: manipulation;
  }
  
  .burger-menu-btn:active {
    background-color: var(--gray-200);
    transform: scale(0.95);
  }
  
  /* Masquer la navigation principale par défaut */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--header-bg-color);
    border-top: 1px solid var(--gray-300);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  
  /* Afficher la navigation quand active */
  .main-nav.active {
    display: flex;
  }
  
  .nav-btn {
    width: 100%;
    text-align: left;
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    background-color: transparent;
    border: none;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .nav-btn:last-child {
    margin-bottom: 0;
  }
  
  .nav-btn:active {
    background-color: var(--gray-200);
    transform: scale(0.98);
  }
  
  .nav-btn.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
  }
  
  /* Section utilisateur responsive */
  .user-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    order: 1;
    margin-left: auto;
  }
  
  .user-btn {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-height: 40px;
    transition: all 0.2s ease;
    touch-action: manipulation;
  }
  
  .user-btn:active {
    background-color: var(--gray-200);
    transform: scale(0.98);
  }
  
  .user-dropdown {
    min-width: 160px;
    top: 110%;
    right: 0;
  }
  
  .notification-bell {
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--text-muted-color);
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .notification-bell:active {
    background-color: var(--gray-200);
    transform: scale(0.95);
  }
  
  .main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }
  
  /* Views */
  .view {
    display: none;
  }
  
  .view.active {
    display: block;
  }
  
  /* Dashboard */
  .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
  }
  
  .upcoming-birthdays {
    background-color: var(--card-bg-color); /* Use theme variable */
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
  }
  
  .upcoming-birthdays h3 {
    margin-bottom: 1rem;
    color: var(--text-color); /* Use theme variable */
  }
  
  .birthdays-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
  }
  
  .birthday-card {
    background-color: var(--gray-100); 
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    color: var(--text-color); /* Ensure text color contrasts with new bg */
  }
  
  .birthday-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
  }
  
  .birthday-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .birthday-card-name {
    font-weight: 600;
    color: var(--text-color); /* Use theme variable */
  }
  
  .birthday-card-date {
    color: var(--text-muted-color); /* Use theme variable */
    font-size: 0.9rem;
  }
  
  .birthday-card-group {
    display: inline-block;
    background-color: rgba(var(--primary-rgb, 108, 140, 255), 0.15); /* Adjusted for dark theme primary */
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
  }
  
  .birthday-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  
  /* Calendar */
  .calendar-section {
    background-color: var(--card-bg-color); /* Use theme variable */
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
  }
  
  .calendar-section h3 {
    margin-bottom: 1rem;
    color: var(--text-color); /* Use theme variable */
  }
  
  .calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
  }
  
  .calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--text-muted-color); /* Use theme variable */
    padding: 0.5rem;
  }
  
  .calendar-day {
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    background-color: var(--gray-100); 
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color); /* Ensure text color contrasts */
  }
  
  .calendar-day:hover {
    background-color: var(--gray-200); 
  }
  
  .calendar-day.today {
    background-color: rgba(var(--primary-rgb, 108, 140, 255), 0.2); /* Adjusted for dark theme primary */
    border: 1px solid var(--primary-color);
    color: var(--primary-color); /* Make date number stand out */
  }
  
  .calendar-day.has-birthday {
    position: relative;
  }
  
  .calendar-day.has-birthday::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-color);
  }
  
  .calendar-day-number {
    font-weight: 600;
  }
  
  .calendar-day.other-month {
    color: var(--text-muted-color); 
    background-color: transparent; /* Make it less prominent */
    opacity: 0.6;
  }
  
  /* Groups */
  .groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
  }
  
  .groups-grid { /* Changed from .groups-list to .groups-grid to match HTML */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem; /* Adjusted gap */
  }
  
  /* New Group Item Card Styles */
  .group-item-card {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: var(--transition);
    border-left: 5px solid var(--group-color, var(--primary-color)); /* Dynamic border color */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes footer to the bottom */
    min-height: 180px; /* Ensure cards have a minimum height */
  }
  
  .group-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  }
  
  .group-item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align items to the top */
    margin-bottom: 1rem;
  }
  
  .group-item-card-name {
    font-weight: 600;
    font-size: 1.25rem; /* Slightly larger name */
    color: var(--text-color);
    margin-right: 0.5rem; /* Space between name and count */
  }
  
  .group-item-card-count {
    background-color: var(--gray-200);
    color: var(--text-muted-color);
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    display: inline-flex; /* To align icon and text */
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap; /* Prevent wrapping */
  }
  
  .group-item-card-description {
    color: var(--text-muted-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex-grow: 1; /* Allows description to take available space */
    line-height: 1.4;
  }
  
  .group-item-card-description em {
    color: var(--gray-500);
  }
  
  .group-item-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pushes footer to the bottom */
    padding-top: 1rem; /* Space above footer */
    border-top: 1px solid var(--gray-200); /* Subtle separator */
  }
  
  .group-item-card-next {
    font-size: 0.85rem;
    color: var(--text-muted-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  
  .group-item-card .view-group-btn {
    color: var(--primary-color);
    padding: 0.4rem;
  }
  
  .group-item-card .view-group-btn:hover {
    background-color: rgba(var(--primary-rgb, 67, 97, 238), 0.1);
  }
  
  /* Ensure the old .group-card styles are removed or updated if they conflict */
  
  /* Connection Status */
  .connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--gray-100); 
    border-radius: var(--border-radius);
    color: var(--text-color); /* Ensure text color contrasts */
  }
  
  .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
  }
  
  .status-indicator.online {
    background-color: #4caf50;
  }
  
  .status-indicator.offline {
    background-color: var(--danger-color);
  }
  
  .status-text {
    font-size: 0.9rem;
  }
  
  /* Switch */
  .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
  }
  
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-400); /* Themed switch background */
    transition: var(--transition);
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
  }
  
  input:checked + .slider {
    background-color: var(--primary-color);
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
  }
  
  input:checked + .slider:before {
    transform: translateX(26px);
  }
  
  .slider.round {
    border-radius: 24px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }
  
  /* Modals */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--modal-bg-color); /* Use theme variable */
    /* padding: 2rem; */
    border-radius: var(--border-radius);
    width: 90%;
    z-index: 1001;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-300); /* Themed border */
  }
  
  .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid var(--gray-300); /* Themed border */
  }
  
  .notification-modal {
    max-width: 400px;
  }
  
  .notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .notification-item {
    padding: 1rem;
    background-color: var(--gray-100); /* Themed notification item */
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    color: var(--text-color); /* Ensure text color contrasts */
  }
  
  .notification-item.unread {
    background-color: rgba(var(--primary-rgb, 108, 140, 255), 0.1); /* Adjusted for dark theme primary */
  }
  
  .notification-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  
  .notification-message {
    font-size: 0.9rem;
    color: var(--text-muted-color); /* Use themed muted text */
  }
  
  .notification-time {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    text-align: right;
  }
  
  .confirm-modal {
    max-width: 400px;
  }
  
  /* Forms */
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color); /* Use theme variable */
  }
  
  .text-input, .select-input, .color-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--input-border-color); /* Use theme variable */
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--input-bg-color); /* Use theme variable */
    color: var(--text-color); /* Use theme variable */
    transition: var(--transition);
  }
  
  .text-input:focus, .select-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 108, 140, 255), 0.2); /* Adjusted for dark theme primary */
  }
  
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .primary-btn {
    background-color: var(--primary-color);
    color: white;
  }
  
  .primary-btn:hover {
    background-color: var(--primary-dark);
  }
  
  .secondary-btn {
    background-color: var(--gray-300); /* Darker secondary button */
    color: var(--text-color); /* Ensure text is readable */
  }
  
  .secondary-btn:hover {
    background-color: var(--gray-400); /* Darker hover for secondary */
  }
  
  .danger-btn {
    background-color: var(--danger-color);
    color: white;
  }
  
  .danger-btn:hover {
    background-color: #d32f2f;
  }
  
  .icon-btn {
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted-color); /* Use themed muted text for icons */
    cursor: pointer;
    transition: var(--transition);
  }
  
  .icon-btn:hover {
    color: var(--primary-color);
  }
  
  /* Bouton états spéciaux pour notifications */
  .btn-success {
    background-color: #22c55e;
    color: white;
  }
  
  .btn-success:hover {
    background-color: #16a34a;
  }
  
  .btn-danger {
    background-color: var(--danger-color);
    color: white;
  }
  
  .btn-danger:hover {
    background-color: #dc2626;
  }
  
  .btn-warning {
    background-color: var(--warning-color);
    color: white;
  }
  
  .btn-warning:hover {
    background-color: #d97706;
  }
  
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .btn:disabled:hover {
    background-color: inherit;
  }
  
  /* Styles pour les boutons de notification dans les paramètres */
  .notification-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
  
  .notification-buttons .btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
  
  .setting-note {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    font-style: italic;
  }
  
  .setting-note i {
    margin-right: 0.25rem;
    color: var(--primary-color);
  }
  
  /* Authentication Modal */
.auth-modal {
  position: fixed !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.5);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  transition: opacity 0.3s ease !important;
}

.auth-modal.hidden {
  display: none !important;
}

.auth-modal.fade-out {
  opacity: 0 !important;
}

.auth-container {
  position: relative; /* For positioning the close button */
  background: var(--card-bg-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--box-shadow);
  animation: slideIn 0.3s ease;
  color: var(--text-color); /* Ensure auth container text is themed */
}

.auth-container .close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.auth-container .close-modal-btn:hover {
    color: var(--primary-dark);
    background-color: transparent; /* Ensure no background on hover */
}

/* Styles pour le bouton de fermeture de la modale d'authentification */
.auth-container .close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.auth-container .close-modal-btn:hover {
    color: var(--primary-dark);
    background-color: transparent; /* Ensure no background on hover */
}

/* Hero Section */
#hero-section {
  display: none; /* Caché par défaut */
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--bg-color) 0%, #e9ecef 100%);
}

body.dark-theme #hero-section {
    background: linear-gradient(135deg, var(--bg-color) 0%, #1a1a1a 100%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text {
  animation: slideInFromLeft 1s ease-out;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted-color);
  margin-bottom: 2rem;
  max-width: 500px;
}

#hero-cta-btn {
  padding: 0.8rem 1.8rem;
  font-size: 1.1rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
  transition: all 0.3s ease;
}

#hero-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.hero-image {
  animation: slideInFromRight 1s ease-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text {
    order: 2;
  }
  .hero-image {
    order: 1;
    margin-bottom: 2rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-muted-color); /* Use theme variable */
  font-size: 0.9rem;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color); /* Use theme variable */
}

/* Red asterisk for required fields */
.form-group label.required::after {
  content: ' *';
  color: var(--danger-color);
  margin-left: 2px;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--input-border-color); /* Use theme variable */
  border-radius: var(--border-radius);
  font-size: 1rem;
  background-color: var(--input-bg-color); /* Use theme variable */
  color: var(--text-color); /* Use theme variable */
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 108, 140, 255), 0.2); /* Adjusted for dark theme primary */
}

.full-width {
  width: 100%;
}

.auth-switch {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-switch p {
  color: var(--text-muted-color); /* Use theme variable */
  margin-bottom: 0.5rem;
}

.forgot-password-link {
  text-align: center;
  margin-top: 1rem;
}

.forgot-password-link .link-btn {
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.success-icon {
  margin-bottom: 1rem;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--gray-600);
}

.text-muted.small {
  font-size: 0.875rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

/* --- Landing Feature Sections --- */
.features {
  margin-top: 2rem;
  display: grid;
  gap: 2rem;
}

.feature-section {
  background: var(--card-bg-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.feature-section::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient( circle at center, rgba(67,97,238,0.12), transparent 60% );
  pointer-events: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.feature-section.reverse .feature-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.feature-content h3 {
  margin: 0.25rem 0 0.75rem;
  font-size: 1.75rem;
}

.feature-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(67,97,238,0.12);
  color: var(--primary-color);
  font-weight: 600;
  letter-spacing: .3px;
}

.feature-bullets {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
  display: grid;
  gap: .5rem;
}
.feature-bullets li { color: var(--text-color); }
.feature-bullets i { color: var(--primary-color); margin-right: .5rem; }

.feature-image { position: relative; }
.feature-image img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.15));
  transform: translateZ(0);
}

.feature-actions { margin-top: .75rem; }

/* Scroll-in animation */
.feature-section { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.feature-section.in-view { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-section.reverse .feature-grid { grid-template-columns: 1fr; }
}

.mt-3 {
  margin-top: 1rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  font-size: 1rem;
}

.link-btn:hover {
  color: var(--primary-dark);
}

.error-message {
  background: rgba(var(--danger-rgb, 230, 57, 70), 0.1); /* Placeholder for danger RGB */
  color: var(--danger-color);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  border: 1px solid rgba(var(--danger-rgb, 230, 57, 70), 0.2); /* Placeholder for danger RGB */
}

/* Add these if you don't have them, for rgba() theming */
:root {
  /* ... existing root variables ... */
  --primary-rgb: 67, 97, 238; /* Default light theme primary RGB */
  --danger-rgb: 230, 57, 70;  /* Default light theme danger RGB */
}

body.dark-theme {
  /* ... existing dark theme variables ... */
  --primary-rgb: 108, 140, 255; /* Dark theme primary RGB */
  --danger-rgb: 255, 100, 110; /* Example: Brighter danger for dark theme */
}

@media (prefers-color-scheme: dark) {
  body.system-theme {
    /* ... existing system theme variables ... */
    --primary-rgb: 108, 140, 255;
    --danger-rgb: 255, 100, 110;
  }
}

/* Ensure calendar day numbers are clearly visible in dark mode */
body.dark-theme .calendar-day-number {
    color: var(--text-color);
}

body.dark-theme .calendar-day.today .calendar-day-number {
    color: var(--primary-color); /* Make today's number match primary color */
}

/* Ensure burger menu is visible in dark mode */
body.dark-theme .burger-menu-btn {
    color: var(--text-muted-color);
}

/* Adjust active nav button for dark theme if needed */
body.dark-theme .nav-btn.active {
    background-color: rgba(var(--primary-rgb), 0.2); /* Ensure primary-rgb is set for dark */
}

/* Adjust secondary button text color for dark theme explicitly */
body.dark-theme .secondary-btn {
    color: var(--text-color);
}
body.dark-theme .secondary-btn:hover {
    background-color: var(--gray-400);
    color: var(--text-color); /* Keep text color consistent on hover */
}

/* Adjust join form input text color for dark theme */
body.dark-theme .join-form input.text-input {
    color: var(--text-color);
    background-color: var(--input-bg-color);
    border-color: var(--input-border-color);
}

/* Adjust access code display in dark mode */
body.dark-theme .access-code-display {
    background-color: var(--gray-200);
    color: var(--text-color);
    border: 1px solid var(--gray-300);
}
body.dark-theme .access-code-display .access-code-label {
    color: var(--text-muted-color);
}


/* Adjust profile view text colors */
body.dark-theme #profile-view .profile-sidebar h3,
body.dark-theme #profile-view .profile-sidebar p {
    color: var(--text-color);
}

body.dark-theme #profile-view .profile-content h3,
body.dark-theme #profile-view .profile-content label {
    color: var(--text-color);
}

body.dark-theme #profile-view .tab-link {
    color: var(--text-muted-color);
}
body.dark-theme #profile-view .tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Ensure empty state icons and text are visible */
body.dark-theme .empty-state i {
    color: var(--text-muted-color);
}
body.dark-theme .empty-state p {
    color: var(--text-color);
}


.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--header-bg-color); /* Use theme variable for consistency */
  border: 1px solid var(--input-border-color); /* Use theme variable */
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-color); /* Ensure text is visible */
}

.user-btn:hover {
  border-color: var(--primary-color);
  background: var(--bg-color); /* Use theme variable for consistency */
}

.user-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 180px;
  background: var(--card-bg-color);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 1100;
  border: 1px solid var(--input-border-color);
  padding: 0.5rem 0;
  animation: fadeInDropdown 0.18s;
}

@keyframes fadeInDropdown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown.hidden {
  display: none;
}

.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  padding: 0.7rem 1.2rem;
  color: var(--text-color);
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--gray-200);
  color: var(--primary-color);
}

.user-dropdown .divider {
  height: 1px;
  background: var(--input-border-color);
  margin: 0.4rem 0;
}

.user-dropdown .dropdown-header {
  font-weight: 600;
  color: var(--primary-color);
  padding: 0.5rem 1.2rem 0.2rem 1.2rem;
  font-size: 0.95rem;
}

/* Dark theme specific adjustments for user dropdown */
body.dark-theme .user-dropdown {
    background: var(--card-bg-color);
    border-color: var(--input-border-color);
}

body.dark-theme .dropdown-item {
    color: var(--text-color);
}

body.dark-theme .dropdown-item:hover {
    background-color: var(--gray-200);
    color: var(--primary-color);
}

body.dark-theme .user-btn {
    background: var(--header-bg-color);
    border-color: var(--input-border-color);
    color: var(--text-color);
}

body.dark-theme .user-btn:hover {
    border-color: var(--primary-color);
    background: var(--gray-200);
}

body.dark-theme .notification-bell {
    color: var(--text-muted-color);
}

body.dark-theme .notification-bell:hover {
    color: var(--primary-color);
}

/* System theme for dropdown */
@media (prefers-color-scheme: dark) {
  body.system-theme .user-dropdown {
    background: var(--card-bg-color);
    border-color: var(--input-border-color);
  }

  body.system-theme .dropdown-item {
    color: var(--text-color);
  }

  body.system-theme .dropdown-item:hover {
    background-color: var(--gray-200);
    color: var(--primary-color);
  }

  body.system-theme .user-btn {
    background: var(--header-bg-color);
    border-color: var(--input-border-color);
    color: var(--text-color);
  }

  body.system-theme .user-btn:hover {
    border-color: var(--primary-color);
    background: var(--gray-200);
  }

  body.system-theme .notification-bell {
    color: var(--text-muted-color);
  }

  body.system-theme .notification-bell:hover {
    color: var(--primary-color);
  }
}

/* User section styling */
.user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.user-btn {
  color: var(--text-color); /* Ensure text is visible */
}

.user-btn span {
  color: var(--text-color); /* Ensure username is visible */
}

.user-btn i {
  color: var(--text-muted-color); /* Icons slightly muted */
}

/* Profile View Styling */
.profile-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.profile-sidebar {
  background-color: var(--card-bg-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  text-align: center;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.profile-avatar {
  position: relative;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.profile-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  transition: var(--transition);
}

.profile-avatar img:hover {
  transform: scale(1.05);
}

#change-avatar-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

#change-avatar-btn:hover {
  background-color: var(--primary-dark);
  transform: scale(1.1);
}

#profile-username-display {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

#profile-email-display {
  color: var(--text-muted-color);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-300);
}

.profile-stat {
  text-align: center;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.profile-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-content {
  background-color: var(--card-bg-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-300);
  background-color: var(--gray-100);
}

.tab-link {
  flex: 1;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  color: var(--text-muted-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-bottom: 3px solid transparent;
}

.tab-link:hover {
  background-color: var(--gray-200);
  color: var(--text-color);
}

.tab-link.active {
  background-color: var(--card-bg-color);
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
  padding: 2rem;
}

.tab-content.active {
  display: block;
}

.tab-content h3 {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  font-size: 1.3rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.profile-form-section {
  margin-bottom: 2rem;
}

.profile-form-section:last-child {
  margin-bottom: 0;
}

.profile-form-section h4 {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-form-section h4 i {
  color: var(--primary-color);
  font-size: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--gray-100);
  border-radius: var(--border-radius);
  border: 1px solid var(--input-border-color);
  transition: var(--transition);
}

.form-group-checkbox:hover {
  background-color: var(--gray-200);
}

.form-group-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.form-group-checkbox label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-color);
}

.password-strength {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  text-align: center;
  font-weight: 500;
}

.password-strength-meter {
  height: 5px;
  background-color: #e0e0e0;
  border-radius: 5px;
  margin-top: 5px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  background-color: #f44336; /* Rouge par défaut */
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-requirements {
  font-size: 0.8rem;
  color: #666;
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.requirement {
  display: flex;
  align-items: center;
}

.requirement i {
  margin-right: 5px;
  color: #f44336; /* Rouge par défaut */
  transition: color 0.3s ease;
}

.requirement.valid i {
  color: #4caf50; /* Vert si valide */
}

.requirement.valid {
  color: #333;
}
  .group-details-container {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
  }
  
  .group-details-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
  }
  
  .group-details-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    pointer-events: none;
  }
  
  .group-details-header #group-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.5px;
  }
  
  .group-details-header .group-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .group-details-header .btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
  }
  
  .group-details-header .btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  .group-details-header .btn.danger-btn:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
  }
  
  /* Enhanced Access Code Display */
  .access-code-display {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border: 2px solid var(--gray-300);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .access-code-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
  }
  
  .access-code-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
  }
  
  .access-code-display .access-code-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
  }
  
  .access-code-display .access-code-value {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
  }
  
  .access-code-display .copy-access-code {
    background: var(--card-bg-color);
    border: 2px solid var(--gray-300);
    color: var(--primary-color);
    padding: 0.75rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: auto;
  }
  
  .access-code-display .copy-access-code:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
  }
  
  /* Enhanced Group Members Section */
  .group-members {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-200);
  }
  
  .group-members h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .group-members h3::before {
    content: '👥';
    font-size: 1.2rem;
  }
  
  .members-list {
    display: grid;
    gap: 1rem;
  }
  
  .member-item {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
  }
  
  .member-item:hover {
    background: var(--gray-200);
    transform: translateX(5px);
  }
  
  .member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
  }
  
  .member-info {
    flex: 1;
  }
  
  .member-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
  }
  
  .member-role {
    color: var(--text-muted-color);
    font-size: 0.9rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
  }
  
  /* Enhanced Group Birthdays Section */
  .group-birthdays {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-200);
  }
  
  .group-birthdays-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
  }
  
  .group-birthdays h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .group-birthdays h3::before {
    content: '🎂';
    font-size: 1.2rem;
  }
  
  .group-birthdays .btn.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
  }
  
  .group-birthdays .btn.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
  }
  
  /* Back button enhancement */
  #back-to-groups {
    background: var(--card-bg-color);
    border: 2px solid var(--gray-300);
    color: var(--primary-color);
    padding: 0.75rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
  }
  
  #back-to-groups:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
  }
.password-strength.weak {
  background-color: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.password-strength.medium {
  background-color: rgba(255, 152, 0, 0.1);
  color: #ff9800;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.password-strength.strong {
  background-color: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.profile-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-300);
  margin-top: 2rem;
}

/* Security section specific styling */
.security-notice {
  background-color: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.security-notice i {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-top: 0.1rem;
}

.security-notice-content h5 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.security-notice-content p {
  color: var(--text-color);
  font-size: 0.9rem;
  margin: 0;
}

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  pointer-events: none;
  transition: all 0.3s ease;
}
 
/* Base toast styles */
.toast {
  background: var(--card-bg-color);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-left: 4px solid;
  min-width: 300px;
  max-width: 400px;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.hide {
  opacity: 0;
  transform: translateX(100%);
  margin-bottom: -60px;
}

/* Toast types */
.toast-success {
  border-left-color: var(--success-color);
  background:  rgb(39, 172, 61);
}

.toast-error {
  border-left-color: var(--danger-color);
  background:  rgba(230, 57, 70, 1);
}

.toast-warning {
  border-left-color: var(--warning-color);
  background: rgba(248, 150, 30, 1);
}

.toast-info {
  border-left-color: var(--primary-color);
  background:  rgba(67, 97, 238, 1);
}

/* Toast icon */
.toast-icon {
  font-size: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: var(--success-color);
}

.toast-error .toast-icon {
  color: var(--danger-color);
}

.toast-warning .toast-icon {
  color: var(--warning-color);
}

.toast-info .toast-icon {
  color: var(--primary-color);
}

/* Toast content */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.toast-message {
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Toast close button */
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted-color);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.2s ease;
  margin-left: 8px;
  flex-shrink: 0;
  opacity: 0.7;
}

.toast-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
  color: var(--text-color);
}

/* Toast progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, currentColor, currentColor);
  opacity: 0.8;
  transition: width 0ms linear;
}

.toast-success .toast-progress {
  color: var(--success-color);
}

.toast-error .toast-progress {
  color: var(--danger-color);
}

.toast-warning .toast-progress {
  color: var(--warning-color);
}

.toast-info .toast-progress {
  color: var(--primary-color);
}


/* ========================================
   COMPLETE RESPONSIVE REDESIGN - MOBILE FIRST
   ======================================== */

/* ===== COMPACT MOBILE STYLES (max-width: 480px) ===== */
@media screen and (max-width: 480px) {
  .main-content {
    padding: 0.5rem;
  }
  
  .header {
    padding: 0.75rem 1rem;
  }
  
  .logo h1 {
    font-size: 1rem;
    font-family: 'Fredoka', cursive;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .logo i {
    font-size: 1.1rem;
    animation: bounce 2s infinite;
  }
  
  .user-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .notification-bell {
    font-size: 1rem;
    min-width: 36px;
    min-height: 36px;
  }
  
  /* Dashboard compact */
  .dashboard-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  
  .dashboard-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0;
  }
  
  .dashboard-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: inherit;
  }
  
  .dashboard-actions .btn {
    width: 100%;
    max-width: 260px;
    padding: 0.875rem;
    font-size: 0.9rem;
  }
  
  .upcoming-birthdays,
  .calendar-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .calendar-day {
    min-height: 30px;
    font-size: 0.75rem;
    padding: 0.25rem;
  }
  
  .calendar-controls button {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  /* Profile compact */
  .profile-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .profile-sidebar,
  .profile-content {
    padding: 1rem;
  }
  
  .profile-avatar img {
    width: 60px;
    height: 60px;
  }
  
  #change-avatar-btn {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
  }
  
  .tab-link {
    padding: 0.6rem 0.4rem;
    font-size: 0.75rem;
    min-width: 70px;
  }
  
  .profile-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  
  /* Groups compact */
  .groups-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .group-item-card {
    padding: 1rem;
    min-height: 140px;
  }
  
  .group-item-card-name {
    font-size: 1rem;
  }
  
  .group-details-container {
    padding: 1rem;
  }
}

/* ===== MOBILE & TABLETS STYLES (max-width: 768px) ===== */
@media screen and (max-width: 768px) {
  /* Header and Navigation Mobile */
  .header {
    padding: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  .logo {
    order: 1;
    margin-right: auto;
  }
  
  .logo h1 {
    font-size: 1.2rem;
    font-family: 'Fredoka', cursive;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .burger-menu-btn {
    display: block !important;
    order: 3;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-width: 48px;
    min-height: 48px;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  
  .burger-menu-btn:active {
    background-color: var(--gray-200);
    transform: scale(0.95);
  }
    /* Hide main navigation by default on mobile */
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }
  
  .main-nav.active {
    display: flex;
  }
  
  .main-nav > div {
    background-color: var(--header-bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--input-border-color);
  }
  
  .nav-btn {
    width: 100%;
    text-align: left;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    background-color: transparent;
    border: none;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .nav-btn:last-child {
    margin-bottom: 0;
  }
  
  .nav-btn:active {
    background-color: var(--gray-200);
    transform: scale(0.98);
  }
  
  .nav-btn.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
  }
  
  /* User section mobile */
  .user-section {
    order: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    margin-right: 1rem;
  }
  
  .user-btn {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-height: 40px;
    transition: all 0.2s ease;
    touch-action: manipulation;
  }
  
  .user-btn:active {
    background-color: var(--gray-200);
    transform: scale(0.98);
  }
  
  .user-dropdown {
    min-width: 160px;
    top: 110%;
    right: 0;
  }
  
  .notification-bell {
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--text-muted-color);
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .notification-bell:active {
    background-color: var(--gray-200);
    transform: scale(0.95);
  }
  
  /* Main content mobile */
  .main-content {
    padding: 1rem;
  }
  
  /* Dashboard Mobile */
  .dashboard-header {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .dashboard-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0;
  }
  
  .dashboard-actions {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .dashboard-actions .btn {
    width: 100%;
    max-width: 300px;
    padding: 1rem;
    font-size: 1rem;
    min-height: 48px;
  }
  
  /* Cards mobile */
  .upcoming-birthdays,
  .calendar-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .birthdays-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .birthday-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  /* Calendar Mobile */
  .calendar-controls {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
  }
  
  .calendar-controls button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
  }
  
  .calendar-controls button:active {
    transform: scale(0.95);
    background-color: var(--primary-dark);
  }
  
  .calendar-controls h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
  }
  
  .calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background-color: var(--gray-200);
    border-radius: var(--border-radius);
    padding: 2px;
  }
  
  .calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--text-muted-color);
    padding: 0.75rem 0.25rem;
    font-size: 0.8rem;
    background-color: var(--card-bg-color);
  }
  
  .calendar-day {
    aspect-ratio: 1;
    border-radius: 4px;
    background-color: var(--card-bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
    font-size: 0.85rem;
    min-height: 40px;
    touch-action: manipulation;
  }
  
  .calendar-day:active {
    transform: scale(0.95);
    background-color: var(--gray-200);
  }
  
  .calendar-day.today {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
  }
  
  .calendar-day.has-birthday {
    position: relative;
    background-color: rgba(var(--accent-rgb, 247, 37, 133), 0.1);
    border: 1px solid var(--accent-color);
  }
  
  .calendar-day.has-birthday::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--accent-color);
  }
  
  .calendar-day.other-month {
    color: var(--text-muted-color);
    background-color: var(--gray-100);
    opacity: 0.6;
  }
  
  /* Profile Mobile */
  .profile-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: none;
  }
  
  .profile-sidebar {
    position: static;
    text-align: center;
    padding: 2rem;
  }
  
  .profile-avatar img {
    width: 80px;
    height: 80px;
  }
  
  #change-avatar-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .profile-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-300);
  }
  
  .profile-stat {
    text-align: center;
    flex: 1;
  }
  
  .profile-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .profile-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .tab-link {
    padding: 1rem;
    font-size: 0.9rem;
    min-width: 100px;
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0;
  }
  
  .profile-form {
    padding: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
    .text-input{
       margin-bottom: 1rem;
    }
  .text-input,
  .select-input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.875rem;
    min-height: 48px;

  }
  
  /* Groups Mobile */
  .groups-header {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .groups-header h2 {
    margin-bottom: 0;
  }
  
  .groups-header .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .groups-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .group-item-card {
    padding: 1.5rem;
    min-height: 160px;
  }
  
  .group-item-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .group-item-card-name {
    font-size: 1.2rem;
    margin-right: 0;
  }
  
  .join-group-section {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .join-group-section h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
  }
  
  .join-group-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .join-group-form input {
    padding: 0.875rem;
    font-size: 16px;
    border: 2px solid var(--input-border-color);
    border-radius: var(--border-radius);
    background-color: var(--input-bg-color);
    color: var(--text-color);
    min-height: 48px;
    text-align: center;
    letter-spacing: 1px;
  }
  
  .join-group-form button {
    padding: 1rem;
    font-size: 1rem;
    min-height: 48px;
  }
  
  /* Group Details Mobile */
  .group-details-container {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
  }
  
  .group-details-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
  }
  
  .group-details-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    pointer-events: none;
  }
  
  .group-details-header #group-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.5px;
  }
  
  .group-details-header .group-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .group-details-header .btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
  }
  
  .group-details-header .btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  .group-details-header .btn.danger-btn:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
  }
  
  /* Enhanced Access Code Display */
  .access-code-display {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border: 2px solid var(--gray-300);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .access-code-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
  }
  
  .access-code-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
  }
  
  .access-code-display .access-code-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
  }
  
  .access-code-display .access-code-value {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
  }
  
  .access-code-display .copy-access-code {
    background: var(--card-bg-color);
    border: 2px solid var(--gray-300);
    color: var(--primary-color);
    padding: 0.75rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: auto;
  }
  
  .access-code-display .copy-access-code:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
  }
  
  /* Enhanced Group Members Section */
  .group-members {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-200);
  }
  
  .group-members h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .group-members h3::before {
    content: '👥';
    font-size: 1.2rem;
  }
  
  .members-list {
    display: grid;
    gap: 1rem;
  }
  
  .member-item {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
  }
  
  .member-item:hover {
    background: var(--gray-200);
    transform: translateX(5px);
  }
  
  .member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
  }
  
  .member-info {
    flex: 1;
  }
  
  .member-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
  }
  
  .member-role {
    color: var(--text-muted-color);
    font-size: 0.9rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
  }
  
  /* Enhanced Group Birthdays Section */
  .group-birthdays {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-200);
  }
  
  .group-birthdays-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-direction: column;
  }
  
  .group-birthdays h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .group-birthdays h3::before {
    content: '🎂';
    font-size: 1.2rem;
  }
  
  .group-birthdays .btn.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
  }
  
  .group-birthdays .btn.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
  }
  
  /* Back button enhancement */
  #back-to-groups {
    background: var(--card-bg-color);
    border: 2px solid var(--gray-300);
    color: var(--primary-color);
    padding: 0.75rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
  }
  
  #back-to-groups:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
  }
  
}
  
/* --- Site Footer --- */
.site-footer {
  background: var(--header-bg-color);
  /* border-top removed per request to hide line at the end */
  margin-top: 2rem;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.footer-brand {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-nav {
  display: flex;
  gap: 1rem;
}
.footer-nav a {
  color: var(--text-muted-color);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-nav a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted-color);
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Privacy Policy Page --- */
.policy-hero {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-rgb), 0.02));
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
}
.policy-hero h1 {
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.policy-hero p {
  color: var(--text-muted-color);
}
.policy-container {
  background: var(--card-bg-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}
.policy-section {
  margin-bottom: 1.25rem;
}
.policy-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.policy-section p,
.policy-section li {
  color: var(--text-color);
}
.policy-section ul {
  margin-left: 1.25rem;
  list-style: disc;
}
.policy-meta {
  font-size: 0.9rem;
  color: var(--text-muted-color);
  margin-bottom: 1rem;
}