.craft-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.craft-modal {
  background: #151921;
  border: 1px solid #00ccff;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  padding: 24px;
  box-shadow: 0 0 30px rgba(0, 204, 255, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  color: #00ccff;
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
}

.close-x {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.requirements-section,
.outcome-section {
  margin-bottom: 25px;
}

.res-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 6px;
}

.res-item {
  display: flex;
  justify-content: space-between;
  color: #e0e0e0;
}

.btn-start-craft {
  width: 100%;
  padding: 12px;
  background: #00ccff;
  border: none;
  border-radius: 6px;
  color: #000;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 10px;
  transition: 0.2s;
}

.btn-start-craft:hover {
  background: #0099cc;
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
}

.btn-cancel {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  border-radius: 6px;
  cursor: pointer;
}

.active-craft-panel {
  background: rgba(0, 204, 255, 0.1);
  border: 1px solid var(--primary-color);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.craft-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
  transition: width 1s linear; /* Плавне заповнення */
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 5px rgba(0, 204, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.4);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 204, 255, 0.2);
  }
}

/* Стани інгредієнтів */
.res-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin-bottom: 5px;
  border-left: 4px solid transparent;
}

.res-item.enough {
  border-left-color: #44ff44;
}

.res-item.not-enough {
  border-left-color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
}

/* Кольори значень */
.val-red {
  color: #ff4444;
  font-weight: bold;
}
.val-green {
  color: #44ff44;
}
.icon-red {
  color: #ff4444;
}
.icon-green {
  color: #44ff44;
}

.res-quantity-info {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

/* Кнопка */
.btn-start-craft {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: bold;
  transition: 0.2s;
}

.btn-start-craft.disabled {
  background: #444 !important;
  opacity: 0.6;
  cursor: not-allowed !important;
}

.btn-start-craft:not(.disabled):hover {
  background: #218838;
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
}
