:root {
  --primary: #FF6B6B;
  --secondary: #4ECDC4;
  --accent: #FFE66D;
  --dark: #2D3047;
  --light: #F7FFF7;
  --primary-rgb: 255, 107, 107;
  --secondary-rgb: 78, 205, 196;
  --accent-rgb: 255, 230, 109;
}

* {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--light);
  min-height: 100vh;
}
.navbar {
  background: var(--light);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  color: var(--dark) !important;
  font-size: 1.25rem;
}

[data-bs-theme="dark"] .navbar {
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .navbar-brand {
  color: var(--light) !important;
}

#themeToggle {
  color: var(--dark);
}

[data-bs-theme="dark"] #themeToggle {
  color: var(--light);
}
/* Adjust header margin for fixed navbar */
.header-section {
  margin-top: 76px;
  height: calc(60vh - 76px);
}



/* Dark Mode Overrides */
[data-bs-theme="dark"] body {
  background: var(--dark);
  color: var(--light);
}

[data-bs-theme="dark"] .search-box {
  background: rgba(45, 48, 71, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .recipe-card {
  background: var(--dark);
}

[data-bs-theme="dark"] .nutrition-grid {
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .nutrition-item {
  background: var(--dark);
  color: var(--light);
}

.header-section {
  background: linear-gradient(rgba(45, 48, 71, 0.9), rgba(45, 48, 71, 0.9)),
              url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
  background-size: cover;
  background-position: center;
  height: 60vh;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  margin-bottom: -10vh;
}

.search-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  width: 800px;
  max-width: 90%;
  margin: -10vh auto 0;
  padding: 2rem !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.recipe-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  position: relative;
  cursor: pointer;
}

.recipe-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

.recipe-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.recipe-card img {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
  width: 100%;
}

.recipe-card:hover img {
  transform: scale(1.05);
}

.recipe-card .card-body {
  position: relative;
  z-index: 2;
  color: white;
  background: transparent;
}

.ingredient-pill {
  background: var(--primary);
  color: white;
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.delete-ingredient {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}

.delete-ingredient:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-content {
  border-radius: 1.5rem;
  border: none;
  overflow: hidden;
}

.modal-image {
  height: 300px;
  object-fit: cover;
  width: 100%;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: var(--light);
  border-radius: 1rem;
}

.nutrition-item {
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nutrition-item .text-primary {
  color: var(--primary) !important;
  font-size: 0.9rem;
}

.loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 3rem;
  height: 3rem;
  border: 0.25em solid var(--primary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .header-section {
    height: 40vh;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
  }
  
  .search-box {
    margin-top: -5vh;
    padding: 1.5rem !important;
  }
  
  .modal-image {
    height: 200px;
  }
}
/* Login Page Specific Styles */
.login-container {
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-container input {
  background: var(--light);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.login-container input:focus {
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
  border-color: var(--secondary);
}

.login-container .input-group-text {
  color: var(--primary);
  background: var(--light);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-right: none;
}

/* Dark Mode Overrides for Login */
[data-bs-theme="dark"] .login-container input,
[data-bs-theme="dark"] .login-container .input-group-text {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--light);
}

[data-bs-theme="dark"] .login-container input:focus {
  box-shadow: 0 0 0 3px rgba(255, 235, 109, 0.2);
}

[data-bs-theme="dark"] .login-container {
  color: var(--light);
}
/* Placeholder styling for dark mode */
[data-bs-theme="dark"] ::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-bs-theme="dark"] .auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Auth form transitions */
.auth-form {
  transition: all 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.auth-form.d-none {
  opacity: 0;
  transform: translateY(10px);
  display: none !important;
}

/* Dark mode input overrides */
[data-bs-theme="dark"] .auth-form input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--light);
}

[data-bs-theme="dark"] .auth-form .input-group-text {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

[data-bs-theme="dark"] .auth-form {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
/* Meal Planner Styles */
#mealPlanner {
  background: rgba(var(--primary-rgb), 0.05);
  border-radius: 1rem;
  margin-top: 2rem;
}

.meal-day {
  background: var(--light);
  border: 2px dashed var(--secondary);
  border-radius: 0.75rem;
  min-height: 200px;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .meal-day {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

.meal-slot {
  background: var(--light);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  cursor: move;
  transition: transform 0.2s ease;
}

[data-bs-theme="dark"] .meal-slot {
  background: rgba(255, 255, 255, 0.1);
}

.meal-slot:hover {
  transform: translateY(-2px);
}

.meal-slot img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.drag-over {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
}

.current-day {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

