/* altcss/auth-modal.css */
auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

.auth-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0a0a0a;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

/* Animated background grid */
.auth-modal-backdrop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
}

@keyframes gridScroll {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* Floating orbs */
.auth-modal-backdrop::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 0, 128, 0.12) 0%, transparent 50%);
  animation: orbFloat 30s ease-in-out infinite;
  pointer-events: none;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(5%, 8%) rotate(120deg);
  }
  66% {
    transform: translate(-3%, -5%) rotate(240deg);
  }
}

.auth-modal-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

/* Split layout */
.auth-modal-content {
  display: flex;
  width: 100%;
  position: relative;
  animation: containerFadeIn 0.6s ease-out;
}

@keyframes containerFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Left side - Visual/Branding */
.auth-visual-side {
  flex: 1;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

/* Animated accent line */
.auth-visual-side::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 255, 255, 0.5) 20%,
    rgba(138, 43, 226, 0.5) 50%,
    rgba(255, 0, 128, 0.5) 80%,
    transparent 100%
  );
  animation: accentPulse 3s ease-in-out infinite;
}

@keyframes accentPulse {
  0%, 100% {
    opacity: 0.5;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.05);
  }
}

.auth-brand {
  z-index: 1;
}

.auth-logo-large {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.auth-logo-icon::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: #0f3460;
  border-radius: 10px;
}

.auth-logo-icon svg {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
}

.auth-logo-text {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.auth-tagline {
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 24px;
  text-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.auth-description {
  font-size: 18px;
  color: #a0aec0;
  line-height: 1.6;
  max-width: 500px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #cbd5e0;
  font-size: 15px;
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Decorative elements */
.auth-decoration {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
  animation: decorFloat 20s ease-in-out infinite;
}

.auth-decoration:nth-child(1) {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -100px;
}

.auth-decoration:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: 10%;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.15), transparent 70%);
  animation-delay: -5s;
}

@keyframes decorFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -20px) scale(1.1);
  }
}

/* Right side - Form */
.auth-form-side {
  flex: 0 0 480px;
  background: #0d0d0d;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-form-side::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 255, 255, 0.5) 50%,
    transparent 100%
  );
}

.auth-form-container {
  max-width: 400px;
  width: 100%;
}

/* Header */
.auth-header {
  margin-bottom: 40px;
}

.auth-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 15px;
  color: #718096;
  margin: 0;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  position: relative;
}

.auth-tabs::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.auth-tab {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #4a5568;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-tab::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.auth-tab.active {
  color: #00ffff;
}

.auth-tab.active::before {
  transform: scaleX(1);
}

.auth-tab:hover:not(.active) {
  color: #a0aec0;
}

/* Error Message */
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  border-left: 3px solid #ef4444;
  animation: errorShake 0.4s ease-out;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Forms */
.auth-form {
  animation: formSlideIn 0.5s ease-out;
}

@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 0;
}

.auth-form-row .auth-form-group {
  flex: 1;
}

.auth-form-group {
  margin-bottom: 24px;
}

.auth-form-group label {
  display: block;
  margin-bottom: 8px;
  color: #a0aec0;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.auth-form-group input::placeholder {
  color: #4a5568;
}

.auth-form-group input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.15);
}

.auth-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #4a5568;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #00ffff 0%, #8a2be2 50%, #ff0080 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.auth-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.auth-submit-btn:hover:not(:disabled)::before {
  left: 100%;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer */
.auth-footer {
  margin-top: 32px;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-footer-text {
  font-size: 12px;
  color: #4a5568;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .auth-visual-side {
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
  }
}

@media (max-width: 768px) {
  .auth-modal-backdrop {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .auth-modal-container {
    flex-direction: column;
    min-height: auto;
  }

  .auth-visual-side {
    display: none;
  }

  .auth-form-side {
    flex: 1 1 auto;
    padding: 32px 24px;
    min-height: auto;
  }

  .auth-form-container {
    max-width: 100%;
  }

  .auth-header {
    margin-bottom: 32px;
  }

  .auth-title {
    font-size: 28px;
  }

  .auth-tabs {
    margin-bottom: 28px;
  }

  .auth-form-row {
    flex-direction: column;
    gap: 0;
  }

  .auth-form-group {
    margin-bottom: 20px;
  }

  .auth-form-group input {
    padding: 16px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .auth-submit-btn {
    padding: 18px 24px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .auth-form-side {
    padding: 24px 16px 32px 16px;
  }

  .auth-header {
    margin-bottom: 24px;
  }

  .auth-title {
    font-size: 24px;
  }

  .auth-subtitle {
    font-size: 14px;
  }

  .auth-tabs {
    gap: 8px;
    margin-bottom: 24px;
  }

  .auth-tab {
    padding: 10px 16px;
    font-size: 13px;
  }

  .auth-form-group {
    margin-bottom: 18px;
  }

  .auth-form-group label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .auth-form-group input {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .auth-submit-btn {
    padding: 16px 20px;
    font-size: 15px;
  }

  .auth-footer {
    margin-top: 24px;
    padding-top: 20px;
  }
}