/* Authentication Styles for Multikor Investor Portal */

/* ============================================================================
   Background Video
   ============================================================================ */

.background-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: -1;
  object-fit: cover;
  opacity: 0.3;
}

/* ============================================================================
   Auth Form Container
   ============================================================================ */

.password-container {
  max-width: 450px;
  width: 100%;
}

.auth-form {
  width: 100%;
}

.auth-form.hidden {
  display: none;
}

/* ============================================================================
   Form Elements
   ============================================================================ */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.8);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
  color: #64748b;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.auth-button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.auth-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.auth-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-button-secondary {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #cbd5e1;
}

.auth-button-secondary:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.5);
}

/* ============================================================================
   Links and Text
   ============================================================================ */

.auth-link {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

.auth-text {
  color: #cbd5e1;
  font-size: 14px;
  text-align: center;
  margin-top: 20px;
}

.auth-divider {
  text-align: center;
  color: #64748b;
  margin: 20px 0;
  font-size: 14px;
}

/* ============================================================================
   Error and Success Messages
   ============================================================================ */

.error-message {
  color: #f87171;
  font-size: 14px;
  margin-top: 10px;
  padding: 10px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
}

.error-message:empty {
  display: none;
}

.success-message {
  color: #10b981;
  font-size: 14px;
  margin-top: 10px;
  padding: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
}

/* ============================================================================
   Verification Screen
   ============================================================================ */

.verification-content {
  text-align: center;
}

.verification-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.verification-email {
  color: #667eea;
  font-weight: 600;
  font-size: 16px;
}

.verification-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* ============================================================================
   Toast Messages
   ============================================================================ */

.message-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
}

.message-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.message-toast.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.message-toast.error {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

.message-toast.info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ============================================================================
   Sign Out Button (in nav)
   ============================================================================ */

.signout-button {
  padding: 8px 20px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
  color: #f87171;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.signout-button:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.5);
}

/* Sign Out Button in Nav Links */
.nav-signout-btn {
  padding: 8px 20px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
  color: #f87171;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 10px;
  flex-shrink: 0;
  display: none;
}

.nav-signout-btn.visible {
  display: inline-block;
}

.nav-signout-btn:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.5);
  transform: translateY(-2px);
}

/* Mobile menu signout button */
@media (max-width: 950px) {
  .nav-signout-btn {
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
    padding: 15px 30px;
    text-align: center;
  }
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 640px) {
  .password-container {
    padding: 30px 20px;
  }

  .form-input {
    padding: 10px 14px;
    font-size: 14px;
  }

  .auth-button {
    padding: 12px;
    font-size: 15px;
  }

  .message-toast {
    top: 10px;
    right: 10px;
    left: 10px;
    transform: translateY(-100px);
  }

  .message-toast.show {
    transform: translateY(0);
  }
}

/* ============================================================================
   Loading Spinner
   ============================================================================ */

.auth-button.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
