@import url('https://fonts.googleapis.com/css2?family=Jersey+10&display=swap');

:root {
  --base-font-size: 18px; /* global text size */
}

html { font-size: var(--base-font-size); }
/* Hide scrollbars but keep wheel/trackpad scrolling */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; }

.disable-transitions body,
body {
  margin: 0;
  font-family: 'Jersey 10', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: #b3e5fc;
  height: 100vh;
  overflow: hidden; /* Lock the body from scrolling */
  display: flex;
  align-items: center;
  justify-content: center;
  /* Page transitions removed for accessibility */
}

/* Force new default font across common UI elements */
:where(button, input, select, textarea, .nav-btn, .tab-btn, .action-btn, .type-filter, .skeu-container, .projects-grid, .users-grid, .mobile-toolbar .mt-btn, h1, h2, h3, h4, h5, h6, p, span, a) {
  font-family: 'Jersey 10', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
}

.background-clouds {
  display: block;
  position: fixed;
  top: -5vh;
  left: -5vw;
  width: 110vw;
  height: 110vh;
  z-index: 0;
  background: url('Sky.png') center center / cover no-repeat;
  pointer-events: none;
}

.sidebar {
  width: 400px;
  background: url('Sidebar.png') center center / 100% 100% no-repeat;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  height: 88vh;
}

/* --- Skeuomorphic Text Box Styles --- */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
textarea {
    background: #bababa; /* Fallback for old browsers */
    background: linear-gradient(to bottom, #dcdcdc, #f5f5f5);
    border: 1px solid #a0a0a0;
    border-radius: 8px;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2), 
                inset -2px -2px 5px rgba(255, 255, 255, 0.7);
    padding: 12px 15px;
    font-family: 'Jersey 10', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 1rem; /* scales with html size */
    color: #333;
    /* transition removed for accessibility */
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: #888;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.25), 
                inset -3px -3px 6px rgba(255, 255, 255, 0.6),
                0 0 5px rgba(0, 123, 255, 0.5); /* Subtle glow on focus */
}

/* --- General Layout --- */
.layout-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 1800px;
  width: 90vw;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.container {
  margin: 20px;
  flex-grow: 1;
  padding: 20px;
  background: url('Page.png') center center / 100% 100% no-repeat;
  border: none;
  height: 90vh;
  display: flex;
  overflow-y: auto; /* still scrollable but hidden scrollbar */
}

.main-content {
  flex: 1;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-y: auto; /* Allow this specific area to scroll */
}

.logo {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}
.logo-img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}
.logo-text-img {
  height: 50px;
  width: auto;
}

.nav-buttons {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-auth-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 10;
}

.nav-auth-buttons > * {
  flex-grow: 1; /* This is the fix */
}

/* (removed unused .nav-auth-buttons .nav-btn override) */

.nav-btn {
  width: 100%;
  padding: 12px 0; /* Homepage-style compact padding */
  font-size: 1rem; /* Homepage-style font size */
  font-family: 'Baloo 2', cursive;
  border: none;
  border-radius: 8px;
  background: url('GreyButton.png') center center / 100% 100% no-repeat;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  /* transition removed for accessibility */
  outline: none;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

/* All pages now use the same compact button style */

.nav-btn.active, .nav-btn:hover {
  background: url('GreenButton.png') center center / 100% 100% no-repeat;
  color: #fff;
  border: none;
  transform: scale(1.05);
}

/* Notification Badge */
#notifications-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.notification-badge {
  background: linear-gradient(145deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Responsive adjustments for smaller screens */
@media (max-height: 800px) {
  .nav-btn {
    padding: 12px 0;
    font-size: 1rem;
  }
  .nav-buttons {
    gap: 10px;
  }
  .logo {
    margin-bottom: 20px;
  }
  .nav-btn {
    padding: 10px 0;
    font-size: 0.9rem;
  }
}

@media (max-height: 650px) {
  .nav-btn {
    padding: 8px 0;
    font-size: 0.9rem;
  }
  .nav-buttons {
    gap: 8px;
  }
  .logo-text-img {
    height: 40px;
  }
  .nav-btn {
    padding: 6px 0;
    font-size: 0.8rem;
  }
}

@media (max-height: 700px) {
    .nav-btn {
        padding: 10px 0;
        font-size: 1rem;
    }
}

/* --- Page Transition Animations --- */
/* Page transition animations removed for accessibility */

/* Push forward animations removed for accessibility */

/* Disable transitions setting (scoped to page navigation only) */
.disable-transitions body.page-leaving,
.disable-transitions body.page-push .container,
.disable-transitions body.page-push .main-content,
.disable-transitions body.page-push .layout-wrapper {
  animation: none !important;
  transition: none !important;
  filter: none !important;
  transform: none !important;
}
.disable-transitions .page-transition-overlay .frost-layer {
  animation: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: transparent !important;
}

/* pushForward keyframes removed for accessibility */

/* Reduced motion media query no longer needed - all transitions removed */

/* Frutiger Aero frosted depth transitions removed for accessibility */

.greeting-avatar {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 40px;
}

.greeting {
  font-size: 2.5rem;
  color: #000;
  margin: 0;
}
.username {
  color: #000;
}

.avatar-edit-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #000;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
}
.avatar-img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-text {
  position: absolute;
  bottom: 5px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0 4px;
}

.greeting-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

#greeting-text {
  font-size: 2.5rem;
  font-weight: bold;
  color: #374151;
  margin: 0;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

#main-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.projects-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.project-card img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.project-card-title {
  font-weight: bold;
  text-align: center;
}

