:root {
  --primary: #4caf50;
  --primary-hover: #43a047;
  --bg: #f0fdf4; /* Very light mint green */
  --card-bg: #ffffff; /* White background for cards */
  --text: #064e3b; /* Deep forest green for text */
  --text-muted: #4b5563;
  --border: #d1fae5; /* Subtle green border */
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  color: #064e3b; /* Deep forest green */
  margin-bottom: 1rem;
}

/* Section and Goal Cards */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Navigation */
nav {
  overflow-x: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #059669, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

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

a.active {
  color: var(--primary);
  font-weight: 700;
}

ul{
  list-style: none;
}

#nav-toggle{
  display: none;
  cursor: pointer;
  font-size: 23px;
}

#navOnMobile{
  position: fixed;
  top: 0px;
  right: 0;
  transform: translateX(100%);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: transform 0.3s ease-in-out;
  z-index: 101;
  display: flex;
  flex-direction: column;
  align-items: right;
  gap: 1rem;
  width: 200px;
  max-width: 80vw; /* prevents overflow on very small screens */
  height: 100vh;
}

#nav-close{
  cursor: pointer;
  font-size: 23px;
}

#linksOnMobile{
  display: flex; 
  flex-direction: column; 
  gap: 1rem; 
  justify-content: center; 
  align-items: center;
  width: 100%;
  margin-bottom: 0.5rem;
}

#linksOnMobile li{
  width: 100%;
  text-align:end;
}
#linksOnMobile li a{
  display: block;
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  transition: 0.3s ease-in-out;
}

#linksOnMobile li a:hover{
  background: rgba(102, 102, 102, 0.1);
}

.mobile-user-info {
  display: flex;
  width: 100%;
  align-items: center; 
  justify-content: center;
}

.mobile-user-info button{
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 15px;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #111827;
  font-size: 1rem;
  transition: all 0.3s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
  background: #ffffff;
}

select option {
  background-color: #ffffff;
  color: #111827;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  gap: 0.5rem;
  background-color: #dddddd;
  transition: 0.3s ease-in-out;
}

.btn:hover{
  transform: translateY(-1px);
  background-color: #cccccc
}

.btn-primary {
  background: var(--primary) !important;
  color: white;
  transition: background 0.3s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  display: none;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #15803d;
}

/* Grid Layouts */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  nav { padding: 1rem; }
  .nav-links { display: none; }
  #nav-toggle { display: block !important; }
  #nav-user-info { display: none !important; }

}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Category Badge Update */
.category-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}

.error{
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
