/* ═══════════════════════════════════════════════════════════
   МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ
   (использует стили modal-overlay-unified и modal-box из base.css)
   ═══════════════════════════════════════════════════════════ */

#auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#auth-modal .auth-modal-content {
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 80%, rgba(56, 139, 253, 0.08) 0%, transparent 50%),
        rgba(16, 20, 35, 0.85);
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 18px;
    padding: 32px 36px;
    width: 100%;
    max-width: 380px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: authModalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authModalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Иконка замка */
#auth-modal .auth-lock-icon {
    text-align: center;
    margin-bottom: 12px;
    font-size: 44px;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
}

/* Заголовок */
#auth-modal h2 {
    color: #f0f6fc;
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, #e6edf3, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#auth-modal .auth-subtitle {
    color: #8b949e;
    font-size: 13px;
    text-align: center;
    margin: 0 0 24px;
}

/* Группа полей */
#auth-modal .auth-form-group {
    margin-bottom: 18px;
}

#auth-modal .auth-form-group label {
    display: block;
    color: #c9d1d9;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}

#auth-modal .auth-form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #f0f6fc;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#auth-modal .auth-form-group input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

#auth-modal .auth-form-group input::placeholder {
    color: #6e7681;
}

/* Кнопка входа */
#auth-modal .auth-login-btn {
    width: 100%;
    padding: 12px;
    background: rgba(46, 160, 67, 0.12);
    border: 1px solid rgba(63, 185, 80, 0.3);
    border-radius: 10px;
    color: #3fb950;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
    font-family: inherit;
}

#auth-modal .auth-login-btn:hover:not(:disabled) {
    background: rgba(46, 160, 67, 0.2);
    border-color: rgba(63, 185, 80, 0.5);
    box-shadow: 0 0 16px rgba(63, 185, 80, 0.15);
    transform: translateY(-1px);
}

#auth-modal .auth-login-btn:active:not(:disabled) {
    transform: translateY(0);
}

#auth-modal .auth-login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Сообщение об ошибке */
#auth-modal .auth-error-message {
    display: none;
    color: #f85149;
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
    animation: authShake 0.4s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}