/* ===== SKEUOMORPHIC HOME PAGE LAYOUT ===== */

/* Hero Section - Skeuomorphic */
.hero-section {
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(145deg, #f0f2f5, #e8eaed);
  border-radius: 18px;
  box-shadow: 
    0 8px 16px rgba(0,0,0,0.15),
    inset 0 2px 4px rgba(255,255,255,0.9),
    inset 0 -2px 4px rgba(0,0,0,0.1);
  border: 1px solid #d1d5db;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
  border-radius: 18px 18px 0 0;
}

.greeting-content {
  flex: 1;
}

.welcome-subtitle {
  color: #6b7280;
  font-size: 1.1rem;
  margin: 8px 0 0 0;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.profile-avatar-link {
  display: block;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(255,255,255,0.3);
  border: 3px solid #e5e7eb;
}

.profile-avatar-link:hover {
  box-shadow: 
    0 6px 12px rgba(0,0,0,0.25),
    inset 0 2px 4px rgba(255,255,255,0.4),
    0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 25px;
  margin-bottom: 30px;
}

.dashboard-left,
.dashboard-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Dashboard Cards - Skeuomorphic */
.dashboard-card {
  background: linear-gradient(145deg, #f9fafb, #f3f4f6);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 
    0 6px 12px rgba(0,0,0,0.12),
    inset 0 2px 4px rgba(255,255,255,0.8),
    inset 0 -2px 4px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
  position: relative;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
  border-radius: 16px 16px 0 0;
}

.dashboard-card:hover {
  box-shadow: 
    0 8px 16px rgba(0,0,0,0.15),
    inset 0 2px 4px rgba(255,255,255,0.9),
    inset 0 -2px 4px rgba(0,0,0,0.1);
}

/* Card Headers - Skeuomorphic */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
  position: relative;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.card-header h2 {
  font-size: 1.4rem;
  margin: 0;
  color: #374151;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.view-all-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  border: 1px solid #93c5fd;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.1),
    inset 0 1px 2px rgba(255,255,255,0.8);
  text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

.view-all-link:hover {
  background: linear-gradient(145deg, #bfdbfe, #93c5fd);
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.15),
    inset 0 1px 2px rgba(255,255,255,0.9);
}

/* Video Section - Skeuomorphic */
.video-section {
  position: relative;
}

.video-embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 6px 12px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(0,0,0,0.1);
  border: 2px solid #d1d5db;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

/* Quick Actions - Skeuomorphic */
.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  background: linear-gradient(145deg, #f9fafb, #f3f4f6);
  border: 1px solid #d1d5db;
  border-radius: 12px;
  text-decoration: none;
  color: #374151;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.1),
    inset 0 2px 4px rgba(255,255,255,0.8),
    inset 0 -1px 2px rgba(0,0,0,0.05);
  text-shadow: 0 1px 1px rgba(255,255,255,0.8);
  position: relative;
}

.quick-action-btn::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6), rgba(255,255,255,0.9));
  border-radius: 12px 12px 0 0;
}

.quick-action-btn:hover {
  background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.15),
    inset 0 2px 4px rgba(255,255,255,0.9),
    inset 0 -1px 2px rgba(0,0,0,0.08);
}

.quick-action-btn:active {
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.2),
    inset 0 2px 6px rgba(0,0,0,0.15),
    inset 0 1px 2px rgba(255,255,255,0.5);
}

