/* History Section Styles */
.history-section {
  margin: 2rem auto;
  max-width: 800px;
  padding: 1rem;
}

.history-section h2 {
  text-align: left;
  margin-bottom: 1.5rem;
  color: #333;
  font-weight: 600;
}

.history-cards {
  display: flex;
  gap: 2rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.history-card {
  flex: 0 1 30%;
  max-width: 30%;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  border-radius: 18px;
  padding: 1.5rem 2rem;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  transition: box-shadow 0.2s;
  margin-bottom: 2rem;
}

.history-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  cursor: pointer;
}

.history-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #222;
}

.history-card p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

.recipe-ingredients {
  margin-top: 0.5rem !important;
  font-size: 0.85rem !important;
  color: #666 !important;
  font-style: italic;
}

/* Empty State Styles */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
}

.empty-state h3 {
  color: #333;
  margin-bottom: 1rem;
}

.empty-state p {
  color: #666;
  margin-bottom: 2rem;
}

.generate-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: transform 0.2s;
}

.generate-btn:hover {
  transform: translateY(-2px);
}

/* Error State Styles */
.error-state {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
}

.error-state h3 {
  color: #d32f2f;
  margin-bottom: 1rem;
}

.error-state p {
  color: #666;
}

/* Modal Styles */
.recipe-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 18px;
  max-width: 90%;
  max-height: 90%;
  width: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #eee;
}

.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: #f5f5f5;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.recipe-info {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.recipe-info p {
  margin: 0.5rem 0;
  color: #555;
}

.recipe-content {
  line-height: 1.6;
  color: #333;
}

.recipe-content p {
  margin-bottom: 1rem;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #eee;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.delete-btn, .close-modal-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.delete-btn {
  background: #d32f2f;
  color: white;
}

.delete-btn:hover {
  background: #b71c1c;
}

.close-modal-btn {
  background: #f5f5f5;
  color: #333;
}

.close-modal-btn:hover {
  background: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95%;
  }
  
  .modal-header, .modal-body, .modal-footer {
    padding: 1rem;
  }
  
  .history-cards {
    gap: 1rem;
  }
  
  .history-card {
    flex: 0 1 100%;
    max-width: 100%;
    min-width: auto;
  }
}
