/**
 * Login Screen Styles
 * Стилизация в стиле Apple с современным дизайном
 */

.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 10000;
    overflow: auto;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    margin: auto;
}

.login-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    display: inline-block;
    margin-bottom: 24px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-logo svg {
    filter: drop-shadow(0 10px 20px rgba(99, 102, 241, 0.3));
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* Description */
.login-description {
    text-align: center;
    margin-bottom: 40px;
}

.login-description p {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* Login Button Container */
.login-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.login-button-container iframe {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-button-container iframe:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Loading State */
.login-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.login-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-loading p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

/* Error State */
.login-error {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: #dc2626;
    font-size: 14px;
    margin-top: 16px;
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.login-info {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-content {
        padding: 36px 28px;
        border-radius: 20px;
    }
    
    .login-title {
        font-size: 28px;
    }
    
    .login-subtitle {
        font-size: 15px;
    }
    
    .login-description p {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .login-content {
        padding: 32px 24px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-logo svg {
        width: 64px;
        height: 64px;
    }
}

/* Темная тема для системной настройки */
@media (prefers-color-scheme: dark) {
    .login-content {
        background: rgba(31, 41, 55, 0.95);
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    
    .login-title {
        color: #f9fafb;
    }
    
    .login-subtitle {
        color: #d1d5db;
    }
    
    .login-description p {
        color: #9ca3af;
    }
    
    .login-info {
        color: #6b7280;
    }
    
    .login-footer {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

/* Плавная анимация появления элементов */
.login-header,
.login-description,
.login-button-container,
.login-footer {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.login-header { animation-delay: 0.1s; }
.login-description { animation-delay: 0.2s; }
.login-button-container { animation-delay: 0.3s; }
.login-footer { animation-delay: 0.4s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}