/* Executive Skills Assessment Custom Styles */

/* Base styles */
body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

/* Enhanced form styling */
.form-section {
  transition: all 0.3s ease;
}

.form-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Radio button enhancements */
input[type="radio"] {
  transform: scale(1.2);
  margin-right: 12px;
}

input[type="radio"]:checked {
  accent-color: #4f46e5;
}

/* Progress indicator */
.pulse-ready {
  animation: pulseReady 2s ease-in-out infinite;
}

@keyframes pulseReady {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Enhanced focus styles */
input:focus, 
select:focus, 
button:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Question highlighting */
.question-highlight {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, transparent 100%);
  border-left: 4px solid #4f46e5;
  padding-left: 16px;
  margin-left: -20px;
}

/* Smooth animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from { 
    transform: translateX(100px); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

/* Loading animations */
.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Enhanced progress bar */
#progressBar {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .grid.grid-cols-7 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .question-container {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .grid.grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .text-4xl {
    font-size: 2.25rem;
  }
}

/* Print styles for reports */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  .bg-gradient-to-br {
    background: white !important;
  }
  
  .shadow-lg {
    box-shadow: none !important;
    border: 1px solid #e5e7eb;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-gray-50 {
    background-color: white;
    border: 1px solid black;
  }
  
  .text-gray-600 {
    color: black;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Enhanced button states with gamification */
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

button:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Gamification enhancements */
.question-highlight {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 50%, transparent 100%);
  border-left: 4px solid #4f46e5;
  padding-left: 16px;
  margin-left: -20px;
  animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
  0% { background: linear-gradient(90deg, rgba(79, 70, 229, 0.2) 0%, transparent 100%); }
  50% { background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, transparent 100%); }
  100% { background: linear-gradient(90deg, rgba(79, 70, 229, 0.05) 0%, transparent 100%); }
}

/* Enhanced radio button interactions */
input[type="radio"]:checked + div {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  transform: scale(1.02);
}

label:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

label:active {
  transform: translateY(0) scale(0.98);
}

/* Achievement animations */
.achievement-bounce {
  animation: achievementBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes achievementBounce {
  0% { transform: translateX(100%) scale(0.8); opacity: 0; }
  60% { transform: translateX(-5%) scale(1.1); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

/* Progress ring enhancement */
#progressRing {
  filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.4));
}

/* Floating elements */
.float-animation {
  animation: floatGentle 3s ease-in-out infinite;
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Success button enhancement */
.pulse-ready {
  background: linear-gradient(45deg, #4f46e5, #7c3aed, #ec4899, #f59e0b);
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite, pulseReady 2s ease-in-out infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Sound toggle button */
#soundToggle:hover {
  transform: scale(1.1) rotate(5deg);
}

#soundToggle:active {
  transform: scale(0.95) rotate(-2deg);
}

/* Particle effects */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 4s linear infinite;
}

@keyframes particleFloat {
  0% { 
    opacity: 0; 
    transform: translateY(100vh) scale(0); 
  }
  10% { 
    opacity: 1; 
    transform: translateY(90vh) scale(1); 
  }
  90% { 
    opacity: 1; 
    transform: translateY(10vh) scale(1); 
  }
  100% { 
    opacity: 0; 
    transform: translateY(0) scale(0); 
  }
}

/* Form section hover effects */
.form-section:hover .bg-indigo-100 {
  background-color: #c7d2fe;
  transform: scale(1.05);
  transition: all 0.2s ease;
}

/* Enhanced submit button states */
.submit-disabled {
  background: linear-gradient(45deg, #9ca3af, #6b7280);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.submit-ready {
  background: linear-gradient(45deg, #10b981, #059669);
  cursor: pointer;
  animation: readyPulse 2s ease-in-out infinite;
}

@keyframes readyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

/* Mobile enhancements */
@media (max-width: 768px) {
  .achievement-bounce {
    animation: achievementBounceMobile 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  
  @keyframes achievementBounceMobile {
    0% { transform: translateY(100%) scale(0.8); opacity: 0; }
    60% { transform: translateY(-5%) scale(1.05); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
  }
}

/* Form validation styles */
.invalid {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.valid {
  border-color: #10b981;
  background-color: #f0fdf4;
}

/* Tooltip styles */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1000;
}

.tooltip:hover::after {
  opacity: 1;
}