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

/* BODY */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  /* The navbar is fixed; add top padding so content isn’t hidden */
  padding-top: 60px;
}
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 60px;
  background-color: #00c060; /* Your original green */
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 9999;
}
/* Container for everything in the navbar, all left-aligned */
.nav-container {
  display: flex;
  align-items: center;
  gap: 1.2rem; /* spacing between elements */
}

.content {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  text-decoration: none;
  color: #fff; /* white text on green background */
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: #f0f0f0; /* lighten on hover */
}
.nav-links a.active {
  text-decoration: underline; /* or some highlight */
}

/* NAVBAR LEFT */
.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
}

/* NAVBAR LOGO */
.logo {
  font-size: 1.4rem;
  color: #fff;
  font-weight: bold;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* DROPDOWN MENU */
.dropdown {
  position: relative;
}

.dropbtn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.3s;
}

.dropdown.open .menu-icon {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: 50px;
  left: 0;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  max-height: 300px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 999;
  overflow: hidden;
}

.dropdown.open .dropdown-content {
  opacity: 1;
  transform: translateY(0);
}

.dropdown-content a {
  display: block;
  color: #000;
  padding: 10px 15px;
  text-decoration: none;
}

.dropdown-content a:hover {
  background: #eee;
}

/* CONTENT */
.content {
  padding: 80px 1rem 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* HEADINGS */
h1, h2, h3 {
  color: #004000;
  margin-bottom: 1rem;
}

/* RECIPE LIST - Stacked Containers */
.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.recipe-box {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  border-left: 5px solid #00c060;
}

.recipe-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #004000;
  margin-bottom: 10px;
}

.missing-ingredients {
  color: #d60000;
  font-weight: bold;
}

.recipe-instructions {
  margin-top: 10px;
  font-size: 1rem;
}

/* BUTTONS */
.stylish-btn {
  display: block;
  width: 100%;
  background: #00c060;
  color: white;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
}

.stylish-btn:hover {
  background: #008f44;
}

/* SHOPPING LIST */
.shopping-list-container {
  background: #fffde7;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 90%;
  margin: 20px auto;
  border: 2px dashed #b5651d;
}

/* SHOPPING LIST HEADER */
.shopping-list-container h1 {
  text-align: center;
  color: #5a3e1b;
}

/* SEARCH BAR */
.search-container {
  margin-bottom: 15px;
  position: relative;
}

#shopping-search {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #b5651d;
  background: #fff;
  color: #333;
}

/* SHOPPING LIST ITEMS */
#shopping-list {
  list-style: none;
  padding: 0;
  margin-top: 15px;
}

#shopping-list li {
  background: #fffbe8;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #5a3e1b;
}

/* REMOVE ITEM BUTTON */
.remove-item {
  background: #ff6961;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: white;
  border-radius: 5px;
}

.remove-item:hover {
  background: #d63e3e;
}

/* ======== NEW STYLES FROM SECOND CODE ======== */

/* WELCOME PAGE */
.welcome-page {
  background: #fff;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  max-width: 500px;
  margin: 40px auto;
  text-align: center;
}

.welcome-page h1 {
  font-size: 2.5rem;
  color: #00c060;
  margin-bottom: 20px;
}

.actions .btn {
  display: inline-block;
  padding: 12px 20px;
  margin: 10px 0;
  background: #00c060;
  color: #fff;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s;
  max-width: 200px;
}

.actions .btn:hover {
  background: #008f44;
}

.black-text {
  color: #000 !important;
}

/* FORMS */
.form-container {
  background: #fff;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  max-width: 400px;
  width: 90%;
  margin: 80px auto;
  text-align: center;
}

.form-container h1 {
  font-size: 2rem;
  color: #00c060;
  margin-bottom: 20px;
}

.form-container label {
  display: block;
  text-align: left;
  margin: 10px 0 5px;
  color: #004000;
  font-weight: bold;
}

.form-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background: #fafafa;
  color: #333;
  font-size: 1rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}


.remember-me input[type="checkbox"] {
  margin: 0;
  width: auto;
}

.remember-me label {
  margin: 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.form-container button.btn {
  width: 100%;
  padding: 12px;
  background: #00c060;
  color: #fff;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
}

.form-container button.btn:hover {
  background: #008f44;
}

.form-container a {
  color: #00c060;
  text-decoration: none;
}

.form-container a:hover {
  text-decoration: underline;
}

/* MESSAGES */
.error-message {
  color: #ff3b3b;
  margin-bottom: 15px;
  font-weight: bold;
}

.success-message {
  color: #00c060;
  margin-bottom: 15px;
  font-weight: bold;
}

/* PROFILE PAGE */
.profile-container {
  background: #fff;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  max-width: 800px;
  width: 95%;
  margin: 80px auto;
}

.profile-header {
  color: #00c060;
  text-align: center;
  margin-bottom: 2rem;
}

.profile-section {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.profile-form .form-group {
  margin-bottom: 1.5rem;
}

.profile-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #004000;
  font-weight: bold;
}

.profile-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
  color: #333;
  font-size: 1rem;
}

.profile-form input:focus {
  border-color: #00c060;
  outline: none;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-update {
  background: #00c060;
  color: #fff;
  flex: 1;
  min-width: 120px;
}

.btn-logout {
  background: #ff4444;
  color: #fff;
  flex: 1;
  min-width: 120px;
}

.btn-logout:hover {
  background: #d60000;
}

/* FRIDGE PAGE */
.fridge-container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  padding: 2rem;
  margin: 80px auto;
  width: 95%;
  max-width: 800px;
}

/* Updated Ingredient List for My Fridge */
.ingredient-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ingredient-item {
  display: grid;
  grid-template-columns: 2fr 1fr 100px 100px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.ingredient-name {
  font-weight: bold;
}

.ingredient-amount {
  font-weight: 600;
  text-align: center;
}

.remove-btn,
.update-btn {
  margin: 0;
  padding: 8px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.remove-btn {
  background: #ff6961;
  color: #fff;
}

.remove-btn:hover {
  background: #d63e3e;
}

.update-btn {
  background: #ffa500;
  color: #fff;
}

.update-btn:hover {
  background: #cc8400;
}

/* MODAL STYLING */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 3000;
  display: none;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  width: 300px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.modal .btn {
  margin: 0 5px;
}

/* SUGGESTIONS DROPDOWN */
.suggestions-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; 
  right: 0;
  background: #fff;
  border: 1px solid #00c060;
  border-radius: 5px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 2000;
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
  color: #333;
}

.suggestion-item:hover {
  background: #00c060;
  color: #fff;
}


.star-button {
  font-size: 24px;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  margin-right: 10px;
}

.gold-star {
  color: gold;
}

.empty-star {
  color: gray;
}

