* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

.search-container {
    /* padding-top: 11px; */
}

.donation {
    font-size: 12px;
}

body {
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  color: #333;
}

h2 {
  color: #444;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #777;
}

.tab-btn.active {
  color: #4285f4;
  border: 2px solid #4285f4;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input, select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

select[multiple] {
  height: 113px;
  padding: 5px;
}

select[multiple] option {
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 3px;
}

select[multiple] option:hover {
  background-color: #f0f0f0;
}

button {
  background-color: #4285f4;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-right: 5px;
}

button:hover, button.active:hover {
  background-color: #3367d6;
  color: white;
}

.results-container, .resources-list, .recipes-list {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.resource-item, .recipe-item {
  margin-bottom: 10px;
  padding: 10px;
  background-color: white;
  border: 1px solid #eee;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.resource-info, .recipe-info {
  display: flex;
  width: 100%;
  align-items: center;
}

.recipe-title {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.resource-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.resource-icon-small {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.ingredient-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.ingredient-select {
  flex-grow: 1;
}

.ingredient-amount {
  width: 80px;
}

.remove-btn {
  background-color: #f44336;
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-result {
  display: flex;
  align-items: center;
  padding: 5px 0;
  gap: 10px;
  justify-content: space-between;
}

.resource-amount {
  /* font-weight: bold; */
  font-size: 30px;
}

.image-preview-container {
  margin-top: 10px;
  text-align: center;
}

#image-preview {
  max-width: 100px;
  max-height: 100px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px;
}

/* Option items with images */
.resource-option {
  display: flex;
  align-items: center;
}

.resource-option img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Item actions */
.item-actions {
  display: flex;
  gap: 5px;
}

.edit-btn {
  background-color: #ffc107;
}

.delete-btn {
  background-color: #f44336;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 10px;
}

#cancel-edit-btn, #cancel-recipe-edit-btn {
  background-color: #999;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
  width: 400px;
  max-width: 90%;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  gap: 10px;
}

#modal-confirm-btn {
  background-color: #f44336;
}

#modal-cancel-btn {
  background-color: #999;
}

.rarity {
  text-transform: capitalize;
  padding: 3px 10px;
  border-radius: 7px;
  color: white;
  font-weight: bold;
}

.common {
  background-color: #747474;
}

.uncommon {
  background-color: #398d07;
}

.rare {
  background-color: #0097cf;
}

.epic {
  background-color: #7c2bbb;
}

.legendary {
  background-color: #e19f00;
}

.type {
  text-transform: capitalize;
  padding: 3px 10px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  background-color: #ce4949;
}

.biome {
  text-transform: capitalize;
  padding: 3px 10px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  background-color: #674d3b;
}

.operation-btn {
  background-color: #4285f4;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.craft-amount {
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

ul {
  list-style-type: none;
  padding-left: 20px;
}

.recipe-info .recipe-title .resource-icon {
  width: 100px;
  height: 100px;
}

.recipe-info .recipe-title {
  font-size: 24px;
}

.resource-properties-container {
  display: flex;
  flex-direction: column;
  gap:5px;
  align-items: flex-start;
}

.resource-properties {
  display: flex;
  gap:5px;
  font-size: 10px;
}

.crafted-in {
  margin-left: 10px;
}

.recipe-title-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.recipes-list .recipe-info {
  flex-direction: column;
  align-items: flex-start;
}

.recipes-list .item-actions {
  display: block;
}

.crafted-in-container, .ingredients-container {
  width: 100%;
}

.craft-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.resource-result {
  display: flex;
  align-items: center;
  padding: 5px 0;
  gap: 10px;
  justify-content: space-between;
}

.resource-container {
  display: flex;
  align-items: center;
  padding: 5px 0;
  gap: 10px;
  min-width: 340px;
}

.receipt-result {
  margin-bottom: 10px;
  padding: 10px;
  background-color: white;
  border: 1px solid #eee;
  border-radius: 4px;
}

.logo-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.footer-container {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hidden {
  display: none;
}

.admin-container {
  display: none;
  padding-bottom: 15px;
}

.base-resource-result, .ingredients-resource-result {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 650px) {
  .resource-result {
    flex-direction: column;
  }

  .resource-container {
    min-width: 280px;
  }
}