/* Enhanced Modern Styling for AcademicZar */

html {
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  font-size: 16px;
}

/* Base responsive container */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* Custom scrollbar - hidden on mobile for better UX */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1D4ED8, #1E40AF);
}

@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 3px;
  }
}

/* Responsive utility classes */
.responsive-container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

/* Responsive spacing utilities */
.responsive-p {
  padding: 1rem;
}

.responsive-m {
  margin: 1rem;
}

@media (min-width: 768px) {
  .responsive-p {
    padding: 1.5rem;
  }
  
  .responsive-m {
    margin: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .responsive-p {
    padding: 2rem;
  }
  
  .responsive-m {
    margin: 2rem;
  }
}

/* Responsive flex utilities */
.responsive-flex {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .responsive-flex {
    flex-direction: row;
  }
}

/* Enhanced animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

.float-animation:nth-child(2) {
  animation-delay: 1s;
}

.float-animation:nth-child(3) {
  animation-delay: 2s;
}

/* Glow effect for important buttons */
.glow-effect {
  animation: glow 2s ease-in-out infinite alternate;
}

/* Shimmer effect for loading states */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Enhanced card hover effects */
.card-hover-effect {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-hover-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.card-hover-effect:hover::before {
  left: 100%;
}

/* Gradient text effects */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-blue {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced form styling */
.form-input {
  transition: all 0.3s ease;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form-input:hover {
  border-color: #94a3b8;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3B82F6;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notification styles */
.notification {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Small screens (mobile first) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
  }
  
  section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .py-24 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .py-20 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  
  .card {
    padding: 1.25rem !important;
  }
}

/* Medium screens (tablets) */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.1rem !important;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    text-align: center;
    margin-bottom: 0.75rem;
  }
  
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  h1 {
    font-size: 2rem !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
  }
  
  h3 {
    font-size: 1.5rem !important;
  }
  
  .grid {
    grid-template-columns: 1fr !important;
  }
  
  .flex-col-reverse-mobile {
    flex-direction: column-reverse;
  }
  
  .w-full-mobile {
    width: 100% !important;
  }
  
  .px-4-mobile {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .py-8-mobile {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .text-center-mobile {
    text-align: center !important;
  }
  
  .mx-auto-mobile {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .hidden-mobile {
    display: none !important;
  }
  
  .block-mobile {
    display: block !important;
  }
  
  /* Improved spacing for mobile */
  .mb-16 {
    margin-bottom: 2.5rem !important;
  }
  
  .gap-8 {
    gap: 1rem !important;
  }
  
  .space-y-2 > * + * {
    margin-top: 0.75rem !important;
  }
}

/* Large screens (laptops and desktops) */
@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #f8fafc;
    --secondary: #e2e8f0;
    --surface: #1e293b;
    --light: #0f172a;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* 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;
}

/* Focus indicators */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid #000;
  }
  
  .btn-primary {
    border: 2px solid #000;
  }
}

/* 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;
  }
}