@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
  --primary-color: #00c6ff;
  --secondary-color: #0072ff;
  --tertiary-color: #ff6b6b;
  --show-all-color: #4CAF50;
  --background-color: #f0f4f8;
  --text-color: #333; /* Changed to dark grey */
  --card-shadow: 
    0 1px 3px rgba(0,0,0,0.05),
    0 10px 20px rgba(0,0,0,0.1),
    0 20px 40px rgba(0,0,0,0.15);
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background-color: var(--background-color);
}

header {
  text-align: center;
  margin: 2rem 0;
  color: var(--text-color);
}

h1 {
  color: var(--text-color); /* Changed to dark grey */
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px; /* Increased max-width for grid */
  padding: 1rem;
}

.controls-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 500px;
    align-items: center;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.filter-container, .search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#cuisine-filter, #search-input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 80%;
}

.button-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

#generate-btn, #surprise-btn, #show-all-btn {
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#generate-btn {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 4px 15px rgba(0, 114, 255, 0.4);
}

#surprise-btn {
  background: linear-gradient(45deg, var(--tertiary-color), #ff8e53);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

#show-all-btn {
    background: linear-gradient(45deg, var(--show-all-color), #6abf69);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

#generate-btn:hover, #surprise-btn:hover, #show-all-btn:hover {
  transform: scale(1.05);
}

#generate-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 114, 255, 0.6);
}

#surprise-btn:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

#show-all-btn:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

#food-container {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Grid layout */
  gap: 2rem;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(2deg); }
  50% { transform: translateX(5px) rotate(-2deg); }
  75% { translateX(-5px) rotate(2deg); }
  100% { transform: translateX(0); }
}

.shaking {
  animation: shake 0.5s ease-in-out;
}

food-card .food-card {
  box-shadow: var(--card-shadow);
}
