/* Auth Page - Ultra Beautiful Design */

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

body.auth-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0F0F23;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 80px 16px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  color: #ffffff;
}

body.auth-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(157, 78, 221, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(199, 125, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

.auth-shell {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
  margin: 0 auto;
}

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

.auth-card {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(157, 78, 221, 0.25);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(157, 78, 221, 0.2);
  width: 100%;
  margin: 0 auto;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Убираем hover эффекты на мобильных */

.auth-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #9D4EDD, #C77DFF, #FF6B35, #FF9E6D);
}

@media (hover: hover) {
  .auth-card:hover {
    transform: translateY(-4px);
    border-color: rgba(157, 78, 221, 0.4);
    box-shadow: 
      0 25px 70px rgba(0, 0, 0, 0.6),
      0 0 50px rgba(157, 78, 221, 0.3);
  }
}

.auth-logo-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  gap: 12px;
}

.auth-logo-image {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(157, 78, 221, 0.6));
  transition: all 0.3s ease;
  animation: authLogoFloat 4s ease-in-out infinite;
}

@keyframes authLogoFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 30px rgba(157, 78, 221, 0.7));
  }
  50% {
    transform: translateY(-5px) scale(1.04);
    filter: drop-shadow(0 0 40px rgba(255, 107, 53, 0.8));
  }
}

.auth-logo-image:hover {
  transform: scale(1.1) translateY(-4px);
  filter: drop-shadow(0 0 50px rgba(157, 78, 221, 0.9));
}

.auth-logo-text {
  font-weight: 700;
  background: linear-gradient(135deg, #9D4EDD 0%, #C77DFF 30%, #FF6B35 70%, #FF9E6D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  font-size: 28px;
  text-align: center;
  position: relative;
  white-space: nowrap;
}


.auth-card h1 {
  font-size: 24px;
  margin-bottom: 12px;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
}

.muted {
  color: #A0A0A0;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.hero-text {
  text-align: center;
  line-height: 1.7;
  margin-bottom: 24px;
}

.wait {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid rgba(157, 78, 221, 0.3);
  border-radius: 14px;
  padding: 16px;
  margin: 20px 0;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.wait:hover {
  border-color: rgba(157, 78, 221, 0.5);
  box-shadow: 0 0 25px rgba(157, 78, 221, 0.3);
  transform: scale(1.02);
}

.wait-title {
  font-weight: 600;
  color: #ffffff;
  font-size: 15px;
  letter-spacing: -0.2px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(157, 78, 221, 0.3);
  border-top-color: #9D4EDD;
  border-right-color: #FF6B35;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(157, 78, 221, 0.5);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #9D4EDD 0%, #FF6B35 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  letter-spacing: -0.2px;
  overflow: hidden;
  box-shadow: 
    0 6px 20px rgba(157, 78, 221, 0.5),
    0 0 40px rgba(157, 78, 221, 0.3);
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 400px;
  height: 400px;
}

.btn.primary {
  background: linear-gradient(135deg, #9D4EDD 0%, #FF6B35 100%);
}

@media (hover: hover) {
  .btn.primary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 
      0 8px 25px rgba(157, 78, 221, 0.6),
      0 0 40px rgba(255, 107, 53, 0.4);
  }
}

.btn.primary:active {
  transform: translateY(0) scale(0.99);
}

.btn.full {
  width: 100%;
  margin-top: 12px;
}

.error {
  margin-top: 24px;
  padding: 18px 24px;
  border-radius: 14px;
  border: 1px solid rgba(244, 67, 54, 0.5);
  background: rgba(244, 67, 54, 0.15);
  color: #F44336;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 0 20px rgba(244, 67, 54, 0.3),
    inset 0 0 10px rgba(244, 67, 54, 0.1);
  position: relative;
  z-index: 1;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.auth-footer {
  text-align: center;
  color: #A0A0A0;
  font-size: 12px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  z-index: 1;
  font-weight: 400;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(157, 78, 221, 0.15);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #9D4EDD, #FF6B35, transparent);
}

@media (max-width: 768px) {
  body.auth-page {
    padding: 20px 16px 70px 16px;
  }

  .auth-shell {
    max-width: 100%;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .auth-logo-container {
    margin-bottom: 20px;
    gap: 10px;
  }

  .auth-logo-image {
    height: 80px;
  }

  .auth-logo-text {
    font-size: 24px;
  }

  .auth-card h1 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .muted {
    font-size: 13px;
    line-height: 1.5;
  }

  .hero-text {
    margin-bottom: 20px;
  }

  .btn {
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 12px;
  }

  .btn.full {
    margin-top: 8px;
  }

  .wait {
    padding: 14px;
    margin: 16px 0;
    border-radius: 12px;
  }

  .wait-title {
    font-size: 14px;
  }

  .spinner {
    width: 18px;
    height: 18px;
  }

  .error {
    margin-top: 16px;
    padding: 14px 18px;
    font-size: 13px;
  }

  .auth-footer {
    padding: 14px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  body.auth-page {
    padding: 16px 12px 65px 12px;
  }

  .auth-card {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .auth-logo-container {
    margin-bottom: 18px;
    gap: 8px;
  }

  .auth-logo-image {
    height: 70px;
  }

  .auth-logo-text {
    font-size: 22px;
  }

  .auth-card h1 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .muted {
    font-size: 12px;
  }

  .hero-text {
    margin-bottom: 18px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .wait {
    padding: 12px;
    margin: 14px 0;
  }

  .wait-title {
    font-size: 13px;
  }

  .auth-footer {
    padding: 12px;
    font-size: 10px;
  }
}
