/* ===================================
   TOKEN UPLOAD & IMAGE EDITOR
   =================================== */

/* OVERLAY - Dark background behind modal */
.token-upload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 15000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.token-upload-overlay.hidden {
  display: none;
}

/* MODAL CONTAINER */
.token-upload-modal {
  background: rgba(10, 10, 10, 0.98);
  border: 2px solid #0ff;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  font-family: "AstroSpace", Helvetica, Arial, sans-serif;
  color: #0ff;
}

/* MODAL TITLE */
.token-upload-title {
  font-size: 22px;
  text-align: center;
  margin-bottom: 25px;
  color: #0ff;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* FILE UPLOAD SECTION */
.token-upload-section {
  margin-bottom: 25px;
}

/* DROPZONE */
.token-dropzone {
  border: 3px dashed #0ff;
  border-radius: 12px;
  padding: 50px 30px;
  text-align: center;
  background: rgba(0, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.token-dropzone:hover,
.token-dropzone.drag-over {
  background: rgba(0, 255, 255, 0.15);
  border-color: #fff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
  transform: scale(1.02);
}

.token-dropzone-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.7;
}

.token-dropzone-text {
  font-size: 16px;
  margin-bottom: 10px;
  color: #0ff;
}

.token-dropzone-subtext {
  font-size: 13px;
  color: rgba(0, 255, 255, 0.6);
  margin-bottom: 15px;
}

.token-browse-btn {
  background: rgba(0, 255, 255, 0.15);
  border: 2px solid #0ff;
  color: #0ff;
  padding: 10px 25px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "AstroSpace", Helvetica, Arial, sans-serif;
  font-size: 14px;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.token-browse-btn:hover {
  background: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  transform: translateY(-2px);
}

.token-file-input {
  display: none;
}

/* ERROR MESSAGE */
.token-error-message {
  color: #ff4444;
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  display: none;
}

.token-error-message.show {
  display: block;
}

/* IMAGE EDITOR SECTION */
.token-editor-section {
  display: none;
}

.token-editor-section.active {
  display: block;
}

.token-editor-container {
  margin-bottom: 20px;
}

/* EDITOR PREVIEW - Shows circular crop */
.token-editor-preview {
  width: 300px;
  height: 300px;
  margin: 0 auto 20px;
  border: 3px solid #0ff;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.5),
              inset 0 0 20px rgba(0, 255, 255, 0.1);
  cursor: move;
}

.token-editor-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ZOOM CONTROLS */
.token-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.token-zoom-btn {
  background: rgba(0, 255, 255, 0.15);
  border: 2px solid #0ff;
  color: #0ff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: monospace;
  font-weight: bold;
}

.token-zoom-btn:hover {
  background: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  transform: scale(1.1);
}

.token-zoom-btn:active {
  transform: scale(0.95);
}

.token-zoom-label {
  color: rgba(0, 255, 255, 0.8);
  font-size: 14px;
  min-width: 80px;
  text-align: center;
}

/* INSTRUCTIONS */
.token-editor-instructions {
  text-align: center;
  font-size: 12px;
  color: rgba(0, 255, 255, 0.6);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* MODAL BUTTONS */
.token-modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.token-modal-btn {
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "AstroSpace", Helvetica, Arial, sans-serif;
  font-size: 14px;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid;
  min-width: 120px;
}

.token-modal-btn.finalize {
  background: rgba(0, 255, 255, 0.2);
  border-color: #0ff;
  color: #0ff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
  animation: pulse-glow 2s infinite;
}

.token-modal-btn.finalize:hover {
  background: rgba(0, 255, 255, 0.35);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
  transform: translateY(-2px);
}

.token-modal-btn.cancel {
  background: rgba(100, 100, 100, 0.15);
  border-color: #888;
  color: #aaa;
}

.token-modal-btn.cancel:hover {
  background: rgba(100, 100, 100, 0.3);
  border-color: #aaa;
  color: #ccc;
  transform: translateY(-2px);
}

.token-modal-btn:active {
  transform: translateY(0) scale(0.98);
}

/* PULSE ANIMATION FOR FINALIZE BUTTON */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.7);
  }
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .token-upload-modal {
    width: 95%;
    padding: 20px;
  }
  
  .token-editor-preview {
    width: 250px;
    height: 250px;
  }
  
  .token-modal-buttons {
    flex-direction: column;
  }
  
  .token-modal-btn {
    width: 100%;
  }
}
