body {
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  background: #f0f0f0;
}

.search-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 100;
}

#search {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.ingredients-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
  padding: 20px;
  margin-top: 60px;
  margin-bottom: 200px;
}

.ingredient {
  background: white;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.ingredient:hover {
  transform: scale(1.05);
}

.ingredient.selected {
  outline: 3px solid #4CAF50;
  transform: scale(1.05);
}

.ingredient-texture {
  width: 60px;
  height: 60px;
  margin: 0 auto 5px;
  border-radius: 5px;
}

.ingredient-texture span {
  display: inline-block;
  line-height: 1;
  position: relative;
  top: 2px;
}

.ingredient[data-type="arcade"] .ingredient-texture {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

.game-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: white;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#bowl {
  width: 200px;
  height: 100px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

#bowl.heated svg path {
  fill: #ffebee;
  transition: fill 0.3s;
}

#bowl.heated {
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.3));
}

#bowl.heated svg path {
  fill: #ffebee;
  transition: fill 0.3s, filter 0.3s;
}

#bowl.heated-active svg path {
  fill: #ffcdd2;
}

#bowl:hover {
  transform: scale(1.05);
}

#bowl.heated {
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.3));
}

#bowl.heated-active {
  filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.5));
  transform: scale(1.02);
}

#bowl.frozen svg path {
  fill: #e3f2fd;
  transition: fill 0.3s;
}

#bowl.frozen {
  filter: drop-shadow(0 0 10px rgba(0, 149, 255, 0.3));
}

#bowl.frozen-active svg path {
  fill: #bbdefb;
}

#bowl.frozen {
  filter: drop-shadow(0 0 10px rgba(0, 149, 255, 0.3));
}

#bowl.frozen-active {
  filter: drop-shadow(0 0 15px rgba(0, 149, 255, 0.5));
  transform: scale(1.02);
}

#ingredients-in-bowl {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bowl-ingredient {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: absolute;
  transition: all 0.3s;
}

.game-button {
  background: #4CAF50;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background-color 0.3s;
}

.game-button:hover {
  transform: scale(1.1);
}

.game-button svg path {
  transition: d 0.3s;
}

.game-button.active {
  background: #ff4444;
}

.game-button.active svg path {
  animation: wave 2s infinite;
}

.game-button.freeze-active {
  background: #2196F3;
}

.game-button.freeze-active svg path {
  animation: icewave 2s infinite;
}

#dice-button {
  background: #4CAF50;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background-color 0.3s;
  margin-right: 10px;
}

#dice-button:hover {
  transform: scale(1.1);
}

#dice-button.rolling {
  animation: roll 0.5s ease-in-out;
}

@keyframes roll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes wave {
  0% {
    d: path("M12,2 C10,7 2,9 2,16 C2,20 6,22 12,22 C18,22 22,20 22,16 C22,9 14,7 12,2 Z M12,5 C13,8 18,11 18,16 C18,18 15,19 12,19 C9,19 6,18 6,16 C6,11 11,8 12,5 Z");
  }
  50% {
    d: path("M12,2 C14,7 2,11 2,16 C2,20 6,22 12,22 C18,22 22,20 22,16 C22,11 10,7 12,2 Z M12,5 C10,8 18,13 18,16 C18,18 15,19 12,19 C9,19 6,18 6,16 C6,13 14,8 12,5 Z");
  }
  100% {
    d: path("M12,2 C10,7 2,9 2,16 C2,20 6,22 12,22 C18,22 22,20 22,16 C22,9 14,7 12,2 Z M12,5 C13,8 18,11 18,16 C18,18 15,19 12,19 C9,19 6,18 6,16 C6,11 11,8 12,5 Z");
  }
}

@keyframes icewave {
  0% {
    d: path("M12,2 C10,7 2,9 2,16 C2,20 6,22 12,22 C18,22 22,20 22,16 C22,9 14,7 12,2 Z M12,5 C13,8 18,11 18,16 C18,18 15,19 12,19 C9,19 6,18 6,16 C6,11 11,8 12,5 Z");
  }
  50% {
    d: path("M12,2 C14,7 2,11 2,16 C2,20 6,22 12,22 C18,22 22,20 22,16 C22,11 10,7 12,2 Z M12,5 C10,8 18,13 18,16 C18,18 15,19 12,19 C9,19 6,18 6,16 C6,13 14,8 12,5 Z");
  }
  100% {
    d: path("M12,2 C10,7 2,9 2,16 C2,20 6,22 12,22 C18,22 22,20 22,16 C22,9 14,7 12,2 Z M12,5 C13,8 18,11 18,16 C18,18 15,19 12,19 C9,19 6,18 6,16 C6,11 11,8 12,5 Z");
  }
}

