/* Global 3D Button Class - Primary Style */
.btn-3d, .button {
    position: relative;
    padding: 14px 28px;
    background: linear-gradient(145deg, #004aad, #0d5bbf);
    border: 3px solid #003d8f;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    transform: translateZ(0) translateY(0);
    box-shadow:
        0 8px 0 #003d8f,
        0 12px 20px rgba(0, 74, 173, 0.25);
    user-select: none;
    outline: none;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-3d:hover, .button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 0 #003d8f,
        0 16px 25px rgba(0, 74, 173, 0.3);
}

.btn-3d:active, .button:active {
    transform: translateY(3px) !important;
    box-shadow:
        0 5px 0 #003d8f,
        0 6px 12px rgba(0, 74, 173, 0.2) !important;
    transition: all 0.05s ease !important;
}

/* Secondary/Light 3D Button */
.btn-3d-light {
    position: relative;
    padding: 14px 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(10px);
    border: 3px solid rgba(0, 74, 173, 0.3);
    border-radius: 25px;
    color: #004aad;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    transform: translateZ(0) translateY(0);
    box-shadow:
        0 8px 0 rgba(200, 200, 200, 0.8),
        0 12px 20px rgba(0, 0, 0, 0.15);
    user-select: none;
    outline: none;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-3d-light:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 0 rgba(200, 200, 200, 0.8),
        0 16px 25px rgba(0, 0, 0, 0.2);
}

.btn-3d-light:active {
    transform: translateY(3px) !important;
    box-shadow:
        0 5px 0 rgba(200, 200, 200, 0.8),
        0 6px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.05s ease !important;
}
  
  .action-button {
    padding: 12px 24px;
    background-color: #4CAF50;
    color: white;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
  }
  
  .action-button:hover {
    background-color: #45a049;
    transform: scale(1.05);
  }

  /* 3D Submit Button Styling */
  .submit-button {
    position: relative !important;
    padding: 16px 40px; 
    background: linear-gradient(145deg, #5ECF62, #4CAF50, #45a049) !important;
    color: white;
    font-size: 20px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.15s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    
    /* Enhanced 3D effect with multiple shadows */
    box-shadow: 
      0 1px 0 rgba(255, 255, 255, 0.3) inset,  /* Top highlight */
      0 -1px 0 rgba(0, 0, 0, 0.2) inset,  /* Bottom inner shadow */
      0 6px 0 #357a38,  /* Main 3D edge */
      0 7px 0 #2d6630,  /* Secondary edge for depth */
      0 8px 2px rgba(0, 0, 0, 0.1),  /* Blur edge */
      0 10px 20px rgba(0, 0, 0, 0.15),  /* Ambient shadow */
      inset 0 -3px 8px rgba(0, 0, 0, 0.15);  /* Inner depth */
    
    transform-style: preserve-3d;
    transform: translateY(0) perspective(500px);
    
    /* Glossy overlay effect */
    overflow: hidden;
  }
  
  /* Glossy shine effect */
  .submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.2) 40%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0.2) 60%,
      transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
  }
  
  /* Glass-like top reflection */
  .submit-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      transparent 100%
    );
    border-radius: 12px 12px 0 0;
    pointer-events: none;
  }

  /* Hover state - lift up with enhanced effects */
  .submit-button:hover:not(:disabled):not(.loading) {
    transform: translateY(-3px) perspective(500px) rotateX(-2deg);
    box-shadow: 
      0 1px 0 rgba(255, 255, 255, 0.4) inset,
      0 -1px 0 rgba(0, 0, 0, 0.2) inset,
      0 9px 0 #357a38,
      0 10px 0 #2d6630,
      0 11px 3px rgba(0, 0, 0, 0.15),
      0 15px 30px rgba(0, 0, 0, 0.2),
      inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    
    background: linear-gradient(145deg, #6EDF72, #5ECF62, #4CAF50) !important;
  }
  
  /* Trigger shine effect on hover */
  .submit-button:hover::before {
    left: 100%;
    transition: left 0.5s ease;
  }

  /* Active/Click state - pressed down effect */
  .submit-button:active:not(:disabled):not(.loading),
  .submit-button.clicked:not(:disabled):not(.loading) {
    transform: translateY(5px) perspective(500px) rotateX(0deg) !important;
    box-shadow: 
      0 1px 0 rgba(255, 255, 255, 0.2) inset,
      0 -1px 0 rgba(0, 0, 0, 0.3) inset,
      0 1px 0 #357a38,
      0 2px 0 #2d6630,
      0 3px 8px rgba(0, 0, 0, 0.25),
      inset 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    
    background: linear-gradient(145deg, #4CAF50, #45a049, #3d8b40) !important;
  }

  /* Click animation - matching answer boxes */
  .submit-button.clicked {
    animation: submitClickFeedback 0.15s ease-out;
  }

  @keyframes submitClickFeedback {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(0.98) translateY(4px); }
    100% { transform: scale(1) translateY(0); }
  }

  /* Disabled state */
  .submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: 
      0 3px 0 #999,
      0 4px 6px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #999, #777);
  }

  /* Loading state */
  .submit-button.loading {
    pointer-events: none;
    position: relative;
  }

  .submit-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  /* Success state */
  .submit-button.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 
      0 4px 0 #357a38,
      0 6px 10px rgba(76, 175, 80, 0.3);
  }

  /* Pulse animation for attention */
  .submit-button.pulse {
    animation: submitPulse 2s ease-in-out infinite;
  }

  @keyframes submitPulse {
    0%, 100% { 
      transform: scale(1) translateY(0);
      box-shadow: 
        0 6px 0 #357a38,
        0 8px 10px rgba(0, 0, 0, 0.2),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1);
    }
    50% { 
      transform: scale(1.02) translateY(-1px);
      box-shadow: 
        0 7px 0 #357a38,
        0 10px 15px rgba(0, 0, 0, 0.25),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1);
    }
  }
  
  .back-button {
    align-self: flex-start;
    margin-bottom: 20px;
    padding: 8px 16px;
    background-color: #f1f1f1;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .back-button:hover {
    background-color: #e0e0e0;
  }
  
  /* Completion action buttons */
  .completion-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
  }
  
  .retry-button {
    background-color: #2196F3;
    color: white;
  }
  
  .new-path-button {
    background-color: #4CAF50;
    color: white;
  }
  
  .home-button {
    background-color: #9E9E9E;
    color: white;
  }
  .mongo-save-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  }
  .back-button {
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 8px 16px;
  background-color: #f1f1f1;
  color: #333;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.action-button {
  padding: 12px 24px;
  background-color: #4CAF50;
  color: white;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}
