/* Chemistry LMS Custom Styles */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth animations */
* {
  transition: all 0.2s ease-in-out;
}

/* Custom button styles */
button {
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Modal backdrop blur */
#take-exam-modal,
#create-exam-modal,
#ai-generate-modal {
  backdrop-filter: blur(4px);
}

/* Question cards hover effect */
.border.hover\:shadow-lg:hover {
  transform: translateY(-2px);
}

/* Input focus styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Radio button custom styling */
input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Timer pulse animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

#timer {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Score percentage color classes */
.score-high {
  color: var(--success-color);
}

.score-medium {
  color: var(--warning-color);
}

.score-low {
  color: var(--danger-color);
}

/* Card shadow on hover */
.card-hover:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Success/Error message animations */
@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#auth-message {
  animation: slideIn 0.3s ease-out;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #create-exam-modal .bg-white,
  #ai-generate-modal .bg-white,
  #take-exam-modal .bg-white {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Print styles for exam export */
@media print {
  nav,
  button,
  #logout-btn,
  #nav-menu {
    display: none;
  }
  
  body {
    background: white;
  }
}
