/* ============================================
   СТРАНИЦА АВТОРИЗАЦИИ - СОВРЕМЕННЫЙ ДИЗАЙН
   ============================================ */

:root {
  --lk-login-spacing: 24px;
  --lk-login-card-radius: 20px;
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(17, 17, 17, 0.8);
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #a0a0a0;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --primary-color: #3b82f6;
  --success-color: #10b981;
  --warning-color: #ffaa00;
  --danger-color: #ff4444;
}

.lk-login-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #1a1a1a 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Анимированный фон с градиентами */
.login-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 25s infinite ease-in-out;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  top: -300px;
  left: -300px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  bottom: -250px;
  right: -250px;
  animation-delay: 8s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 15s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -40px) scale(1.15);
  }
  66% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

/* Контейнер */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: var(--lk-login-spacing);
}

/* Карточка авторизации */
.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: var(--lk-login-card-radius);
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(59, 130, 246, 0.5), 
    rgba(139, 92, 246, 0.5), 
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.login-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Заголовок */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-icon-wrapper {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.8rem;
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
}

.login-icon-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.login-icon-wrapper i {
  position: relative;
  z-index: 1;
}

.login-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Сообщения */
.login-messages {
  margin-bottom: 1.5rem;
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.login-alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.login-alert-warning {
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.3);
  color: #ffaa00;
}

.login-alert-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.login-alert i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Telegram виджет */
.telegram-login-wrapper {
  text-align: center;
}

.telegram-widget-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.3s ease;
}

.telegram-widget-container:hover {
  background: rgba(255, 255, 255, 0.04);
}

.telegram-widget-container iframe {
  border-radius: 12px !important;
  overflow: hidden;
}

.telegram-error {
  padding: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  color: #ef4444;
}

.telegram-error i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.telegram-error p {
  margin: 0;
  font-size: 0.95rem;
}

/* Подсказка */
.login-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  transition: all 0.3s ease;
}

.login-hint:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

.login-hint i {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.login-hint span {
  flex: 1;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .login-container {
    padding: 1rem;
  }
  
  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
  
  .login-icon-wrapper {
    width: 75px;
    height: 75px;
    font-size: 2.2rem;
    border-radius: 20px;
  }
  
  .login-title {
    font-size: 1.75rem;
  }
  
  .login-subtitle {
    font-size: 0.95rem;
  }
  
  .login-hint {
    padding: 1rem;
    font-size: 0.85rem;
  }
  
  .orb-1 {
    width: 400px;
    height: 400px;
  }
  
  .orb-2 {
    width: 350px;
    height: 350px;
  }
  
  .orb-3 {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem 1.25rem;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
  
  .login-icon-wrapper {
    width: 65px;
    height: 65px;
    font-size: 1.8rem;
  }
}
