* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  height: 100vh;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)), 
  url('./Assets/background.png') center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  width: 100%;
}

.hero-text {
  z-index: 1;
  max-width: 900px;
  padding: 30px;
  width: 100%;
}

.hero-text h1 {
  font-size: 3.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text p {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 30px;
  opacity: 0.9;
}

.search-box {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.search-box input {
  padding: 16px 20px;
  width: 30%;
  border: 1px solid #e0e0e0;
  border-right: none;
  border-radius: 50px 0 0 50px;
  font-size: 1rem;
  outline: none;
  background: white;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.search-box select {
  padding: 16px 20px;
  border: 1px solid #e0e0e0;
  border-right: none;
  font-size: 1rem;
  outline: none;
  background: white;
  transition: all 0.3s ease;
  border-radius: 0;
}

.search-box select:focus {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.search-box button {
  padding: 16px 30px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.search-box button:hover {
  background: #e55a5a;
  transform: translateY(-1px);
}

.results {
  padding: 60px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  flex: 1 0 auto;
}

.meal-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.meal-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.meal-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.meal-card:hover img {
  transform: scale(1.05);
}

.meal-card-content {
  padding: 24px;
}

.meal-card h3 {
  margin-bottom: 12px;
  color: #1a1a1a;
  font-size: 1.5rem;
  font-weight: 600;
}

.view-recipe-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: #ff6b6b;
  color: white;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  margin-top: 15px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.view-recipe-btn:hover {
  background: #e55a5a;
  transform: translateY(-1px);
}

.recipe-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.modal-content {
  background: white;
  margin: 40px auto;
  padding: 40px;
  border-radius: 16px;
  max-width: 900px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #1a1a1a;
}

.recipe-content {
  margin-top: 20px;
}

.recipe-content h2 {
  color: #ff6b6b;
  margin-bottom: 20px;
  font-size: 2.2rem;
  font-weight: 600;
}

.recipe-content h3 {
  margin: 25px 0 15px;
  color: #1a1a1a;
  font-size: 1.4rem;
  font-weight: 500;
}

.recipe-content ul, .recipe-content ol {
  margin-left: 25px;
  margin-bottom: 20px;
  font-size: 1rem;
  color: #333;
}

.recipe-content li {
  margin-bottom: 12px;
}

.loading {
  text-align: center;
  padding: 60px;
  font-size: 1.2rem;
  color: #666;
  font-weight: 500;
}

.loading::after {
  content: "...";
  animation: dots 1s infinite;
}

.ai-badge {
  display: inline-block;
  background: #ff6b6b;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: 12px;
  vertical-align: middle;
}

.error-message {
  color: #d32f2f;
  background-color: #ffebee;
  padding: 20px;
  border-radius: 8px;
  margin: 15px 0;
  font-size: 1rem;
}

@keyframes dots {
  0%, 20% { content: "."; }
  40% { content: ".."; }
  60%, 100% { content: "..."; }
}

@media (max-width: 768px) {
  .hero {
    height: 100vh;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text p {
    font-size: 1.1rem;
  }

  .search-box {
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
  }

  .search-box input {
    width: 100%;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
  }

  .search-box select {
    width: 100%;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
  }

  .search-box button {
    width: 200px;
    border-radius: 50px;
  }

  .results {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }

  .modal-content {
    margin: 20px;
    padding: 20px;
  }
}