@keyframes specialGlow {
  0% {
    box-shadow: 0 0 10px #FFD700;
  }
  50% {
    box-shadow: 0 0 20px #FFD700;
  }
  100% {
    box-shadow: 0 0 10px #FFD700;
  }
}

.check-button {
  background: #4CAF50;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.check-button:hover {
  transform: scale(1.1);
}

#recipe-result {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  text-align: center;
}

.hidden {
  display: none;
}

#try-again {
  margin-top: 15px;
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#try-again:hover {
  background: #45a049;
}

#mods-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1000;
}

#mods-button:hover {
  background: #45a049;
}

#mods-panel {
  position: fixed;
  bottom: 80px;
  left: 20px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  min-width: 200px;
}

.mod-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  padding: 5px 0;
  min-width: 220px;
}

.mod-item:not(:last-child) {
  border-bottom: 1px solid #eee;
}

.mod-item button {
  padding: 5px 15px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.mod-item button:hover {
  background: #45a049;
}

#ingredient-counter {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-weight: bold;
  color: black; 
}

#recipe-book-button {
  position: fixed;
  bottom: 60px;
  right: 20px;
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1000;
}

#recipe-book-button:hover {
  background: #45a049;
}

#recipe-book {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 2000;
  max-width: 80%;
  max-height: 80vh;
  overflow-y: auto;
}

.recipe-book-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.recipe-book-header h2 {
  margin: 0;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.recipe-book-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.recipe-entry {
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 5px;
  position: relative;
}

.recipe-entry h3 {
  margin: 0 0 10px 0;
}

.recipe-entry p {
  margin: 0;
  color: #666;
}

.recipe-description {
  color: #666;
  font-style: italic;
  margin: 10px 0;
  line-height: 1.4;
}

.recipe-entry .recipe-description {
  margin: 5px 0 10px;
  font-size: 0.9em;
}

.delete-recipe {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.delete-recipe:hover {
  background: #ff0000;
}

#save-recipe {
  margin-top: 15px;
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#save-recipe:hover {
  background: #45a049;
}

#save-recipe:disabled {
  background: #cccccc;
  cursor: default;
}

.particle {
  position: absolute;
  pointer-events: none;
  z-index: 1000;
}

.stink-particle {
  width: 10px;
  height: 10px;
  background: #90ee90;
  border-radius: 50%;
  opacity: 0;
  animation: float-up 2s ease-out forwards;
}

@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

.bubble-particle {
  display: none;
}

@keyframes bubble-rise {
  display: none;
}

body.dark-mode {
  background: #1a1a1a;
  color: #fff;
}

.dark-mode .search-container {
  background: #2d2d2d;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.dark-mode #search {
  background: #3d3d3d;
  color: #fff;
  border-color: #4d4d4d;
}

.dark-mode .ingredient {
  background: #2d2d2d;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  color: #fff;
}

.dark-mode .game-area {
  background: #2d2d2d;
}

.dark-mode #recipe-result {
  background: #2d2d2d;
  color: #fff;
}

.dark-mode #mods-panel {
  background: #2d2d2d;
  color: #fff;
}

#settings-button {
  position: fixed;
  bottom: 60px;
  left: 20px;
  padding: 10px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1000;
}

#settings-button:hover {
  background: #45a049;
}

#settings-panel {
  position: fixed;
  bottom: 120px;
  left: 20px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  min-width: 200px;
}

.dark-mode #settings-panel {
  background: #2d2d2d;
  color: #fff;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  padding: 5px 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #4CAF50;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

#recipe-type-selector {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  text-align: center;
  z-index: 2000;
}

.recipe-type-options {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  justify-content: center;
}

.recipe-type-button {
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s, background-color 0.2s;
}

.recipe-type-button.food {
  background: #4CAF50;
  color: white;
}

.recipe-type-button.drink {
  background: #2196F3;
  color: white;
}

.recipe-type-button.sauce {
  background: #FF8C00;  
  color: white;
}

.recipe-type-button:hover {
  transform: scale(1.05);
}

.recipe-type-button.selected {
  outline: 3px solid #FFD700;
  transform: scale(1.05);
}

#create-recipe-button {
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 15px;
}

#create-recipe-button:hover {
  background: #45a049;
}

#create-recipe-button:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

.dark-mode #recipe-type-selector {
  background: #2d2d2d;
  color: #fff;
}

.dark-mode #ingredient-counter {
  background: #2d2d2d;
  color: white; 
}

.dark-mode .recipe-book-content h3 {
  color: white; 
}

.dark-mode #recipe-book h2 {
  color: #fff; 
}

.dark-mode .recipe-entry {
  background: #2d2d2d;
  border-color: #4d4d4d;
}

.dark-mode .recipe-entry h3 {
  color: white; 
  background: #4d4d4d; 
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-block;
}