/* SMR Pilot Academy Authentication Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600&display=swap');

:root {
  --font-orbitron: "Orbitron", sans-serif;
  --font-exo2: "Exo 2", sans-serif;
  --auth-primary: #1e40af;
  --auth-secondary: #3b82f6;
  --auth-accent: #60a5fa;
  --auth-success: #10b981;
  --auth-error: #ef4444;
  --auth-warning: #f59e0b;
  --auth-dark: #0f172a;
  --auth-light: #f8fafc;
  --auth-glass: rgba(255, 255, 255, 0.1);
  --auth-glass-border: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-exo2);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Animation */
.auth-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.particle-system {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cloud-system {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(rgba(59,130,246,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
}

.horizon-line {
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.3), transparent);
  top: 70%;
}

/* Radar Animation */
.radar-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.4;
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.radar-large {
  width: 600px;
  height: 600px;
  border-color: rgba(34, 197, 94, 0.2);
  animation: radarRotate 20s linear infinite;
}

.radar-large::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(34, 197, 94, 0.4), transparent);
  transform: translateY(-50%);
  transform-origin: left center;
}

.radar-small {
  width: 400px;
  height: 400px;
  border-color: rgba(59, 130, 246, 0.15);
  animation: radarRotateReverse 30s linear infinite;
}

.radar-small::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.3), transparent);
  transform: translateY(-50%);
  transform-origin: left center;
}

/* Main Container */
.auth-container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 2rem;
}

/* Logo Section */
.auth-logo-section {
  text-align: center;
  margin: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 400px;
  width: 100%;
  padding: 0 1rem;
  flex: 0 0 auto;
}

.auth-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.5));
  animation: logoFloat 6s ease-in-out infinite;
}

.auth-title {
  font-family: var(--font-orbitron);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff, #60a5fa, #ffffff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: textShimmer 3s ease-in-out infinite;
}

.auth-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  letter-spacing: 0.2em;
  color: #cbd5e1;
}

/* Logo Link Styling */
.logo-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border-radius: 24px;
  padding: 1.25rem;
  overflow: hidden;
  backdrop-filter: blur(15px);
}

.logo-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.1) 0%, 
    rgba(96, 165, 250, 0.05) 50%, 
    rgba(59, 130, 246, 0.1) 100%);
  opacity: 0;
  border-radius: 20px;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.logo-link:hover::before {
  opacity: 1;
}

.logo-link:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 10px 40px rgba(59, 130, 246, 0.2),
    0 5px 20px rgba(59, 130, 246, 0.1);
}

.logo-link:hover .auth-logo {
  transform: scale(1.05) rotate(2deg);
  filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.6));
}

.logo-link:hover .auth-title {
  background-size: 150% 100%;
  animation: textShimmer 2s ease-in-out infinite;
}

.logo-link:hover .auth-subtitle {
  opacity: 1;
  color: #60a5fa;
  letter-spacing: 0.3em;
}

.logo-link:active {
  transform: translateY(-1px) scale(0.98);
  transition: all 0.1s ease;
}

.logo-link:focus {
  outline: 3px solid rgba(59, 130, 246, 0.6);
  outline-offset: 4px;
}

.logo-link:focus:not(:focus-visible) {
  outline: none;
}

