/* Login Page Styles - Mazaber.io */

:root {
  --primary: #00D4FF;
  --primary-dark: #00a8cc;
  --secondary: #FF6B35;
  --bg-dark: #0a0a0f;
  --bg-card: #141419;
  --bg-elevated: #1c1c24;
  --text-primary: #ffffff;
  --text-secondary: #a8a8b3;
  --border-color: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --error: #ef4444;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated Background */
.auth-background {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a0033 0%, #0a0a0f 100%);
  overflow: hidden;
  z-index: 0;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -150px;
  right: -150px;
  animation-delay: 7s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: #9333ea;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

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

/* Back Link */
.back-link {
  position: absolute;
  top: 2rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  z-index: 10;
}

.back-link:hover {
  color: var(--primary);
  transform: translateX(-4px);
}

.back-arrow {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.back-link:hover .back-arrow {
  transform: translateX(-4px);
}

/* Auth Card */
.auth-card {
  background: rgba(20, 20, 25, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.6s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.highlight {
  color: var(--primary);
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  padding: 0.375rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.tab-btn.active {
  background: var(--primary);
  color: #000;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

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

/* Google Sign-In */
.google-signin-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider span {
  padding: 0 1rem;
}

/* Auth Buttons */
.btn-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  margin-bottom: 1rem;
}

.btn-google {
  background: #fff;
  color: #000;
  border: 1px solid var(--border-color);
}

.btn-google:hover {
  background: #f8f8f8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #000;
  border: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
  font-family: inherit;
  width: 100%;
}

.btn-link:hover {
  opacity: 0.8;
}

.btn-link:disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* Phone Form */
.phone-form,
.otp-form {
  animation: fadeIn 0.4s ease;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.phone-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.country-code {
  width: 140px;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.country-code:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.phone-input {
  flex: 1;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.phone-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.input-hint {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.825rem;
}

/* OTP Inputs */
.otp-inputs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.otp-input {
  width: 50px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.otp-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
  transform: scale(1.05);
}

.otp-input.filled {
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.1);
}

/* reCAPTCHA Container */
#recaptcha-container {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
}

/* Auth Footer */
.auth-footer {
  margin-top: 2rem;
  text-align: center;
}

.terms-text {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.terms-text a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.terms-text a:hover {
  opacity: 0.8;
}

/* Status Message */
.status-message {
  position: fixed;
  top: 2rem;
  right: 2rem;
  max-width: 400px;
  z-index: 1000;
  animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.status-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
}

.status-message.success .status-content {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.status-message.error .status-content {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.status-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.status-message.success .status-icon {
  color: var(--success);
}

.status-message.error .status-icon {
  color: var(--error);
}

.status-text {
  color: var(--text-primary);
  font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .auth-container {
    padding: 1rem;
  }

  .back-link {
    top: 1rem;
    left: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .logo-icon {
    width: 56px;
    height: 56px;
  }

  .otp-inputs {
    gap: 0.5rem;
  }

  .otp-input {
    width: 44px;
    height: 52px;
    font-size: 1.25rem;
  }

  .status-message {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .phone-input-wrapper {
    flex-direction: column;
  }

  .country-code {
    width: 100%;
  }

  .auth-tabs {
    flex-direction: column;
  }

  .tab-btn {
    padding: 1rem;
  }
}

/* Loading Animation */
.btn-auth.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-auth.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-primary.loading::after {
  border-color: rgba(0, 0, 0, 0.3);
  border-top-color: #000;
}

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

/* Accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
