/* Mobile Device Specific Styles */
.mobile-device {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.mobile-device .card-panel {
  padding: 1.5rem;
}

.mobile-device .icon-login {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
}

.mobile-device .marquee-container {
  font-size: 0.9rem;
  padding: 12px 15px;
}

/* Enhanced Mobile-First Responsive Design */
* {
  box-sizing: border-box;
}

/* Mobile Performance Optimization */
html {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
}

/* Modern Navbar */
.navbar {
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 1.3rem;
}

/* Responsive Container */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Enhanced Cards */
.card-panel {
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  /* Hardware acceleration for mobile */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.card-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.card-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Icon Improvements */
.icon-login {
  width: 70px;
  height: 70px;
  margin-bottom: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  /* Hardware acceleration for mobile */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

.icon-login:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Marquee Modern Style */
.marquee-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.marquee-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Mobile Responsive Breakpoints */
@media (max-width: 768px) {
  .main-container {
    padding: 15px;
  }
  
  .card-panel {
    padding: 1.5rem;
    margin-bottom: 20px;
  }
  
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .icon-login {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .marquee-container {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .main-container {
    padding: 10px;
  }
  
  .card-panel {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .icon-login {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  .card-panel:hover {
    transform: none;
  }
  
  .card-panel:active {
    transform: scale(0.98);
  }
  
  .icon-login:hover {
    transform: none;
  }
  
  .icon-login:active {
    transform: scale(0.95);
  }
}

/* Enhanced Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0d6efd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .icon-login {
    filter: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  }
  
  .card-panel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  
  .navbar {
    background: rgba(0, 0, 0, 0.1) !important;
  }
}

/* Mobile Input Focus Fix */
input[type="text"], input[type="email"], input[type="password"], 
input[type="tel"], input[type="number"], textarea, select {
  font-size: 16px; /* Prevent zoom on iOS */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Prevent iOS zoom on input focus */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
  input[type="text"], input[type="email"], input[type="password"], 
  input[type="tel"], input[type="number"], textarea, select {
    font-size: 16px;
  }
}

/* Better mobile button styling */
.btn {
  min-height: 44px; /* Apple's recommended touch target size */
  padding: 12px 24px;
  font-size: 16px;
  line-height: 1.4;
}

footer {
  background: #0d6efd;
  color: #fff;
  margin-top: 40px;
  padding: 20px 0 10px 0;
}

footer .social-icons {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

footer .social-icons a {
  color: #fff;
  margin: 0 10px;
  transition: color 0.3s;
}

footer .social-icons a:hover {
  color: #ffe066;
}

@media (max-width: 768px) {
  .icon-login {
    width: 60px;
    height: 60px;
  }
  .marquee-container {
    font-size: 0.95rem;
  }
  .card-panel {
    padding: 0.7rem;
  }
}
