/* Draggable Modal Styles */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 4999;
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.draggable-modal {
  position: fixed;
  background: #0f3460;
  /* Match game dark blue */
  border: 2px solid #f39c12;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(243, 156, 18, 0.4);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  max-width: 95vw;
  max-height: 90vh;
  color: #eee;
  /* Light text */
}

.draggable-modal.dragging {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(243, 156, 18, 0.6);
  transform: scale(1.01);
}

.draggable-modal.minimized .draggable-modal-content {
  display: none;
}

/* Header */
.draggable-modal-header {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(243, 156, 18, 0.3);
}

.draggable-modal-header:hover {
  background: linear-gradient(135deg, #f5a623 0%, #e88e2c 100%);
  cursor: grab;
}

.draggable-modal-title {
  margin: 0;
  font-size: 1.2em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex: 1;
}

.draggable-modal-header-buttons {
  display: flex;
  gap: 8px;
}

.modal-header-button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.modal-header-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.modal-header-button.close-button:hover {
  background: #e74c3c;
  transform: rotate(90deg) scale(1.1);
}

.modal-header-button.minimize-button:hover {
  background: #3498db;
}

/* Content */
.draggable-modal-content {
  padding: 20px;
  max-height: calc(90vh - 60px);
  /* Subtract header height */
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  background: #0f3460;
  /* Dark blue background */
}

/* Custom scrollbar */
.draggable-modal-content::-webkit-scrollbar {
  width: 10px;
}

.draggable-modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.draggable-modal-content::-webkit-scrollbar-thumb {
  background: #f39c12;
  border-radius: 5px;
}

.draggable-modal-content::-webkit-scrollbar-thumb:hover {
  background: #e67e22;
}

/* Animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.draggable-modal {
  animation: modalFadeIn 0.3s ease;
}

/* All modals are dark by default to match game theme */