/* Form Container */
.form-container {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.auth-form {
  background: var(--auth-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--auth-glass-border);
  border-radius: 24px;
  padding: 3rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-form.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  position: relative;
}

/* Form Header */
.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-title {
  font-family: var(--font-orbitron);
  font-size: 1.8rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.form-title i {
  color: var(--auth-accent);
  font-size: 1.5rem;
}

.form-subtitle {
  color: #cbd5e1;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Input Groups */
.input-group {
  margin-bottom: 1.5rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-accent);
  font-size: 1.1rem;
  z-index: 2;
  transition: color 0.3s ease;
}

.auth-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-family: var(--font-exo2);
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.auth-input:focus {
  border-color: var(--auth-accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.auth-input:focus + .input-focus-line {
  transform: scaleX(1);
}

.auth-input:focus ~ .input-icon {
  color: white;
}

.input-focus-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--auth-secondary), var(--auth-accent));
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--auth-accent);
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.remember-me {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.remember-me input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  margin-right: 0.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.remember-me input[type="checkbox"]:checked + .checkmark {
  background: var(--auth-secondary);
  border-color: var(--auth-secondary);
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.label-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.forgot-link {
  background: none;
  border: none;
  color: var(--auth-accent);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.forgot-link:hover {
  color: white;
  text-decoration: underline;
}

.terms-link {
  color: var(--auth-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.terms-link:hover {
  color: white;
  text-decoration: underline;
}

/* Buttons */
.auth-btn {
  position: relative;
  width: 100%;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
  color: white;
  box-shadow: 0 4px 25px rgba(30, 64, 175, 0.2);
  overflow: hidden;
}

.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.loader-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  position: relative;
  z-index: 2;
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Form Footer */
.form-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-footer p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.switch-form-btn {
  background: none;
  border: none;
  color: var(--auth-accent);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.switch-form-btn:hover {
  color: white;
}

/* Notifications */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  background: var(--auth-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--auth-glass-border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateX(400px);
  transition: transform 0.4s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.hidden {
  transform: translateX(400px);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notification-icon {
  font-size: 1.2rem;
}

.notification.success .notification-icon {
  color: var(--auth-success);
}

.notification.error .notification-icon {
  color: var(--auth-error);
}

.notification.warning .notification-icon {
  color: var(--auth-warning);
}

/* Mobile Responsive */

/* Tablet and Small Desktop */
@media (max-width: 1024px) {
  .auth-container {
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem;
  }
  
  .auth-logo-section {
    max-width: 300px;
    order: 1;
  }
  
  .form-container {
    order: 2;
    max-width: 450px;
    width: 100%;
  }
  
  .auth-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
  }
  
  .auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .auth-subtitle {
    font-size: 1rem;
  }
  
  .radar-large {
    width: 400px;
    height: 400px;
  }
  
  .radar-small {
    width: 300px;
    height: 300px;
  }
}

/* Mobile Landscape and Small Tablet */
@media (max-width: 768px) {
  .auth-container {
    padding: 1rem;
    gap: 1.5rem;
    min-height: 100vh;
    justify-content: flex-start;
    padding-top: 2rem;
  }
  
  .auth-logo-section {
    max-width: 280px;
  }
  
  .auth-form {
    padding: 2rem 1.5rem;
    border-radius: 20px;
    margin: 0;
  }
  
  .auth-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
  }
  
  .auth-title {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .auth-subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
  }
  
  .form-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }
  
  .form-subtitle {
    font-size: 0.85rem;
  }
  
  .auth-input {
    padding: 0.9rem 0.9rem 0.9rem 2.8rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .input-icon {
    left: 0.9rem;
    font-size: 1rem;
  }
  
  .password-toggle {
    right: 0.9rem;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .auth-btn {
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .radar-container {
    opacity: 0.2;
  }
  
  .radar-large {
    width: 300px;
    height: 300px;
  }
  
  .radar-small {
    width: 200px;
    height: 200px;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .auth-container {
    padding: 0.75rem;
    gap: 1rem;
    padding-top: 1rem;
  }
  
  .auth-logo-section {
    max-width: 100%;
    text-align: center;
  }
  
  .auth-form {
    padding: 1.5rem 1rem;
    border-radius: 16px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  .form-container {
    max-width: 100%;
    width: 100%;
  }
  
  .auth-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 0.75rem;
  }
  
  .auth-title {
    font-size: 1.5rem;
    line-height: 1.1;
    margin-bottom: 0.25rem;
  }
  
  .auth-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
  }
  
  .form-header {
    margin-bottom: 1.5rem;
  }
  
  .form-title {
    font-size: 1.2rem;
    flex-direction: column;
    gap: 0.25rem;
    line-height: 1.2;
  }
  
  .form-title i {
    font-size: 1.2rem;
  }
  
  .form-subtitle {
    font-size: 0.8rem;
  }
  
  .input-group {
    margin-bottom: 1.25rem;
  }
  
  .auth-input {
    padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    font-size: 16px;
    border-radius: 10px;
  }
  
  .input-icon {
    left: 0.8rem;
    font-size: 0.9rem;
  }
  
  .password-toggle {
    right: 0.8rem;
    font-size: 0.9rem;
  }
  
  .form-options {
    margin-bottom: 1.5rem;
    gap: 0.5rem;
  }
  
  .label-text {
    font-size: 0.8rem;
  }
  
  .forgot-link {
    font-size: 0.8rem;
  }
  
  .auth-btn {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
  }
  
  .form-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }
  
  .form-footer p {
    font-size: 0.85rem;
  }
  
  .notification {
    top: 1rem;
    right: 0.75rem;
    left: 0.75rem;
    transform: translateY(-100px);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .notification.show {
    transform: translateY(0);
  }
  
  .notification.hidden {
    transform: translateY(-100px);
  }
  
  .radar-container {
    display: none;
  }
  
  .grid-overlay {
    background-size: 30px 30px;
    opacity: 0.15;
  }
}

/* Very Small Mobile Screens */
@media (max-width: 375px) {
  .auth-container {
    padding: 0.5rem;
    padding-top: 0.5rem;
  }
  
  .auth-form {
    padding: 1.25rem 0.75rem;
    border-radius: 12px;
  }
  
  .auth-logo {
    width: 80px;
    height: 80px;
  }
  
  .auth-title {
    font-size: 1.3rem;
  }
  
  .form-title {
    font-size: 1.1rem;
  }
  
  .auth-input {
    padding: 0.7rem 0.7rem 0.7rem 2.2rem;
  }
  
  .input-icon {
    left: 0.7rem;
  }
  
  .password-toggle {
    right: 0.7rem;
  }
}

/* Ultra Small Screens */
@media (max-width: 320px) {
  .auth-container {
    padding: 0.25rem;
  }
  
  .auth-form {
    padding: 1rem 0.5rem;
  }
  
  .auth-logo {
    width: 70px;
    height: 70px;
  }
  
  .auth-title {
    font-size: 1.2rem;
  }
  
  .form-title {
    font-size: 1rem;
  }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .auth-container {
    flex-direction: row;
    gap: 1rem;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
  }
  
  .auth-logo-section {
    flex: 0 0 auto;
    max-width: 200px;
    text-align: center;
  }
  
  .auth-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 0.5rem;
  }
  
  .auth-title {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
  }
  
  .auth-subtitle {
    font-size: 0.7rem;
  }
  
  .form-container {
    flex: 1;
    max-width: 350px;
  }
  
  .auth-form {
    padding: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .form-header {
    margin-bottom: 1rem;
  }
  
  .form-title {
    font-size: 1rem;
  }
  
  .input-group {
    margin-bottom: 1rem;
  }
  
  .form-options {
    margin-bottom: 1rem;
  }
  
  .form-footer {
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

/* Animations */
@keyframes radarRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes radarRotateReverse {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes textShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* Particle animations */
@keyframes starAnimation {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.3) rotate(180deg);
  }
}

@keyframes glowAnimation {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1) translateY(0);
  }
  33% {
    opacity: 0.8;
    transform: scale(1.2) translateY(-10px);
  }
  66% {
    opacity: 0.5;
    transform: scale(0.9) translateY(5px);
  }
}

@keyframes sparkAnimation {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) rotate(180deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) rotate(360deg) scale(0);
  }
}

@keyframes nebulaAnimation {
  0%, 100% {
    opacity: 0.1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.1) rotate(180deg);
  }
}

@keyframes cloudDrift {
  0% {
    transform: translateX(-20%) translateY(0) rotate(0deg);
    opacity: 0.1;
  }
  25% {
    opacity: 0.3;
  }
  75% {
    opacity: 0.2;
  }
  100% {
    transform: translateX(120%) translateY(-30px) rotate(5deg);
    opacity: 0;
  }
}