.quick-action-icon {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: white;
  border-radius: 50%;
  box-shadow: 
    0 4px 8px rgba(59, 130, 246, 0.3),
    inset 0 2px 4px rgba(255,255,255,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  border: 1px solid #1d4ed8;
}

/* Featured Projects Section */
.featured-projects-section {
  grid-column: 1 / -1; /* Full width */
}

/* Homepage Announcements Section - Skeuomorphic */
.announcements-section h2 {
  font-size: 1.4rem;
  margin: 0;
  color: #374151;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.announcements-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.announcement-preview-card {
  background: linear-gradient(145deg, #f9fafb, #f3f4f6);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.12),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  /* transition removed for accessibility */
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.announcement-preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(145deg, #10b981, #059669);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), inset 0 -1px 2px rgba(0,0,0,0.2);
}

.announcement-preview-card.pinned::before {
  background: linear-gradient(145deg, #f59e0b, #d97706);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), inset 0 -1px 2px rgba(0,0,0,0.2);
}

.announcement-preview-card.important::before {
  background: linear-gradient(145deg, #ef4444, #dc2626);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), inset 0 -1px 2px rgba(0,0,0,0.2);
}

.announcement-preview-card:hover {
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(0, 0, 0, 0.08);
}

.announcement-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 10px;
}

.announcement-preview-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin: 0;
  flex: 1;
}

.announcement-preview-type {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.announcement-preview-type.info {
  background: linear-gradient(145deg, #17a2b8, #138496);
}

.announcement-preview-type.update {
  background: linear-gradient(145deg, #28a745, #20c997);
}

.announcement-preview-type.feature {
  background: linear-gradient(145deg, #6f42c1, #5a32a3);
}

.announcement-preview-type.maintenance {
  background: linear-gradient(145deg, #fd7e14, #e55a00);
}

.announcement-preview-type.important {
  background: linear-gradient(145deg, #dc3545, #c82333);
}

.announcement-preview-content {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  line-clamp: 3; /* Allow more lines to show line breaks */
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap; /* Preserve whitespace and line breaks */
  word-wrap: break-word; /* Break long words if necessary */
}

/* Ensure br tags create proper spacing in previews */
.announcement-preview-content br {
  line-height: 1.8; /* Add extra spacing for line breaks */
}

.announcement-preview-date {
  font-size: 0.75rem;
  color: #adb5bd;
  margin-top: 8px;
  font-weight: 500;
}

.announcements-preview::-webkit-scrollbar {
  width: 6px;
}

.announcements-preview::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.announcements-preview::-webkit-scrollbar-thumb {
  background: linear-gradient(145deg, #adb5bd, #6c757d);
  border-radius: 3px;
}

.announcements-preview::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(145deg, #6c757d, #495057);
}

/* Population Machine Section */
.population-machine-section {
  margin-bottom: 30px;
}

.population-machine-section h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #495057;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.population-stats {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  border: 2px solid #e9ecef;
}

.population-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
}

.population-count {
  text-align: center;
  flex: 1;
}

.population-number {
  font-size: 3rem;
  font-weight: 700;
  color: #28a745;
  text-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
  margin: 0;
  line-height: 1;
}

.population-label {
  font-size: 1.1rem;
  color: #6c757d;
  margin: 5px 0 0 0;
  font-weight: 500;
}

.population-goal {
  text-align: center;
  flex: 1;
}

.goal-number {
  font-size: 2rem;
  font-weight: 700;
  color: #6f42c1;
  text-shadow: 0 2px 4px rgba(111, 66, 193, 0.3);
  margin: 0;
  line-height: 1;
}

.goal-label {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 5px 0 0 0;
  font-weight: 500;
}

.progress-container {
  margin: 20px 0;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: linear-gradient(145deg, #e9ecef, #dee2e6);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  border-radius: 10px;
  /* transition removed for accessibility */
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.progress-text {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.milestones-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.milestone-card {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 2px solid #e9ecef;
  /* transition removed for accessibility */
  position: relative;
  overflow: hidden;
}

.milestone-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6c757d, #adb5bd);
  /* transition removed for accessibility */
}

.milestone-card.unlocked::before {
  background: linear-gradient(90deg, #28a745, #20c997);
}

.milestone-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.milestone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.milestone-icon {
  font-size: 1.5rem;
  opacity: 0.5;
  /* transition removed for accessibility */
}

.milestone-card.unlocked .milestone-icon {
  opacity: 1;
}

.milestone-count {
  font-size: 1.2rem;
  font-weight: 700;
  color: #495057;
  margin: 0;
}

.milestone-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 5px 0;
}

.milestone-description {
  font-size: 0.8rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.3;
}

.recent-users {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.recent-users h3 {
  font-size: 1.1rem;
  color: #495057;
  margin: 0 0 10px 0;
  text-align: center;
}

.recent-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.recent-user {
  background: linear-gradient(145deg, #e9ecef, #dee2e6);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  color: #495057;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1200px) {
  .sidebar {
    width: 300px;
  }
  #greeting-text {
    font-size: 2.2rem;
  }
  .featured-projects h2 {
    font-size: 1.6rem;
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 992px) {
  .layout-wrapper {
    flex-direction: column;
    height: auto;
    width: 100%;
    gap: 0;
  }
  .layout-wrapper > .sidebar { /* Increased specificity */
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 10px 20px !important;
    box-sizing: border-box;
  }
  .logo {
    margin-bottom: 0;
  }
  .nav-buttons {
    flex-direction: row !important;
    width: auto !important;
    gap: 8px !important;
    align-items: center;
  }
  .nav-btn {
    padding: 10px 15px !important;
    font-size: 1rem !important;
    white-space: nowrap;
  }
  .nav-auth-buttons {
    display: contents;
  }
  .container {
    width: 100%;
    min-height: auto;
    border-radius: 0;
    margin: 0;
  }
  .main-content {
    padding: 20px;
  }
}

/* Phone Portrait */
@media (max-width: 768px) and (orientation: portrait) {
  .layout-wrapper > .sidebar { /* Increased specificity */
    display: none !important;
  }
  .mobile-toolbar {
    display: flex;
  }
  .container {
    padding-bottom: 80px; /* Space for toolbar */
  }
}

/* Phone Landscape (behaves like desktop) */
@media (max-height: 500px) and (orientation: landscape) {
  .layout-wrapper {
    flex-direction: row;
  }
  .layout-wrapper > .sidebar { /* Increased specificity */
    display: flex !important;
    width: 300px !important;
    height: 95vh !important;
  }
  .nav-buttons {
    flex-direction: column !important;
    width: 80% !important;
  }
  .nav-auth-buttons {
    display: flex !important;
    flex-direction: row !important;
  }
  .mobile-toolbar {
    display: none !important;
  }
  .container {
      height: 95vh !important;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 15px;
  }
  #greeting-text {
    font-size: 1.5rem;
  }
  .featured-projects h2 {
    font-size: 1.3rem;
  }
  .projects-grid {
    gap: 15px;
  }
  
  /* Mobile Home Page Layout - Skeuomorphic */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  
  .hero-section {
    padding: 18px;
    margin-bottom: 20px;
  }
  
  .greeting-container {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .dashboard-card {
    padding: 18px;
  }
  
  .card-header h2 {
    font-size: 1.2rem;
  }
  
  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .quick-action-btn {
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 18px;
    gap: 14px;
  }
  
  .quick-action-icon {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
  
  .video-embed {
    border-radius: 10px;
  }
}

.aeros-display {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  margin-top: 15px;
  padding: 10px;
  background-color: rgba(0,0,0,0.2);
  border-radius: 8px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
} 

/* Performance optimizations for inactive tabs */
:root {
    --animation-reduced: false;
}

/* Performance-based animation reduction */
:root {
    --animation-reduced: false;
    --performance-mode: normal;
    --mobile-optimized: false;
    --battery-saver: false;
}

/* Reduce animations when tab is inactive or performance is low */
body[style*="--animation-reduced: true"] *,
.reduced-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Performance mode optimizations */
[style*="--performance-mode: reduced"] * {
    animation-duration: 2s !important;
    transition-duration: 0.3s !important;
}

[style*="--performance-mode: minimal"] * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Mobile optimizations */
[style*="--mobile-optimized: true"] .particle,
[style*="--mobile-optimized: true"] .sparkle {
    display: none !important;
}

/* Keep VHS effect but optimize it for mobile */
[style*="--mobile-optimized: true"] .vhs-effect::before {
    animation: vhs-flicker 1s infinite; /* Slower on mobile for better performance */
}

/* Battery saver mode */
[style*="--battery-saver: true"] .sparkle,
[style*="--battery-saver: true"] .particle,
[style*="--battery-saver: true"] .shimmer {
    animation: none !important;
}

/* Simplify effects when performance is low */
.simplified-effects .vhs-effect::before {
    animation: vhs-flicker 2s infinite !important; /* Much slower but still visible */
}
.simplified-effects .vhs-effect::after {
    display: none !important;
}

/* Pause heavy animations when tab is hidden */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Optimize for inactive tabs */
@media (display-mode: standalone) {
    /* Reduce background animations in PWA mode */
    .background-clouds {
        animation: none !important;
    }
} 

/* Aeros Display Styling */
.aeros-display {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
}

.aeros-display #aeros-count {
    font-size: 16px;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
} 

/* --- Responsive & Mobile Layout --- */
.mobile-toolbar {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Hidden by default, shown in portrait mobile */
    gap: 10px;
    background: rgba(255,255,255,0.9);
    border: 2px solid #bbb;
    border-radius: 14px;
    padding: 6px 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2), inset 0 1px 0 #fff;
    z-index: 1000;
}

.mobile-toolbar .mt-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(145deg, #ffffff, #e9ecef);
    border: 1px solid #b0b0b0;
    color: #333;
    text-decoration: none;
    font-size: 22px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 0 #fff;
}

/* ============================================ */
/* UNIVERSAL SIDEBAR & CONTAINER STANDARDIZATION */
/* ============================================ */
/* ⚠️ IMPORTANT: These rules apply to ALL pages */
/* DO NOT override these in page-specific CSS files */
/* All pages MUST have identical sidebar/container sizing */
/* ============================================ */

/* Sidebar - Standard for all pages */
.layout-wrapper > .sidebar,
.layout-wrapper > aside.sidebar,
aside.sidebar,
.profile .sidebar,
body > .layout-wrapper > .sidebar {
  width: 400px !important;
  background: url('Sidebar.png') center center / 100% 100% no-repeat !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  border: none !important;
  height: 88vh !important;
  flex-shrink: 0 !important;
  position: relative !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: 88vh !important;
  min-height: 88vh !important;
  box-sizing: border-box !important;
}

/* Container - Standard for all pages */
.layout-wrapper > .container,
.container,
.profile .container,
body > .layout-wrapper > .container {
  margin: 20px !important;
  flex-grow: 1 !important;
  padding: 20px !important;
  background: url('Page.png') center center / 100% 100% no-repeat !important;
  border: none !important;
  height: 90vh !important;
  max-height: 90vh !important;
  min-height: 90vh !important;
  display: flex !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
}

/* Layout wrapper - Standard for all pages */
.layout-wrapper,
body > .layout-wrapper,
.profile .layout-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  max-width: 1800px !important;
  width: 90vw !important;
  margin: 0 auto !important;
  position: relative !important;
  z-index: 1 !important;
}

/* ============================================ */
/* END UNIVERSAL STANDARDIZATION */
/* ============================================ */

/* Main content inside containers */
.main-content {
  flex: 1 !important;
  padding: 30px 40px !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

/* Sidebar nav buttons */
.layout-wrapper > .sidebar .nav-buttons {
  width: 65% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
  padding-bottom: 20px !important;
  flex-shrink: 0 !important;
}

/* Logo inside sidebar - BIGGER SIZE */
.sidebar .logo {
  flex-shrink: 0 !important;
  margin-bottom: 25px !important;
  margin-top: 10px !important;
}

.sidebar .logo .logo-text-img {
  height: 80px !important;
  width: auto !important;
  max-width: 100% !important;
}

/* Hide scrollbar but keep scroll functionality */
.sidebar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Firefox - hide scrollbar */
.sidebar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Site Footer with Version */
.site-footer {
  position: fixed;
  bottom: 0;
  right: 20px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 12px 12px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  z-index: 100;
  font-family: 'Baloo 2', cursive;
}

.site-footer p {
  margin: 0;
}

#version-number {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

/* Home page now uses the same sidebar width as all pages */

/* Normalize sidebar button sizing across all pages */
.layout-wrapper > .sidebar .nav-buttons .nav-btn,
.layout-wrapper > .sidebar .nav-auth-buttons .nav-btn {
  padding: 10px 0 !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
  height: auto !important;
}

/* --- Liquid Glass Theme --- */
.liquid-glass-theme .sidebar {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 16px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -1px 0 rgba(0,0,0,0.08);
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
}

.liquid-glass-theme .container {
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1px solid rgba(255, 255, 255, 0.30) !important;
  border-radius: 16px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -1px 0 rgba(0,0,0,0.08);
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
}

.liquid-glass-theme .sidebar .nav-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255,255,255,0.7), inset 0 -1px 0 rgba(0,0,0,0.08);
  color: #0f172a !important;
  text-shadow: 0 1px 1px rgba(255,255,255,0.5);
  border-radius: 12px;
  font-weight: 700;
}

.liquid-glass-theme .sidebar .nav-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255,255,255,0.8), inset 0 -1px 0 rgba(0,0,0,0.1);
}

