/* Ingredients Page Layout */
.ingredients-container {
  text-align: center;
  margin-top: 60px;
  padding: 20px;
}

.ingredients-container h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #376736;
  margin-bottom: 1.2rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.ingredients-container .subtitle {
  font-size: 1.25rem;
  color: #495057;
  max-width: 650px;
  margin: 0 auto;
  font-weight: 400;
}

.input-sections {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  margin-top: 40px;
}

.upload-box,
.text-box {
  background: white;
  border-radius: 12px;
  padding: 40px;
  width: 400px;
  height: 400px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  z-index: 2;
}

.upload-box h2,
.text-box h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #22543d;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.upload-box p,
.text-box p {
  color: #666666;
  margin-top: 7px;
  margin-bottom: 15px;
  font-size: 1.05rem;
  opacity: 0.9;
  font-weight: 400;
}

.upload-box:hover,
.text-box:hover {
  transform: translateY(-8px);
}

.method-icon {
  margin-top: 0;
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 1.1rem;
  animation: bounce 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(255, 107, 53, 0.15));
}

.upload-btn {
  display: inline-block;
  padding: 12px 20px;
  margin-top: 15px;
  background: #376736;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}
.upload-btn:hover {
  background: #4f944e;
}

textarea {
  width: 100%;
  height: 120px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: none;
}

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: #888;
  margin-top: 5px;
}

/* Buttons */
.btn-group {
  margin-top: 20px;
}

.btn {
  padding: 15px 30px;
  margin: 10px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn.primary {
  background: #ff7b00;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
}
.btn.primary:hover {
  background: #ff9933;
  transform: scale(1.05);
}
.btn.secondary {
  background: transparent;
  border: 2px solid #376736;
  color: #376736;
}
.btn.secondary:hover {
  background: #376736;
  color: white;
}

/* Common Ingredients */
.common-ingredients {
  margin-top: 40px;
  margin-bottom: 40px;
}

.common-ingredients p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 12px;
  font-weight: 500;
}

.tags span {
  display: inline-block;
  margin: 6px;
  padding: 8px 14px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 1rem;
}

.tags span:hover {
  background: linear-gradient(45deg, #ff7b00, #ff9933);
  transform: scale(1.05);
  cursor: pointer;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 123, 0, 0.3);
  transition: transform 0.3s ease;
}

/* Floating Food Animations */
.floating-food {
  position: fixed;
  font-size: 2rem;
  opacity: 0.6;
  animation: float 12s infinite linear;
}
.floating-food:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-duration: 15s;
}
.floating-food:nth-child(2) {
  top: 30%;
  right: 15%;
  animation-duration: 18s;
}
.floating-food:nth-child(3) {
  top: 50%;
  left: 25%;
  animation-duration: 14s;
}
.floating-food:nth-child(4) {
  top: 70%;
  right: 20%;
  animation-duration: 20s;
}
.floating-food:nth-child(5) {
  top: 80%;
  left: 5%;
  animation-duration: 16s;
}
.floating-food:nth-child(6) {
  top: 40%;
  right: 30%;
  animation-duration: 22s;
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(20deg);
  }
  100% {
    transform: translateY(0) rotate(-20deg);
  }
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}
.navbar .logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: #22543d;
}
.navbar ul {
  display: flex;
  list-style: none;
  gap: 20px;
}
.navbar ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}
.navbar ul li a:hover,
.navbar ul li a.active {
  color: #ff7b00;
}

/* Upload box feedback container */
.upload-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  min-height: 30px; /* reserve space */
}

/* Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ff9019;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

/* Status text */
#upload-status {
  font-weight: 500;
  font-size: 15px;
  color: #ff9019;
  transition: opacity 0.3s ease;
  opacity: 0;
}

#upload-status.show {
  opacity: 1;
}

/* Spinner animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
