@font-face {
  font-family: 'Minecraft';
  src: url('./assets/fonts/minecraft_font.otf') format('opentype');
}

body {
  font-family: 'Minecraft', sans-serif;
  min-width: 450px;
  margin: 0;
  background-color: #c6c6c6;
  color: #404040;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-size: 24px;
  position: relative;
  overflow: hidden;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('./assets/background.png') no-repeat center center fixed;
  background-size: cover;
  filter: blur(5px);
  transform: scale(1.1);
}

#main-menu, #game-interface {
  z-index: 1;
}

#main-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: relative;
}

#main-menu-logo-container {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
}

#main-menu-logo {
  width: 800px;
  height: auto;
}

#random-phrase {
  position: absolute;
  bottom: 20px;
  right: 20px;
  transform: rotate(-25deg);
  font-size: 24px;
  color: #FFD700;
  text-shadow: 1px 1px 0 #000;
  animation: fadeInOut 3s infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

#main-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.minecraft-button {
  padding: 20px 40px;
  border: 2px solid #000;
  background-color: #8b8b8b;
  color: white;
  cursor: pointer;
  font-size: 32px;
  font-family: 'Minecraft', sans-serif;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 0 2px 0 #000;
  transition: background-color 0.3s, box-shadow 0.3s;
  width: 400px;
  text-align: center;
  white-space: nowrap;
}

.minecraft-button:hover {
  background-color: #a9a9a9;
  box-shadow: 0 4px 0 #000;
}

#game-interface {
  display: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

#logo {
  width: 500px;
  height: auto;
}

#main-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  margin-top: 20px;
}

#score-container {
  font-size: 24px;
  position: absolute;
  top: 10px;
  right: 20px;
}

#crafting-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#crafting-background {
  background-color: #c6c6c6;
  padding: 20px;
  border: 2px solid #373737;
  box-shadow: 0 4px 0 #000;
  border-radius: 10px;
  position: relative;
}

#crafting-label {
  font-size: 24px;
  margin-bottom: 10px;
  position: absolute;
  top: 10px;
  left: 20px;
  background-color: #c6c6c6;
  padding: 0 10px;
}

#crafting-container {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

#craft-table {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  grid-template-rows: repeat(3, 96px);
  gap: 8px;
}

.gridCell {
  width: 96px;
  height: 96px;
  background-color: #8b8b8b;
  border-top: thick double #373737;
  border-left: thick double #373737;
  border-right: double #FFFFFF;
  border-bottom: double #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gridCell img {
  width: 80%;
  height: 80%;
}

.arrow {
  font-size: 128px;
}

#result {
  width: 96px;
  height: 96px;
  text-align: center;
  font-size: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  background-color: #8b8b8b;
  border-top: thick double #373737;
  border-left: thick double #373737;
  border-right: double #FFFFFF;
  border-bottom: double #FFFFFF;
}

#choices {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  position: relative;
}

#correct-answer {
  font-size: 24px;
  color: red;
  margin-bottom: 10px;
  text-align: center;
}

#search-bar-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

#search-bar {
  width: 300px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 24px;
  font-family: 'Minecraft', sans-serif;
}

#dropdown {
  position: absolute;
  top: 52px;
  left: 0;
  width: 300px;
  max-height: 200px;
  overflow-y: auto;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: none;
  z-index: 1;
}

.dropdown-content div {
  padding: 12px;
  cursor: pointer;
  font-size: 24px;
}

.dropdown-content div:hover {
  background-color: #f1f1f1;
}

#buttons-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

#submit-button, #continue-button, #skip-button {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
  font-size: 24px;
  font-family: 'Minecraft', sans-serif;
}

#submit-button:hover, #continue-button:hover, #skip-button:hover {
  background-color: #45a049;
}

#continue-button {
  width: 100%;
}

#back-to-menu-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background-color: #FF6347;
  color: white;
  cursor: pointer;
  font-size: 18px;
  font-family: 'Minecraft', sans-serif;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 0 2px 0 #000;
  transition: background-color 0.3s, box-shadow 0.3s;
  text-align: center;
  white-space: nowrap;
  width: 150px;
  margin-top: 10px;
  align-self: center;
}

#back-to-menu-button:hover {
  background-color: #FF4500;
  box-shadow: 0 4px 0 #000;
}

#volume-toggle {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: #8b8b8b;
  border: 2px solid #000;
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 2px 0 #000;
  transition: background-color 0.3s, box-shadow 0.3s;
}

#volume-toggle:hover {
  background-color: #a9a9a9;
  box-shadow: 0 4px 0 #000;
}

#volume-icon {
  width: 24px;
  height: 24px;
}

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

.shake {
  animation: shake 0.5s;
}

@media (max-width: 768px) {
  body {
    font-size: 18px;
  }

  #main-menu-logo {
    width: 400px;
  }

  #random-phrase {
    bottom: 10px;
    right: 10px;
    transform: rotate(-25deg);
  }

  #logo {
    width: 300px;
  }

  #main-content {
    margin-top: 10px;
  }

  #score-container {
    font-size: 18px;
  }

  #craft-table {
    grid-template-columns: repeat(3, 64px);
    grid-template-rows: repeat(3, 64px);
  }

  .gridCell {
    width: 64px;
    height: 64px;
  }

  .arrow {
    font-size: 64px;
  }

  #result {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }

  #search-bar {
    width: 200px;
    font-size: 18px;
  }

  #dropdown {
    width: 200px;
  }

  #submit-button, #continue-button, #skip-button {
    font-size: 18px;
    padding: 8px 16px;
  }
}
