/* ===== NPC SELECTION POPUP STYLES ===== */
.npc-selection-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10005;
  display: none;
  align-items: center;
  justify-content: center;
  animation: popupFadeIn 0.3s ease;
}

.npc-selection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.npc-selection-content {
  position: relative;
  background: linear-gradient(rgba(123, 146, 160, 0.4), rgba(199, 191, 119, 0.2)), url('/assets/npcbackground.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.3s ease;
  text-align: center;
}

.npc-selection-content h3 {
  margin: 0 0 25px 0;
  font-size: 24px;
  font-weight: 700;
  color: #e9ebf0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.npc-selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.npc-option {
  background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.95)), url('/assets/npcscroll.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 3px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.npc-option:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.npc-option:active {
  transform: translateY(-4px);
}

.npc-option-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid #f1f5f9;
  transition: all 0.3s ease;
}

.npc-option:hover .npc-option-image {
  transform: scale(1.1);
  border-color: #667eea;
}

.npc-option h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
}

.npc-option p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.npc-selection-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ef4444;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.npc-selection-close:hover {
  background: #dc2626;
  transform: scale(1.1);
}

@keyframes popupFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Mobile Responsive for NPC Selection */
@media (max-width: 600px) {
  .npc-selection-content {
    padding: 20px;
    max-width: 95%;
  }
  
  .npc-selection-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .npc-option {
    padding: 15px;
  }
  
  .npc-option-image {
    width: 60px;
    height: 60px;
  }
  
  .npc-selection-content h3 {
    font-size: 20px;
    margin-bottom: 20px;
  }
}
