/**
 * Integration+ Custom Styles
 */

/* Animations */
@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Smooth transitions */
* {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Focus styles */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-left-color: #0055A4;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Progress bar */
.progress-bar {
  height: 8px;
  background: linear-gradient(to right, #0055A4, #3B82F6);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Card hover effects */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-blue {
  background-color: #DBEAFE;
  color: #1E40AF;
}

.badge-green {
  background-color: #D1FAE5;
  color: #065F46;
}

.badge-yellow {
  background-color: #FEF3C7;
  color: #92400E;
}

.badge-red {
  background-color: #FEE2E2;
  color: #991B1B;
}

.badge-purple {
  background-color: #EDE9FE;
  color: #5B21B6;
}

/* Button variants */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: #0055A4;
  color: white;
}

.btn-primary:hover {
  background-color: #003d7a;
}

.btn-secondary {
  background-color: #6B7280;
  color: white;
}

.btn-secondary:hover {
  background-color: #4B5563;
}

.btn-success {
  background-color: #10B981;
  color: white;
}

.btn-success:hover {
  background-color: #059669;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid #0055A4;
  color: #0055A4;
}

.btn-outline:hover {
  background-color: #0055A4;
  color: white;
}

/* Question card styles */
.question-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.option-card {
  border: 2px solid #E5E7EB;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-card:hover {
  border-color: #0055A4;
  background-color: #F0F9FF;
}

.option-card.selected {
  border-color: #0055A4;
  background-color: #DBEAFE;
}

.option-card.correct {
  border-color: #10B981;
  background-color: #D1FAE5;
}

.option-card.incorrect {
  border-color: #EF4444;
  background-color: #FEE2E2;
}

/* Stats card */
.stat-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: #6B7280;
}

/* Module card */
.module-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.module-card .module-header {
  padding: 1.5rem;
  border-bottom: 1px solid #E5E7EB;
}

.module-card .module-body {
  padding: 1.5rem;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .question-card {
    padding: 1.5rem;
  }

  .stat-card .stat-value {
    font-size: 2rem;
  }
}

/* PWA Splash Screen */
.splash-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0055A4, #3B82F6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.splash-screen .logo {
  font-size: 6rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles will be added in future versions */
}
