/* Custom global styles for Educate app */
/* Reset and global improvements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Inter", -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;
  line-height: 1.6;
  background: #0a0a0a;
  color: white;
}

/* Ensure video backgrounds work properly */
video {
  width: 100%;
  height: 100%;
}

/* Smooth transitions for all elements */
* {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
}

/* Selection styling */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: white;
}

::-moz-selection {
  background: rgba(139, 92, 246, 0.3);
  color: white;
}

/* Focus styles */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.6);
  outline-offset: 2px;
}

/* Floating animation keyframes */
@keyframes float {
  0%, 100% { 
    transform: translateY(0px);
  }
  50% { 
    transform: translateY(-20px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
  }
}

/* Gradient text animation */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #065a60;
}

/* Dark mode scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #1a1a1a;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #065a60;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #006466;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Apply fade in animation to main content */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Custom button hover effects */
.custom-button-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-button-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Improved focus states for accessibility */
button:focus,
.MuiButton-root:focus {
  outline: 2px solid #006466;
  outline-offset: 2px;
}

/* High contrast for better readability */
.high-contrast {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Utility classes for spacing */
.section-padding {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 2rem 0;
  }
}

.container-spacing {
  padding: 0 1.5rem;
}

@media (max-width: 600px) {
  .container-spacing {
    padding: 0 1rem;
  }
}

/* Custom card hover effect */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 100, 102, 0.15);
}

/* Loading spinner (if needed) */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 100, 102, 0.3);
  border-radius: 50%;
  border-top-color: #006466;
  animation: spin 1s ease-in-out infinite;
}

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

/* Print styles */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .no-print {
    display: none !important;
  }
}
