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

.craft-modal {
  background: #0f1115;
  border: 1px solid rgba(0, 210, 255, 0.3);
  width: 90%;
  max-width: 400px; /* Трохи вужча для компактності */
  border-radius: 12px;
  position: relative;
  padding: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
  animation: modalSlideUp 0.3s ease-out;
  color: #fff;
}

/* Header Section */
.modal-header-compact {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.item-icon-box {
  width: 70px;
  height: 70px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 210, 255, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 210, 255, 0.1);
}

.item-icon-box img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.item-info-title h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
  color: #00d2ff;
  text-transform: uppercase;
}

.item-tag {
  font-size: 0.65rem;
  color: #888;
  letter-spacing: 1px;
}

/* Sections */
.details-section {
  margin-bottom: 15px;
}

.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #00d2ff;
  margin-bottom: 8px;
  opacity: 0.8;
  display: block;
}

.description-text {
  font-size: 0.85rem;
  color: #aaa;
  font-style: italic;
  line-height: 1.4;
}

/* Resource List */
.res-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.res-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.res-row:last-child {
  border-bottom: none;
}

.res-name {
  font-size: 0.9rem;
  color: #ccc;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.val-bad {
  color: #ff4444;
}
.val-good {
  color: #00ff88;
}

/* Progress & Outcome */
.outcome-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-top: 10px;
  color: #888;
}

.outcome-bar strong {
  color: #fff;
}

/* Buttons */
.btn-craft-action {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px;
  text-transform: uppercase;
}

.btn-primary-craft {
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid #00d2ff;
  color: #00d2ff;
}

.btn-primary-craft:hover:not(:disabled) {
  background: #00d2ff;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.btn-primary-craft:disabled {
  border-color: #444;
  color: #444;
  cursor: not-allowed;
}

.close-btn-top {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #555;
  font-size: 20px;
  cursor: pointer;
}

.close-btn-top:hover {
  color: #fff;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(15px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
